版本比较
总结
正文
增加 13 行删除 13 行
12 行未改动13141516171718192021212223242533 行未改动5960616263636465666773 行未改动14114214314414514514614714814918 行未改动16816917017117217217317417517614 行未改动19119219319419519519619719819919920020120220320420420520620720811 行未改动22022122222322422422522622722822822923023123238 行未改动27127227327427527527627727827927827928028112 行未改动int n, k, sum = 1;string p, s[N], d[N];
signed main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> n >> k >> p; for(int i = 1; i <= n; i++) { int x; cin >> x >> s[i];33 行未改动 sum--; } } cout << sum << "\n";
return 0;}```
73 行未改动 } else { cout << (n * ((m - 1 + MOD) % MOD) % MOD * b % MOD + (n - 1 + MOD) % MOD * d % MOD + 1) % MOD << "\n"; }
return 0;}```
18 行未改动 int ans = 1, sum = n; cin >> a[1]; if(a[1] > 0) { ans = 0; } } for(int i = 2; i <= n; i++) { cin >> a[i]; if(i > a[i] + 1) { ans = 0;14 行未改动 cout << ans << "\n";}
signed main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> T; while(T--) { solve(); }
return 0;}```
11 行未改动const int N = 1e6 + 10;int T, n, s[N], len[N], w[N];
signed main() {
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
cin >> T; while(T--) { cin >> n; for(int i = 1; i <= n; i++) {38 行未改动 s[i] = s[x] + s[y]; w[i] = w[x]; } } } } cout << len[n] - s[n] << "\n"; } return 0;
return 0;}```