P1019 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<cmath> #include<algorithm> using namespace std; const…… 题解列表 2018年06月18日 0 点赞 0 评论 823 浏览 评分:0.0
最大配对(贪心) 摘要:解题思路:贪心注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;constint…… 题解列表 2025年07月29日 0 点赞 0 评论 125 浏览 评分:0.0
小白随便写的,记录一下 摘要:```python def max_join(a, b, n): a.sort() b.sort(reverse=True) max_join = 0 # 记录最大配…… 题解列表 2024年03月26日 0 点赞 0 评论 217 浏览 评分:0.0
最大匹配的数学证明 摘要:当数组a是递增排序,而数组b是递减排序时;或者数组a是递减排序,而数组b是递增排序时,结果最大。首先,这两种情况呈现一个对称关系,不妨证明前者——当数组a是递增排序,而数组b是递减排序时,结果最大。证…… 题解列表 2023年12月27日 1 点赞 0 评论 354 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>#include<math.h>int compare(const void* a, const v…… 题解列表 2023年06月25日 0 点赞 0 评论 245 浏览 评分:0.0
最大配对——python 摘要:解题思路:注意事项:参考代码:n = int(input())L1 = list(map(int,input().split()))L2 = list(map(int,input().split())…… 题解列表 2023年04月06日 0 点赞 0 评论 163 浏览 评分:0.0
python最大配对简单解法 摘要:B=[]n=int(input())A=list(map(int,input().split()))A.sort() #正序排序(小到大)b=list(map(int,input().split()…… 题解列表 2023年02月02日 0 点赞 0 评论 204 浏览 评分:0.0
P1019-题解(C语言代码) 摘要:```c #include #include int a[10005]; int b[10005]; void sort(int n){//主要思路就是排序,题目简单 int temp;…… 题解列表 2020年02月17日 0 点赞 0 评论 582 浏览 评分:0.0
P1019-题解(C++代码) 摘要:第一眼看过去就有点的像贪心 但是 貌似还是真是贪心 既然题目要求我们绝对值之和最大 那么我们每次当前匹配的两个数字之和最大 局部到全部 就可以推出整体绝对值之和最大 那么排序就好了…… 题解列表 2019年08月30日 0 点赞 0 评论 531 浏览 评分:0.0
P1019 (C++代码) 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<algorithm> using namespace std; int a[10050],b[10050];…… 题解列表 2019年05月05日 0 点赞 0 评论 582 浏览 评分:0.0