P1019 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; int a[10050],b[10050];…… 题解列表 2019年05月05日 0 点赞 0 评论 1490 浏览 评分:0.0
P1019 (C++代码) 摘要:解题思路: 要想使差值最大,直接把两个数组排序,最大减最小。 C++里面有一个sort函数,使用非常方面,并且效率也很高,这 题解列表 2019年02月17日 0 点赞 0 评论 1474 浏览 评分:0.0
P1019 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <math.h>int main() { int n; scanf("%d", &n); int a[n], b[n…… 题解列表 2018年08月09日 0 点赞 0 评论 1299 浏览 评分:0.0
P1019 (Java代码) 摘要:本来想的是两个数列相加再减 后来发现是错的思路 ✗然后就想排列后比较在加,发现数值太小 ✗最后一个正排列,一个反方向排列再比大小相加就成功了 参考代码:import java.util…… 题解列表 2018年05月03日 0 点赞 0 评论 2398 浏览 评分:0.0
使用sort函数排序 摘要:解题思路:使用sort函数直接排序然后相减把结果相加注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool compare(int a,in…… 题解列表 2024年10月29日 0 点赞 0 评论 662 浏览 评分:7.3
1286: 最大配对-c++ 摘要:解题思路:1.升序排序 2.a从头b从尾拼凑 头尾拼凑过程:1: 2 7 52: 3 6 83: 5 4 94: 6 1 14注意事项:数组一定要开大一点!! 参考代…… 题解列表 2024年03月24日 0 点赞 0 评论 579 浏览 评分:9.0
P1019-题解(C语言代码)满分题解!! 摘要: #include #include int main() { int n,a[10000],b[10000]; scanf("%d",&n…… 题解列表 2019年12月23日 0 点赞 0 评论 2287 浏览 评分:9.3
P1019题解 (Java代码) 摘要:import java.util.Arrays; import java.util.Scanner; public class Main { public static void ma…… 题解列表 2022年02月12日 0 点赞 0 评论 658 浏览 评分:9.9
1286: 最大配对 importjava.util.*;publicclass最大配对{publicstaticvoidmain(String[]args){Scannersc=newScanner(System.in);intn=sc.nextInt();int[]arrb=newint[n];inttemp=0;in 题解列表 2023年03月06日 0 点赞 0 评论 756 浏览 评分:9.9
1286基础解法(Python) 解题思路:最大-最小注意事项:合理运用数据类型简化处理难度参考代码:m=int(input())lst_1=sorted(map(int,input().split()))lst_2=sorted(map(int,input().split()), 题解列表 2023年03月10日 0 点赞 0 评论 587 浏览 评分:9.9