# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
947292 | 2024-03-15T21:01:01 Z | Mer123haba456 | Bliskost (COI23_bliskost) | C++14 | 236 ms | 16656 KB |
#include<bits/stdc++.h> using namespace std; typedef long long int lli; typedef long double ld; #define N lli(2e6) #define MOD lli(1e9 + 7) #define fast_io ios_base::sync_with_stdio(0); cin.tie(0); #define heps(v) v.begin(),v.end() typedef vector<lli> vlli; typedef pair<lli,lli> plli; typedef pair<lli,plli> pplli; typedef vector<plli> vplli; typedef vector<pplli> vpplli; typedef map<lli,lli> mlli; lli t,n,m,k; string str; vector<char> bir, ik; lli topl = 0; void kont(){ if(topl % 26 == 0) printf("da\n"); else printf("ne\n"); } int main(){ scanf("%d %d", &n, &t); for(lli i = 0;i<n;i++){ char c; scanf(" %c",&c); bir.push_back(c); } for(lli i = 0;i<n;i++){ char c; scanf(" %c",&c); ik.push_back(c); if((n - i) & 1) topl += ik[i] - bir[i]; else topl -= ik[i] - bir[i]; } kont(); while(t--){ char c; scanf("%d %c", &m, &c); m--; if((n - m)&1){ topl -= ik[m] - bir[m]; topl += ik[m] - c; }else{ topl += ik[m] - bir[m]; topl -= ik[m] - c; } bir[m] = c; kont(); } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Correct | 0 ms | 388 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 424 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Correct | 0 ms | 388 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 424 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 1 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 348 KB | Output is correct |
20 | Correct | 0 ms | 428 KB | Output is correct |
21 | Correct | 0 ms | 348 KB | Output is correct |
22 | Correct | 0 ms | 600 KB | Output is correct |
23 | Correct | 0 ms | 348 KB | Output is correct |
24 | Correct | 0 ms | 348 KB | Output is correct |
25 | Correct | 0 ms | 348 KB | Output is correct |
26 | Correct | 0 ms | 348 KB | Output is correct |
27 | Correct | 0 ms | 344 KB | Output is correct |
28 | Correct | 1 ms | 348 KB | Output is correct |
29 | Correct | 0 ms | 356 KB | Output is correct |
30 | Correct | 1 ms | 344 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Correct | 0 ms | 388 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 424 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 1 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 348 KB | Output is correct |
20 | Correct | 0 ms | 428 KB | Output is correct |
21 | Correct | 0 ms | 348 KB | Output is correct |
22 | Correct | 0 ms | 600 KB | Output is correct |
23 | Correct | 0 ms | 348 KB | Output is correct |
24 | Correct | 0 ms | 348 KB | Output is correct |
25 | Correct | 0 ms | 348 KB | Output is correct |
26 | Correct | 0 ms | 348 KB | Output is correct |
27 | Correct | 0 ms | 344 KB | Output is correct |
28 | Correct | 1 ms | 348 KB | Output is correct |
29 | Correct | 0 ms | 356 KB | Output is correct |
30 | Correct | 1 ms | 344 KB | Output is correct |
31 | Correct | 68 ms | 2756 KB | Output is correct |
32 | Correct | 74 ms | 2832 KB | Output is correct |
33 | Correct | 77 ms | 2964 KB | Output is correct |
34 | Correct | 67 ms | 2756 KB | Output is correct |
35 | Correct | 71 ms | 2760 KB | Output is correct |
36 | Correct | 79 ms | 2888 KB | Output is correct |
37 | Correct | 67 ms | 2924 KB | Output is correct |
38 | Correct | 74 ms | 2780 KB | Output is correct |
39 | Correct | 66 ms | 2756 KB | Output is correct |
40 | Correct | 73 ms | 2756 KB | Output is correct |
41 | Correct | 67 ms | 2796 KB | Output is correct |
42 | Correct | 67 ms | 2756 KB | Output is correct |
43 | Correct | 69 ms | 2760 KB | Output is correct |
44 | Correct | 66 ms | 2752 KB | Output is correct |
45 | Correct | 70 ms | 2752 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Correct | 0 ms | 388 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 424 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 12 ms | 600 KB | Output is correct |
17 | Correct | 12 ms | 604 KB | Output is correct |
18 | Correct | 14 ms | 860 KB | Output is correct |
19 | Correct | 14 ms | 600 KB | Output is correct |
20 | Correct | 12 ms | 604 KB | Output is correct |
21 | Correct | 12 ms | 604 KB | Output is correct |
22 | Correct | 14 ms | 592 KB | Output is correct |
23 | Correct | 13 ms | 604 KB | Output is correct |
24 | Correct | 12 ms | 604 KB | Output is correct |
25 | Correct | 12 ms | 604 KB | Output is correct |
26 | Correct | 12 ms | 604 KB | Output is correct |
27 | Correct | 12 ms | 848 KB | Output is correct |
28 | Correct | 12 ms | 604 KB | Output is correct |
29 | Correct | 12 ms | 604 KB | Output is correct |
30 | Correct | 12 ms | 604 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Correct | 0 ms | 388 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 424 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 1 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 348 KB | Output is correct |
20 | Correct | 0 ms | 428 KB | Output is correct |
21 | Correct | 0 ms | 348 KB | Output is correct |
22 | Correct | 0 ms | 600 KB | Output is correct |
23 | Correct | 0 ms | 348 KB | Output is correct |
24 | Correct | 0 ms | 348 KB | Output is correct |
25 | Correct | 0 ms | 348 KB | Output is correct |
26 | Correct | 0 ms | 348 KB | Output is correct |
27 | Correct | 0 ms | 344 KB | Output is correct |
28 | Correct | 1 ms | 348 KB | Output is correct |
29 | Correct | 0 ms | 356 KB | Output is correct |
30 | Correct | 1 ms | 344 KB | Output is correct |
31 | Correct | 12 ms | 600 KB | Output is correct |
32 | Correct | 12 ms | 604 KB | Output is correct |
33 | Correct | 14 ms | 860 KB | Output is correct |
34 | Correct | 14 ms | 600 KB | Output is correct |
35 | Correct | 12 ms | 604 KB | Output is correct |
36 | Correct | 12 ms | 604 KB | Output is correct |
37 | Correct | 14 ms | 592 KB | Output is correct |
38 | Correct | 13 ms | 604 KB | Output is correct |
39 | Correct | 12 ms | 604 KB | Output is correct |
40 | Correct | 12 ms | 604 KB | Output is correct |
41 | Correct | 12 ms | 604 KB | Output is correct |
42 | Correct | 12 ms | 848 KB | Output is correct |
43 | Correct | 12 ms | 604 KB | Output is correct |
44 | Correct | 12 ms | 604 KB | Output is correct |
45 | Correct | 12 ms | 604 KB | Output is correct |
46 | Correct | 12 ms | 604 KB | Output is correct |
47 | Correct | 13 ms | 604 KB | Output is correct |
48 | Correct | 13 ms | 604 KB | Output is correct |
49 | Correct | 16 ms | 604 KB | Output is correct |
50 | Correct | 13 ms | 600 KB | Output is correct |
51 | Correct | 13 ms | 604 KB | Output is correct |
52 | Correct | 13 ms | 604 KB | Output is correct |
53 | Correct | 13 ms | 604 KB | Output is correct |
54 | Correct | 13 ms | 604 KB | Output is correct |
55 | Correct | 13 ms | 584 KB | Output is correct |
56 | Correct | 14 ms | 604 KB | Output is correct |
57 | Correct | 13 ms | 600 KB | Output is correct |
58 | Correct | 13 ms | 608 KB | Output is correct |
59 | Correct | 16 ms | 604 KB | Output is correct |
60 | Correct | 13 ms | 544 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 0 ms | 348 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 344 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 0 ms | 344 KB | Output is correct |
10 | Correct | 0 ms | 344 KB | Output is correct |
11 | Correct | 0 ms | 388 KB | Output is correct |
12 | Correct | 0 ms | 348 KB | Output is correct |
13 | Correct | 0 ms | 348 KB | Output is correct |
14 | Correct | 0 ms | 424 KB | Output is correct |
15 | Correct | 0 ms | 348 KB | Output is correct |
16 | Correct | 0 ms | 344 KB | Output is correct |
17 | Correct | 1 ms | 348 KB | Output is correct |
18 | Correct | 0 ms | 348 KB | Output is correct |
19 | Correct | 0 ms | 348 KB | Output is correct |
20 | Correct | 0 ms | 428 KB | Output is correct |
21 | Correct | 0 ms | 348 KB | Output is correct |
22 | Correct | 0 ms | 600 KB | Output is correct |
23 | Correct | 0 ms | 348 KB | Output is correct |
24 | Correct | 0 ms | 348 KB | Output is correct |
25 | Correct | 0 ms | 348 KB | Output is correct |
26 | Correct | 0 ms | 348 KB | Output is correct |
27 | Correct | 0 ms | 344 KB | Output is correct |
28 | Correct | 1 ms | 348 KB | Output is correct |
29 | Correct | 0 ms | 356 KB | Output is correct |
30 | Correct | 1 ms | 344 KB | Output is correct |
31 | Correct | 68 ms | 2756 KB | Output is correct |
32 | Correct | 74 ms | 2832 KB | Output is correct |
33 | Correct | 77 ms | 2964 KB | Output is correct |
34 | Correct | 67 ms | 2756 KB | Output is correct |
35 | Correct | 71 ms | 2760 KB | Output is correct |
36 | Correct | 79 ms | 2888 KB | Output is correct |
37 | Correct | 67 ms | 2924 KB | Output is correct |
38 | Correct | 74 ms | 2780 KB | Output is correct |
39 | Correct | 66 ms | 2756 KB | Output is correct |
40 | Correct | 73 ms | 2756 KB | Output is correct |
41 | Correct | 67 ms | 2796 KB | Output is correct |
42 | Correct | 67 ms | 2756 KB | Output is correct |
43 | Correct | 69 ms | 2760 KB | Output is correct |
44 | Correct | 66 ms | 2752 KB | Output is correct |
45 | Correct | 70 ms | 2752 KB | Output is correct |
46 | Correct | 12 ms | 600 KB | Output is correct |
47 | Correct | 12 ms | 604 KB | Output is correct |
48 | Correct | 14 ms | 860 KB | Output is correct |
49 | Correct | 14 ms | 600 KB | Output is correct |
50 | Correct | 12 ms | 604 KB | Output is correct |
51 | Correct | 12 ms | 604 KB | Output is correct |
52 | Correct | 14 ms | 592 KB | Output is correct |
53 | Correct | 13 ms | 604 KB | Output is correct |
54 | Correct | 12 ms | 604 KB | Output is correct |
55 | Correct | 12 ms | 604 KB | Output is correct |
56 | Correct | 12 ms | 604 KB | Output is correct |
57 | Correct | 12 ms | 848 KB | Output is correct |
58 | Correct | 12 ms | 604 KB | Output is correct |
59 | Correct | 12 ms | 604 KB | Output is correct |
60 | Correct | 12 ms | 604 KB | Output is correct |
61 | Correct | 12 ms | 604 KB | Output is correct |
62 | Correct | 13 ms | 604 KB | Output is correct |
63 | Correct | 13 ms | 604 KB | Output is correct |
64 | Correct | 16 ms | 604 KB | Output is correct |
65 | Correct | 13 ms | 600 KB | Output is correct |
66 | Correct | 13 ms | 604 KB | Output is correct |
67 | Correct | 13 ms | 604 KB | Output is correct |
68 | Correct | 13 ms | 604 KB | Output is correct |
69 | Correct | 13 ms | 604 KB | Output is correct |
70 | Correct | 13 ms | 584 KB | Output is correct |
71 | Correct | 14 ms | 604 KB | Output is correct |
72 | Correct | 13 ms | 600 KB | Output is correct |
73 | Correct | 13 ms | 608 KB | Output is correct |
74 | Correct | 16 ms | 604 KB | Output is correct |
75 | Correct | 13 ms | 544 KB | Output is correct |
76 | Correct | 205 ms | 6676 KB | Output is correct |
77 | Correct | 209 ms | 15948 KB | Output is correct |
78 | Correct | 208 ms | 16116 KB | Output is correct |
79 | Correct | 236 ms | 15992 KB | Output is correct |
80 | Correct | 211 ms | 15940 KB | Output is correct |
81 | Correct | 209 ms | 15940 KB | Output is correct |
82 | Correct | 209 ms | 15940 KB | Output is correct |
83 | Correct | 208 ms | 15948 KB | Output is correct |
84 | Correct | 219 ms | 16656 KB | Output is correct |
85 | Correct | 207 ms | 15948 KB | Output is correct |
86 | Correct | 224 ms | 16128 KB | Output is correct |
87 | Correct | 208 ms | 15940 KB | Output is correct |
88 | Correct | 230 ms | 15976 KB | Output is correct |
89 | Correct | 230 ms | 16132 KB | Output is correct |
90 | Correct | 216 ms | 16320 KB | Output is correct |