# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
791808 | 2023-07-24T10:18:09 Z | 구재현(#10080) | Bliskost (COI23_bliskost) | C++17 | 198 ms | 15880 KB |
#include <bits/stdc++.h> #define pb push_back #define fi first #define se second #define lb lower_bound using namespace std; typedef long long LL; typedef pair<int,int> pii; int N, Q; int S[2]; char A[1010101], B[1010101]; int main(){ scanf("%d %d", &N, &Q); scanf("%s", A+1); for (int i=1; i<=N; i++) S[i&1] -= A[i]; scanf("%s", B+1); for (int i=1; i<=N; i++) S[i&1] += B[i]; S[0] = (S[0]%26 + 26)%26, S[1] = (S[1]%26 + 26)%26; puts(S[0]==S[1]?"da":"ne"); while (Q--){ int a, b; scanf("%d", &a); S[a&1] += A[a]; scanf(" %c", &A[a]); S[a&1] -= A[a]; S[0] = (S[0]%26 + 26)%26, S[1] = (S[1]%26 + 26)%26; puts(S[0]==S[1]?"da":"ne"); } return 0; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 0 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 | 1 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 | 0 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 1 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 | 0 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 | 1 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 | 0 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 1 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 | 9 ms | 2708 KB | Output is correct |
32 | Correct | 9 ms | 2952 KB | Output is correct |
33 | Correct | 9 ms | 3744 KB | Output is correct |
34 | Correct | 8 ms | 2252 KB | Output is correct |
35 | Correct | 8 ms | 3492 KB | Output is correct |
36 | Correct | 8 ms | 2280 KB | Output is correct |
37 | Correct | 9 ms | 4088 KB | Output is correct |
38 | Correct | 9 ms | 3956 KB | Output is correct |
39 | Correct | 10 ms | 4064 KB | Output is correct |
40 | Correct | 9 ms | 4180 KB | Output is correct |
41 | Correct | 8 ms | 4172 KB | Output is correct |
42 | Correct | 8 ms | 4100 KB | Output is correct |
43 | Correct | 8 ms | 4124 KB | Output is correct |
44 | Correct | 8 ms | 4176 KB | Output is correct |
45 | Correct | 8 ms | 4180 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 13 ms | 976 KB | Output is correct |
17 | Correct | 13 ms | 972 KB | Output is correct |
18 | Correct | 13 ms | 980 KB | Output is correct |
19 | Correct | 13 ms | 980 KB | Output is correct |
20 | Correct | 13 ms | 980 KB | Output is correct |
21 | Correct | 13 ms | 980 KB | Output is correct |
22 | Correct | 13 ms | 992 KB | Output is correct |
23 | Correct | 13 ms | 912 KB | Output is correct |
24 | Correct | 13 ms | 980 KB | Output is correct |
25 | Correct | 15 ms | 980 KB | Output is correct |
26 | Correct | 13 ms | 972 KB | Output is correct |
27 | Correct | 13 ms | 972 KB | Output is correct |
28 | Correct | 17 ms | 928 KB | Output is correct |
29 | Correct | 13 ms | 984 KB | Output is correct |
30 | Correct | 13 ms | 980 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 1 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 | 0 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 1 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 | 13 ms | 976 KB | Output is correct |
32 | Correct | 13 ms | 972 KB | Output is correct |
33 | Correct | 13 ms | 980 KB | Output is correct |
34 | Correct | 13 ms | 980 KB | Output is correct |
35 | Correct | 13 ms | 980 KB | Output is correct |
36 | Correct | 13 ms | 980 KB | Output is correct |
37 | Correct | 13 ms | 992 KB | Output is correct |
38 | Correct | 13 ms | 912 KB | Output is correct |
39 | Correct | 13 ms | 980 KB | Output is correct |
40 | Correct | 15 ms | 980 KB | Output is correct |
41 | Correct | 13 ms | 972 KB | Output is correct |
42 | Correct | 13 ms | 972 KB | Output is correct |
43 | Correct | 17 ms | 928 KB | Output is correct |
44 | Correct | 13 ms | 984 KB | Output is correct |
45 | Correct | 13 ms | 980 KB | Output is correct |
46 | Correct | 14 ms | 1108 KB | Output is correct |
47 | Correct | 13 ms | 1152 KB | Output is correct |
48 | Correct | 13 ms | 1104 KB | Output is correct |
49 | Correct | 14 ms | 1128 KB | Output is correct |
50 | Correct | 13 ms | 1108 KB | Output is correct |
51 | Correct | 13 ms | 1100 KB | Output is correct |
52 | Correct | 17 ms | 1076 KB | Output is correct |
53 | Correct | 13 ms | 1108 KB | Output is correct |
54 | Correct | 17 ms | 1088 KB | Output is correct |
55 | Correct | 13 ms | 1072 KB | Output is correct |
56 | Correct | 13 ms | 1100 KB | Output is correct |
57 | Correct | 13 ms | 1076 KB | Output is correct |
58 | Correct | 13 ms | 1108 KB | Output is correct |
59 | Correct | 13 ms | 1108 KB | Output is correct |
60 | Correct | 13 ms | 1108 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 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 | 1 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 | 0 ms | 212 KB | Output is correct |
26 | Correct | 0 ms | 212 KB | Output is correct |
27 | Correct | 1 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 | 9 ms | 2708 KB | Output is correct |
32 | Correct | 9 ms | 2952 KB | Output is correct |
33 | Correct | 9 ms | 3744 KB | Output is correct |
34 | Correct | 8 ms | 2252 KB | Output is correct |
35 | Correct | 8 ms | 3492 KB | Output is correct |
36 | Correct | 8 ms | 2280 KB | Output is correct |
37 | Correct | 9 ms | 4088 KB | Output is correct |
38 | Correct | 9 ms | 3956 KB | Output is correct |
39 | Correct | 10 ms | 4064 KB | Output is correct |
40 | Correct | 9 ms | 4180 KB | Output is correct |
41 | Correct | 8 ms | 4172 KB | Output is correct |
42 | Correct | 8 ms | 4100 KB | Output is correct |
43 | Correct | 8 ms | 4124 KB | Output is correct |
44 | Correct | 8 ms | 4176 KB | Output is correct |
45 | Correct | 8 ms | 4180 KB | Output is correct |
46 | Correct | 13 ms | 976 KB | Output is correct |
47 | Correct | 13 ms | 972 KB | Output is correct |
48 | Correct | 13 ms | 980 KB | Output is correct |
49 | Correct | 13 ms | 980 KB | Output is correct |
50 | Correct | 13 ms | 980 KB | Output is correct |
51 | Correct | 13 ms | 980 KB | Output is correct |
52 | Correct | 13 ms | 992 KB | Output is correct |
53 | Correct | 13 ms | 912 KB | Output is correct |
54 | Correct | 13 ms | 980 KB | Output is correct |
55 | Correct | 15 ms | 980 KB | Output is correct |
56 | Correct | 13 ms | 972 KB | Output is correct |
57 | Correct | 13 ms | 972 KB | Output is correct |
58 | Correct | 17 ms | 928 KB | Output is correct |
59 | Correct | 13 ms | 984 KB | Output is correct |
60 | Correct | 13 ms | 980 KB | Output is correct |
61 | Correct | 14 ms | 1108 KB | Output is correct |
62 | Correct | 13 ms | 1152 KB | Output is correct |
63 | Correct | 13 ms | 1104 KB | Output is correct |
64 | Correct | 14 ms | 1128 KB | Output is correct |
65 | Correct | 13 ms | 1108 KB | Output is correct |
66 | Correct | 13 ms | 1100 KB | Output is correct |
67 | Correct | 17 ms | 1076 KB | Output is correct |
68 | Correct | 13 ms | 1108 KB | Output is correct |
69 | Correct | 17 ms | 1088 KB | Output is correct |
70 | Correct | 13 ms | 1072 KB | Output is correct |
71 | Correct | 13 ms | 1100 KB | Output is correct |
72 | Correct | 13 ms | 1076 KB | Output is correct |
73 | Correct | 13 ms | 1108 KB | Output is correct |
74 | Correct | 13 ms | 1108 KB | Output is correct |
75 | Correct | 13 ms | 1108 KB | Output is correct |
76 | Correct | 198 ms | 15784 KB | Output is correct |
77 | Correct | 155 ms | 15880 KB | Output is correct |
78 | Correct | 159 ms | 15812 KB | Output is correct |
79 | Correct | 149 ms | 15832 KB | Output is correct |
80 | Correct | 149 ms | 15780 KB | Output is correct |
81 | Correct | 157 ms | 15868 KB | Output is correct |
82 | Correct | 146 ms | 15860 KB | Output is correct |
83 | Correct | 148 ms | 15820 KB | Output is correct |
84 | Correct | 145 ms | 15868 KB | Output is correct |
85 | Correct | 158 ms | 15804 KB | Output is correct |
86 | Correct | 146 ms | 15832 KB | Output is correct |
87 | Correct | 176 ms | 15812 KB | Output is correct |
88 | Correct | 145 ms | 15812 KB | Output is correct |
89 | Correct | 152 ms | 15864 KB | Output is correct |
90 | Correct | 157 ms | 15768 KB | Output is correct |