# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
791406 | 2023-07-24T06:05:53 Z | 반딧불(#10046) | Bliskost (COI23_bliskost) | C++17 | 227 ms | 16024 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n, q, k; char a[1000005], b[1000005]; int sum[2][2]; int main(){ scanf("%d %d", &n, &q); scanf("%s %s", a+1, b+1); k = strlen(a+1); for(int i=1; i<=n; i++){ sum[0][i%2] += a[i]; sum[1][i%2] += b[i]; } printf("%s\n", (sum[0][0]-sum[1][0]%26)%26 == (sum[0][1]-sum[1][1]%26)%26 ? "da" : "ne"); while(q--){ int x; char c; scanf("%d %c", &x, &c); sum[0][x%2] -= a[x]; a[x] = c; sum[0][x%2] += a[x]; printf("%s\n", (sum[0][0]-sum[1][0]%26)%26 == (sum[0][1]-sum[1][1]%26)%26 ? "da" : "ne"); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Correct | 0 ms | 212 KB | Output is correct |
14 | Correct | 0 ms | 212 KB | Output is correct |
15 | Correct | 0 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Correct | 0 ms | 212 KB | Output is correct |
14 | Correct | 0 ms | 212 KB | Output is correct |
15 | Correct | 0 ms | 212 KB | Output is correct |
16 | Correct | 0 ms | 212 KB | Output is correct |
17 | Correct | 0 ms | 212 KB | Output is correct |
18 | Correct | 0 ms | 212 KB | Output is correct |
19 | Correct | 0 ms | 212 KB | Output is correct |
20 | Correct | 0 ms | 212 KB | Output is correct |
21 | Correct | 0 ms | 212 KB | Output is correct |
22 | Correct | 0 ms | 212 KB | Output is correct |
23 | Correct | 0 ms | 212 KB | Output is correct |
24 | Correct | 0 ms | 212 KB | Output is correct |
25 | Correct | 1 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 0 ms | 212 KB | Output is correct |
28 | Correct | 0 ms | 212 KB | Output is correct |
29 | Correct | 0 ms | 212 KB | Output is correct |
30 | Correct | 0 ms | 212 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Correct | 0 ms | 212 KB | Output is correct |
14 | Correct | 0 ms | 212 KB | Output is correct |
15 | Correct | 0 ms | 212 KB | Output is correct |
16 | Correct | 0 ms | 212 KB | Output is correct |
17 | Correct | 0 ms | 212 KB | Output is correct |
18 | Correct | 0 ms | 212 KB | Output is correct |
19 | Correct | 0 ms | 212 KB | Output is correct |
20 | Correct | 0 ms | 212 KB | Output is correct |
21 | Correct | 0 ms | 212 KB | Output is correct |
22 | Correct | 0 ms | 212 KB | Output is correct |
23 | Correct | 0 ms | 212 KB | Output is correct |
24 | Correct | 0 ms | 212 KB | Output is correct |
25 | Correct | 1 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 0 ms | 212 KB | Output is correct |
28 | Correct | 0 ms | 212 KB | Output is correct |
29 | Correct | 0 ms | 212 KB | Output is correct |
30 | Correct | 0 ms | 212 KB | Output is correct |
31 | Correct | 6 ms | 2132 KB | Output is correct |
32 | Correct | 6 ms | 2132 KB | Output is correct |
33 | Correct | 7 ms | 2232 KB | Output is correct |
34 | Correct | 7 ms | 2176 KB | Output is correct |
35 | Correct | 6 ms | 2132 KB | Output is correct |
36 | Correct | 6 ms | 2132 KB | Output is correct |
37 | Correct | 6 ms | 2260 KB | Output is correct |
38 | Correct | 6 ms | 2132 KB | Output is correct |
39 | Correct | 6 ms | 2216 KB | Output is correct |
40 | Correct | 6 ms | 2132 KB | Output is correct |
41 | Correct | 6 ms | 2132 KB | Output is correct |
42 | Correct | 6 ms | 2240 KB | Output is correct |
43 | Correct | 6 ms | 2132 KB | Output is correct |
44 | Correct | 7 ms | 2148 KB | Output is correct |
45 | Correct | 6 ms | 2260 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Correct | 0 ms | 212 KB | Output is correct |
14 | Correct | 0 ms | 212 KB | Output is correct |
15 | Correct | 0 ms | 212 KB | Output is correct |
16 | Correct | 18 ms | 592 KB | Output is correct |
17 | Correct | 16 ms | 596 KB | Output is correct |
18 | Correct | 17 ms | 520 KB | Output is correct |
19 | Correct | 17 ms | 580 KB | Output is correct |
20 | Correct | 17 ms | 528 KB | Output is correct |
21 | Correct | 16 ms | 584 KB | Output is correct |
22 | Correct | 19 ms | 596 KB | Output is correct |
23 | Correct | 17 ms | 596 KB | Output is correct |
24 | Correct | 19 ms | 520 KB | Output is correct |
25 | Correct | 17 ms | 580 KB | Output is correct |
26 | Correct | 17 ms | 520 KB | Output is correct |
27 | Correct | 18 ms | 528 KB | Output is correct |
28 | Correct | 17 ms | 528 KB | Output is correct |
29 | Correct | 17 ms | 596 KB | Output is correct |
30 | Correct | 16 ms | 620 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Correct | 0 ms | 212 KB | Output is correct |
14 | Correct | 0 ms | 212 KB | Output is correct |
15 | Correct | 0 ms | 212 KB | Output is correct |
16 | Correct | 0 ms | 212 KB | Output is correct |
17 | Correct | 0 ms | 212 KB | Output is correct |
18 | Correct | 0 ms | 212 KB | Output is correct |
19 | Correct | 0 ms | 212 KB | Output is correct |
20 | Correct | 0 ms | 212 KB | Output is correct |
21 | Correct | 0 ms | 212 KB | Output is correct |
22 | Correct | 0 ms | 212 KB | Output is correct |
23 | Correct | 0 ms | 212 KB | Output is correct |
24 | Correct | 0 ms | 212 KB | Output is correct |
25 | Correct | 1 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 0 ms | 212 KB | Output is correct |
28 | Correct | 0 ms | 212 KB | Output is correct |
29 | Correct | 0 ms | 212 KB | Output is correct |
30 | Correct | 0 ms | 212 KB | Output is correct |
31 | Correct | 18 ms | 592 KB | Output is correct |
32 | Correct | 16 ms | 596 KB | Output is correct |
33 | Correct | 17 ms | 520 KB | Output is correct |
34 | Correct | 17 ms | 580 KB | Output is correct |
35 | Correct | 17 ms | 528 KB | Output is correct |
36 | Correct | 16 ms | 584 KB | Output is correct |
37 | Correct | 19 ms | 596 KB | Output is correct |
38 | Correct | 17 ms | 596 KB | Output is correct |
39 | Correct | 19 ms | 520 KB | Output is correct |
40 | Correct | 17 ms | 580 KB | Output is correct |
41 | Correct | 17 ms | 520 KB | Output is correct |
42 | Correct | 18 ms | 528 KB | Output is correct |
43 | Correct | 17 ms | 528 KB | Output is correct |
44 | Correct | 17 ms | 596 KB | Output is correct |
45 | Correct | 16 ms | 620 KB | Output is correct |
46 | Correct | 17 ms | 520 KB | Output is correct |
47 | Correct | 26 ms | 504 KB | Output is correct |
48 | Correct | 20 ms | 540 KB | Output is correct |
49 | Correct | 19 ms | 572 KB | Output is correct |
50 | Correct | 17 ms | 596 KB | Output is correct |
51 | Correct | 18 ms | 512 KB | Output is correct |
52 | Correct | 20 ms | 504 KB | Output is correct |
53 | Correct | 17 ms | 504 KB | Output is correct |
54 | Correct | 18 ms | 512 KB | Output is correct |
55 | Correct | 18 ms | 596 KB | Output is correct |
56 | Correct | 18 ms | 580 KB | Output is correct |
57 | Correct | 18 ms | 556 KB | Output is correct |
58 | Correct | 17 ms | 608 KB | Output is correct |
59 | Correct | 17 ms | 516 KB | Output is correct |
60 | Correct | 18 ms | 520 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 212 KB | Output is correct |
2 | Correct | 0 ms | 212 KB | Output is correct |
3 | Correct | 0 ms | 212 KB | Output is correct |
4 | Correct | 0 ms | 212 KB | Output is correct |
5 | Correct | 0 ms | 212 KB | Output is correct |
6 | Correct | 0 ms | 212 KB | Output is correct |
7 | Correct | 1 ms | 212 KB | Output is correct |
8 | Correct | 0 ms | 212 KB | Output is correct |
9 | Correct | 0 ms | 212 KB | Output is correct |
10 | Correct | 0 ms | 212 KB | Output is correct |
11 | Correct | 0 ms | 212 KB | Output is correct |
12 | Correct | 0 ms | 212 KB | Output is correct |
13 | Correct | 0 ms | 212 KB | Output is correct |
14 | Correct | 0 ms | 212 KB | Output is correct |
15 | Correct | 0 ms | 212 KB | Output is correct |
16 | Correct | 0 ms | 212 KB | Output is correct |
17 | Correct | 0 ms | 212 KB | Output is correct |
18 | Correct | 0 ms | 212 KB | Output is correct |
19 | Correct | 0 ms | 212 KB | Output is correct |
20 | Correct | 0 ms | 212 KB | Output is correct |
21 | Correct | 0 ms | 212 KB | Output is correct |
22 | Correct | 0 ms | 212 KB | Output is correct |
23 | Correct | 0 ms | 212 KB | Output is correct |
24 | Correct | 0 ms | 212 KB | Output is correct |
25 | Correct | 1 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 0 ms | 212 KB | Output is correct |
28 | Correct | 0 ms | 212 KB | Output is correct |
29 | Correct | 0 ms | 212 KB | Output is correct |
30 | Correct | 0 ms | 212 KB | Output is correct |
31 | Correct | 6 ms | 2132 KB | Output is correct |
32 | Correct | 6 ms | 2132 KB | Output is correct |
33 | Correct | 7 ms | 2232 KB | Output is correct |
34 | Correct | 7 ms | 2176 KB | Output is correct |
35 | Correct | 6 ms | 2132 KB | Output is correct |
36 | Correct | 6 ms | 2132 KB | Output is correct |
37 | Correct | 6 ms | 2260 KB | Output is correct |
38 | Correct | 6 ms | 2132 KB | Output is correct |
39 | Correct | 6 ms | 2216 KB | Output is correct |
40 | Correct | 6 ms | 2132 KB | Output is correct |
41 | Correct | 6 ms | 2132 KB | Output is correct |
42 | Correct | 6 ms | 2240 KB | Output is correct |
43 | Correct | 6 ms | 2132 KB | Output is correct |
44 | Correct | 7 ms | 2148 KB | Output is correct |
45 | Correct | 6 ms | 2260 KB | Output is correct |
46 | Correct | 18 ms | 592 KB | Output is correct |
47 | Correct | 16 ms | 596 KB | Output is correct |
48 | Correct | 17 ms | 520 KB | Output is correct |
49 | Correct | 17 ms | 580 KB | Output is correct |
50 | Correct | 17 ms | 528 KB | Output is correct |
51 | Correct | 16 ms | 584 KB | Output is correct |
52 | Correct | 19 ms | 596 KB | Output is correct |
53 | Correct | 17 ms | 596 KB | Output is correct |
54 | Correct | 19 ms | 520 KB | Output is correct |
55 | Correct | 17 ms | 580 KB | Output is correct |
56 | Correct | 17 ms | 520 KB | Output is correct |
57 | Correct | 18 ms | 528 KB | Output is correct |
58 | Correct | 17 ms | 528 KB | Output is correct |
59 | Correct | 17 ms | 596 KB | Output is correct |
60 | Correct | 16 ms | 620 KB | Output is correct |
61 | Correct | 17 ms | 520 KB | Output is correct |
62 | Correct | 26 ms | 504 KB | Output is correct |
63 | Correct | 20 ms | 540 KB | Output is correct |
64 | Correct | 19 ms | 572 KB | Output is correct |
65 | Correct | 17 ms | 596 KB | Output is correct |
66 | Correct | 18 ms | 512 KB | Output is correct |
67 | Correct | 20 ms | 504 KB | Output is correct |
68 | Correct | 17 ms | 504 KB | Output is correct |
69 | Correct | 18 ms | 512 KB | Output is correct |
70 | Correct | 18 ms | 596 KB | Output is correct |
71 | Correct | 18 ms | 580 KB | Output is correct |
72 | Correct | 18 ms | 556 KB | Output is correct |
73 | Correct | 17 ms | 608 KB | Output is correct |
74 | Correct | 17 ms | 516 KB | Output is correct |
75 | Correct | 18 ms | 520 KB | Output is correct |
76 | Correct | 227 ms | 13692 KB | Output is correct |
77 | Correct | 210 ms | 15796 KB | Output is correct |
78 | Correct | 199 ms | 15828 KB | Output is correct |
79 | Correct | 200 ms | 15820 KB | Output is correct |
80 | Correct | 199 ms | 15908 KB | Output is correct |
81 | Correct | 200 ms | 15832 KB | Output is correct |
82 | Correct | 194 ms | 16024 KB | Output is correct |
83 | Correct | 190 ms | 15808 KB | Output is correct |
84 | Correct | 191 ms | 15820 KB | Output is correct |
85 | Correct | 189 ms | 15868 KB | Output is correct |
86 | Correct | 186 ms | 15872 KB | Output is correct |
87 | Correct | 187 ms | 15904 KB | Output is correct |
88 | Correct | 188 ms | 15888 KB | Output is correct |
89 | Correct | 202 ms | 15824 KB | Output is correct |
90 | Correct | 187 ms | 15820 KB | Output is correct |