1286: 最大配对 摘要:#include<iostream>#include<algorithm>#include<cmath>#include<vector>using na…… 题解列表 2025年11月12日 0 点赞 0 评论 93 浏览 评分:0.0
最大配对(贪心) 摘要:解题思路:贪心注意事项:参考代码:#include<bits/stdc++.h>usingnamespacestd;constint…… 题解列表 2025年07月29日 0 点赞 0 评论 210 浏览 评分:0.0
使用sort函数排序 摘要:解题思路:使用sort函数直接排序然后相减把结果相加注意事项:参考代码:#include<bits/stdc++.h>using namespace std;bool compare(int a,in…… 题解列表 2024年10月29日 0 点赞 0 评论 438 浏览 评分:7.3
小白随便写的,记录一下 摘要:```python def max_join(a, b, n): a.sort() b.sort(reverse=True) max_join = 0 # 记录最大配…… 题解列表 2024年03月26日 0 点赞 0 评论 263 浏览 评分:0.0
1286: 最大配对-c++ 摘要:解题思路:1.升序排序 2.a从头b从尾拼凑 头尾拼凑过程:1: 2 7 52: 3 6 83: 5 4 94: 6 1 14注意事项:数组一定要开大一点!! 参考代…… 题解列表 2024年03月24日 0 点赞 0 评论 280 浏览 评分:9.0
1286: 最大配对 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<cmath>#include<iomanip>#include<algorithm>using namespace …… 题解列表 2024年03月10日 1 点赞 0 评论 502 浏览 评分:9.9
最大匹配的数学证明 摘要:当数组a是递增排序,而数组b是递减排序时;或者数组a是递减排序,而数组b是递增排序时,结果最大。首先,这两种情况呈现一个对称关系,不妨证明前者——当数组a是递增排序,而数组b是递减排序时,结果最大。证…… 题解列表 2023年12月27日 1 点赞 0 评论 464 浏览 评分:0.0
c语言代码解决问题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<stdlib.h>#include<math.h>int compare(const void* a, const v…… 题解列表 2023年06月25日 0 点赞 0 评论 343 浏览 评分:0.0
1286: 最大配对 摘要:```cpp #include #include using namespace std; const int N=1e5+10; int a[N],b[N]; int main() {…… 题解列表 2023年04月15日 0 点赞 0 评论 418 浏览 评分:9.9