版本比较
20251021总结
正文
增加 3 行删除 3 行
30 行未改动3132333435353637383910 行未改动50515253545455565758180 行未改动全部展开23924024124224324324424524624720 行未改动30 行未改动 for(int i = 1; i <= n; i++){ cin >> a[i]; s += a[i], s0 += a[i] % 2 == 0, s1 += a[i] % 2; int op = s - s1 / 3 - (s1 % 3 == 1 && s0 + s1 / 3 > 0); cout << op << ' '; cout << op << ' '; } return 0;}```10 行未改动using namespace std;
const int N = 1e5 + 10;
int T, n, m, a[N], b[N], p[N], sum[N]; int T, n, m, a[N], b[N], p[N], sum[N];
void solve(){ cin >> n >> m; int ans = 0;180 行未改动全部展开 v[y].push_back(x); } long long ans = 0; for(int i = 1; i <= n; i++){ int top = 0; mx = 0; int top = 0; mx = 0; for(int j : v[i]){ rt = ++top; dfs(j, i, 1); }20 行未改动