正文
增加 13 行删除 13 行
12 行未改动1314151617181920212223242533 行未改动59606162636465666773 行未改动14114214314414514614714814918 行未改动16816917017117217317417517614 行未改动19119219319419519619719819920020120220320420520620720811 行未改动22022122222322422522622722822923023123238 行未改动27127227327427527627727827928028112 行未改动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;}```12 行未改动1314151617181920212223242533 行未改动59606162636465666773 行未改动14114214314414514614714814918 行未改动16816917017117217317417517614 行未改动19119219319419519619719819920020120220320420520620720811 行未改动22022122222322422522622722822923023123238 行未改动27127227327427527627727827928028112 行未改动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;}```