# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
810549 | 2023-08-06T10:59:52 Z | rainboy | Bliskost (COI23_bliskost) | C | 182 ms | 15868 KB |
#include <stdio.h> #define N 1000000 int main() { static char aa[N + 1], bb[N + 1]; int n, q, i, d; scanf("%d%d%s%s", &n, &q, aa, bb); if (n == 1) { printf(aa[0] == bb[0] ? "da\n" : "ne\n"); while (q--) { static char s[2]; scanf("%d%s", &i, s), i--; aa[i] = s[0]; printf(aa[0] == bb[0] ? "da\n" : "ne\n"); } } else { d = 0; for (i = 0; i < n; i++) d = (d + (aa[i] - 'a') * (i % 2 == 0 ? 1 : -1)) % 26; for (i = 0; i < n; i++) d = (d - (bb[i] - 'a') * (i % 2 == 0 ? 1 : -1)) % 26; printf(d == 0 ? "da\n" : "ne\n"); while (q--) { static char s[2]; scanf("%d%s", &i, s), i--; d = (d - (aa[i] - 'a') * (i % 2 == 0 ? 1 : -1)) % 26; aa[i] = s[0]; d = (d + (aa[i] - 'a') * (i % 2 == 0 ? 1 : -1)) % 26; printf(d == 0 ? "da\n" : "ne\n"); } } return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 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 | 0 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 | 1 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 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 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 | 0 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 | 1 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 | 1 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 | 1 ms | 212 KB | Output is correct |
20 | Correct | 1 ms | 212 KB | Output is correct |
21 | Correct | 1 ms | 212 KB | Output is correct |
22 | Correct | 1 ms | 212 KB | Output is correct |
23 | Correct | 1 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 | 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 |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 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 | 0 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 | 1 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 | 1 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 | 1 ms | 212 KB | Output is correct |
20 | Correct | 1 ms | 212 KB | Output is correct |
21 | Correct | 1 ms | 212 KB | Output is correct |
22 | Correct | 1 ms | 212 KB | Output is correct |
23 | Correct | 1 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 | 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 | 22 ms | 2864 KB | Output is correct |
32 | Correct | 30 ms | 3180 KB | Output is correct |
33 | Correct | 17 ms | 3928 KB | Output is correct |
34 | Correct | 19 ms | 3532 KB | Output is correct |
35 | Correct | 16 ms | 3948 KB | Output is correct |
36 | Correct | 12 ms | 4052 KB | Output is correct |
37 | Correct | 14 ms | 4100 KB | Output is correct |
38 | Correct | 13 ms | 4084 KB | Output is correct |
39 | Correct | 12 ms | 4096 KB | Output is correct |
40 | Correct | 12 ms | 4180 KB | Output is correct |
41 | Correct | 12 ms | 4124 KB | Output is correct |
42 | Correct | 12 ms | 4100 KB | Output is correct |
43 | Correct | 12 ms | 4188 KB | Output is correct |
44 | Correct | 12 ms | 4104 KB | Output is correct |
45 | Correct | 12 ms | 4152 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 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 | 0 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 | 1 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 | 872 KB | Output is correct |
17 | Correct | 13 ms | 980 KB | Output is correct |
18 | Correct | 16 ms | 932 KB | Output is correct |
19 | Correct | 13 ms | 916 KB | Output is correct |
20 | Correct | 13 ms | 868 KB | Output is correct |
21 | Correct | 13 ms | 892 KB | Output is correct |
22 | Correct | 13 ms | 932 KB | Output is correct |
23 | Correct | 13 ms | 924 KB | Output is correct |
24 | Correct | 16 ms | 980 KB | Output is correct |
25 | Correct | 14 ms | 952 KB | Output is correct |
26 | Correct | 13 ms | 968 KB | Output is correct |
27 | Correct | 14 ms | 896 KB | Output is correct |
28 | Correct | 13 ms | 972 KB | Output is correct |
29 | Correct | 13 ms | 980 KB | Output is correct |
30 | Correct | 14 ms | 876 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 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 | 0 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 | 1 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 | 1 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 | 1 ms | 212 KB | Output is correct |
20 | Correct | 1 ms | 212 KB | Output is correct |
21 | Correct | 1 ms | 212 KB | Output is correct |
22 | Correct | 1 ms | 212 KB | Output is correct |
23 | Correct | 1 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 | 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 | 13 ms | 872 KB | Output is correct |
32 | Correct | 13 ms | 980 KB | Output is correct |
33 | Correct | 16 ms | 932 KB | Output is correct |
34 | Correct | 13 ms | 916 KB | Output is correct |
35 | Correct | 13 ms | 868 KB | Output is correct |
36 | Correct | 13 ms | 892 KB | Output is correct |
37 | Correct | 13 ms | 932 KB | Output is correct |
38 | Correct | 13 ms | 924 KB | Output is correct |
39 | Correct | 16 ms | 980 KB | Output is correct |
40 | Correct | 14 ms | 952 KB | Output is correct |
41 | Correct | 13 ms | 968 KB | Output is correct |
42 | Correct | 14 ms | 896 KB | Output is correct |
43 | Correct | 13 ms | 972 KB | Output is correct |
44 | Correct | 13 ms | 980 KB | Output is correct |
45 | Correct | 14 ms | 876 KB | Output is correct |
46 | Correct | 16 ms | 1108 KB | Output is correct |
47 | Correct | 15 ms | 1108 KB | Output is correct |
48 | Correct | 19 ms | 1108 KB | Output is correct |
49 | Correct | 14 ms | 1076 KB | Output is correct |
50 | Correct | 14 ms | 1088 KB | Output is correct |
51 | Correct | 18 ms | 1052 KB | Output is correct |
52 | Correct | 14 ms | 1072 KB | Output is correct |
53 | Correct | 14 ms | 1080 KB | Output is correct |
54 | Correct | 15 ms | 1092 KB | Output is correct |
55 | Correct | 14 ms | 1044 KB | Output is correct |
56 | Correct | 17 ms | 1084 KB | Output is correct |
57 | Correct | 14 ms | 1088 KB | Output is correct |
58 | Correct | 14 ms | 1100 KB | Output is correct |
59 | Correct | 14 ms | 1108 KB | Output is correct |
60 | Correct | 14 ms | 1172 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 212 KB | Output is correct |
2 | Correct | 1 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 | 0 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 | 1 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 | 1 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 | 1 ms | 212 KB | Output is correct |
20 | Correct | 1 ms | 212 KB | Output is correct |
21 | Correct | 1 ms | 212 KB | Output is correct |
22 | Correct | 1 ms | 212 KB | Output is correct |
23 | Correct | 1 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 | 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 | 22 ms | 2864 KB | Output is correct |
32 | Correct | 30 ms | 3180 KB | Output is correct |
33 | Correct | 17 ms | 3928 KB | Output is correct |
34 | Correct | 19 ms | 3532 KB | Output is correct |
35 | Correct | 16 ms | 3948 KB | Output is correct |
36 | Correct | 12 ms | 4052 KB | Output is correct |
37 | Correct | 14 ms | 4100 KB | Output is correct |
38 | Correct | 13 ms | 4084 KB | Output is correct |
39 | Correct | 12 ms | 4096 KB | Output is correct |
40 | Correct | 12 ms | 4180 KB | Output is correct |
41 | Correct | 12 ms | 4124 KB | Output is correct |
42 | Correct | 12 ms | 4100 KB | Output is correct |
43 | Correct | 12 ms | 4188 KB | Output is correct |
44 | Correct | 12 ms | 4104 KB | Output is correct |
45 | Correct | 12 ms | 4152 KB | Output is correct |
46 | Correct | 13 ms | 872 KB | Output is correct |
47 | Correct | 13 ms | 980 KB | Output is correct |
48 | Correct | 16 ms | 932 KB | Output is correct |
49 | Correct | 13 ms | 916 KB | Output is correct |
50 | Correct | 13 ms | 868 KB | Output is correct |
51 | Correct | 13 ms | 892 KB | Output is correct |
52 | Correct | 13 ms | 932 KB | Output is correct |
53 | Correct | 13 ms | 924 KB | Output is correct |
54 | Correct | 16 ms | 980 KB | Output is correct |
55 | Correct | 14 ms | 952 KB | Output is correct |
56 | Correct | 13 ms | 968 KB | Output is correct |
57 | Correct | 14 ms | 896 KB | Output is correct |
58 | Correct | 13 ms | 972 KB | Output is correct |
59 | Correct | 13 ms | 980 KB | Output is correct |
60 | Correct | 14 ms | 876 KB | Output is correct |
61 | Correct | 16 ms | 1108 KB | Output is correct |
62 | Correct | 15 ms | 1108 KB | Output is correct |
63 | Correct | 19 ms | 1108 KB | Output is correct |
64 | Correct | 14 ms | 1076 KB | Output is correct |
65 | Correct | 14 ms | 1088 KB | Output is correct |
66 | Correct | 18 ms | 1052 KB | Output is correct |
67 | Correct | 14 ms | 1072 KB | Output is correct |
68 | Correct | 14 ms | 1080 KB | Output is correct |
69 | Correct | 15 ms | 1092 KB | Output is correct |
70 | Correct | 14 ms | 1044 KB | Output is correct |
71 | Correct | 17 ms | 1084 KB | Output is correct |
72 | Correct | 14 ms | 1088 KB | Output is correct |
73 | Correct | 14 ms | 1100 KB | Output is correct |
74 | Correct | 14 ms | 1108 KB | Output is correct |
75 | Correct | 14 ms | 1172 KB | Output is correct |
76 | Correct | 174 ms | 15776 KB | Output is correct |
77 | Correct | 168 ms | 15728 KB | Output is correct |
78 | Correct | 163 ms | 15732 KB | Output is correct |
79 | Correct | 166 ms | 15868 KB | Output is correct |
80 | Correct | 160 ms | 15828 KB | Output is correct |
81 | Correct | 162 ms | 15820 KB | Output is correct |
82 | Correct | 160 ms | 15792 KB | Output is correct |
83 | Correct | 158 ms | 15416 KB | Output is correct |
84 | Correct | 167 ms | 15632 KB | Output is correct |
85 | Correct | 157 ms | 15804 KB | Output is correct |
86 | Correct | 161 ms | 15700 KB | Output is correct |
87 | Correct | 158 ms | 15536 KB | Output is correct |
88 | Correct | 159 ms | 15628 KB | Output is correct |
89 | Correct | 182 ms | 15416 KB | Output is correct |
90 | Correct | 161 ms | 15800 KB | Output is correct |