摘要:
A. Ezzat and Two Subsequences 十年oi一场空,不开long long见祖宗 首先不难发现把最大数单独分为一组可以得到最大的一个f1. 简单证明一下这是最优解: 设除最大数外的的n-1个数平均数为m, 如果从中取出的数平均数大于m,显然f1和f2都减小 如果从中取出的数平 阅读全文
摘要:
A. Mocha and Math 任何两个数都可以&,所以把所有的数&一遍就是最小的 1 #include <bits/stdc++.h> 2 using namespace std; 3 const int maxn = 110; 4 int a[maxn]; 5 int main() { 6 阅读全文
摘要:
#include <bits/stdc++.h> using namespace std; const int maxn = 10010; int a[maxn], s[maxn]; int main() { int n; int mins = 999999, ans = -999999; cin 阅读全文
摘要:
#include<bits/stdc++.h> const int N = 1e6+9; using namespace std; int n, m, a[N], b[N], c[N], d[N], cnt[N]; struct Node { int x, y, z; } node[N]; bool 阅读全文