P1019-题解(C语言代码) 摘要:```c #include #include int a[10005]; int b[10005]; void sort(int n){//主要思路就是排序,题目简单 int temp;…… 题解列表 2020年02月17日 0 点赞 0 评论 480 浏览 评分:0.0
P1019-题解(C++代码) 摘要:第一眼看过去就有点的像贪心 但是 貌似还是真是贪心 既然题目要求我们绝对值之和最大 那么我们每次当前匹配的两个数字之和最大 局部到全部 就可以推出整体绝对值之和最大 那么排序就好了 …… 题解列表 2019年08月30日 0 点赞 0 评论 430 浏览 评分:0.0
最大配对——python 摘要:解题思路:注意事项:参考代码:n = int(input())L1 = list(map(int,input().split()))L2 = list(map(int,input().split())…… 题解列表 2023年04月06日 0 点赞 0 评论 110 浏览 评分:0.0
P1019 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; int a[10050],b[10050];…… 题解列表 2019年05月05日 0 点赞 0 评论 442 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>#include<math.h>int compare(const void* a, const v…… 题解列表 2023年06月25日 0 点赞 0 评论 186 浏览 评分:0.0
最大匹配的数学证明 摘要:当数组a是递增排序,而数组b是递减排序时;或者数组a是递减排序,而数组b是递增排序时,结果最大。首先,这两种情况呈现一个对称关系,不妨证明前者——当数组a是递增排序,而数组b是递减排序时,结果最大。证…… 题解列表 2023年12月27日 0 点赞 0 评论 210 浏览 评分:0.0
P1019 (C++代码) 摘要:解题思路: 要想使差值最大,直接把两个数组排序,最大减最小。 C++里面有一个sort函数,使用非常方面,并且效率也很高,这 题解列表 2019年02月17日 0 点赞 0 评论 714 浏览 评分: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 评论 762 浏览 评分:0.0
P1019 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cmath> #include<algorithm> using namespace std; const…… 题解列表 2018年06月18日 0 点赞 0 评论 668 浏览 评分:0.0
小白随便写的,记录一下 摘要:```python def max_join(a, b, n): a.sort() b.sort(reverse=True) max_join = 0 # 记录最大配…… 题解列表 2024年03月26日 0 点赞 0 评论 169 浏览 评分:0.0