답안 #954461

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
954461 2024-03-28T01:58:40 Z GrandTiger1729 Bliskost (COI23_bliskost) C++17
57 / 100
1000 ms 8800 KB
#include <bits/stdc++.h>
using namespace std;

const int K = 26;
int main()
{
    cin.tie(0)->sync_with_stdio(0);
    int n, q;
    cin >> n >> q;
    string a, b;
    cin >> a >> b;
    vector<int> c(n);
    for (int i = 0; i < n; i++)
    {
        c[i] = (b[i] - a[i] + K) % K;
    }
    int cur = 0;
    for (int i = 0; i < n; i++)
    {
        cur = c[i] - cur;
    }
    cur %= K;
    cout << (cur == 0 ? "da" : "ne") << '\n';
    while (q--)
    {
        int j;
        char x;
        cin >> j >> x;
        j--;
        a[j] = x;
        c[j] = (b[j] - a[j] + K) % K;
        cur = 0;
        for (int i = 0; i < n; i++)
        {
            cur = c[i] - cur;
        }
        cur %= K;
        cout << (cur == 0 ? "da" : "ne") << '\n';
    }
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 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 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 452 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 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 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 452 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 1 ms 344 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 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 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 452 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 1 ms 344 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 8 ms 8332 KB Output is correct
32 Correct 7 ms 8388 KB Output is correct
33 Correct 8 ms 8384 KB Output is correct
34 Correct 7 ms 8344 KB Output is correct
35 Correct 7 ms 8420 KB Output is correct
36 Correct 7 ms 8692 KB Output is correct
37 Correct 7 ms 8692 KB Output is correct
38 Correct 6 ms 8348 KB Output is correct
39 Correct 7 ms 8680 KB Output is correct
40 Correct 6 ms 8800 KB Output is correct
41 Correct 6 ms 8344 KB Output is correct
42 Correct 7 ms 8384 KB Output is correct
43 Correct 8 ms 8692 KB Output is correct
44 Correct 8 ms 8400 KB Output is correct
45 Correct 7 ms 8212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 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 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 452 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 9 ms 920 KB Output is correct
17 Correct 9 ms 1092 KB Output is correct
18 Correct 9 ms 1116 KB Output is correct
19 Correct 11 ms 1116 KB Output is correct
20 Correct 12 ms 1116 KB Output is correct
21 Correct 12 ms 1116 KB Output is correct
22 Correct 10 ms 1116 KB Output is correct
23 Correct 9 ms 1112 KB Output is correct
24 Correct 9 ms 1112 KB Output is correct
25 Correct 10 ms 1112 KB Output is correct
26 Correct 10 ms 1116 KB Output is correct
27 Correct 9 ms 1116 KB Output is correct
28 Correct 9 ms 1116 KB Output is correct
29 Correct 9 ms 1112 KB Output is correct
30 Correct 10 ms 1116 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 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 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 452 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 1 ms 344 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 9 ms 920 KB Output is correct
32 Correct 9 ms 1092 KB Output is correct
33 Correct 9 ms 1116 KB Output is correct
34 Correct 11 ms 1116 KB Output is correct
35 Correct 12 ms 1116 KB Output is correct
36 Correct 12 ms 1116 KB Output is correct
37 Correct 10 ms 1116 KB Output is correct
38 Correct 9 ms 1112 KB Output is correct
39 Correct 9 ms 1112 KB Output is correct
40 Correct 10 ms 1112 KB Output is correct
41 Correct 10 ms 1116 KB Output is correct
42 Correct 9 ms 1116 KB Output is correct
43 Correct 9 ms 1116 KB Output is correct
44 Correct 9 ms 1112 KB Output is correct
45 Correct 10 ms 1116 KB Output is correct
46 Correct 60 ms 1108 KB Output is correct
47 Correct 45 ms 1116 KB Output is correct
48 Correct 42 ms 1292 KB Output is correct
49 Correct 44 ms 1104 KB Output is correct
50 Correct 44 ms 1424 KB Output is correct
51 Correct 53 ms 1092 KB Output is correct
52 Correct 44 ms 1116 KB Output is correct
53 Correct 42 ms 1108 KB Output is correct
54 Correct 43 ms 1336 KB Output is correct
55 Correct 43 ms 1104 KB Output is correct
56 Correct 43 ms 1112 KB Output is correct
57 Correct 43 ms 1204 KB Output is correct
58 Correct 46 ms 1104 KB Output is correct
59 Correct 44 ms 1116 KB Output is correct
60 Correct 42 ms 1260 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 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 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 1 ms 348 KB Output is correct
9 Correct 1 ms 344 KB Output is correct
10 Correct 1 ms 348 KB Output is correct
11 Correct 0 ms 452 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 0 ms 344 KB Output is correct
15 Correct 1 ms 348 KB Output is correct
16 Correct 0 ms 344 KB Output is correct
17 Correct 0 ms 348 KB Output is correct
18 Correct 0 ms 348 KB Output is correct
19 Correct 1 ms 344 KB Output is correct
20 Correct 1 ms 348 KB Output is correct
21 Correct 0 ms 348 KB Output is correct
22 Correct 1 ms 348 KB Output is correct
23 Correct 0 ms 348 KB Output is correct
24 Correct 0 ms 348 KB Output is correct
25 Correct 1 ms 348 KB Output is correct
26 Correct 1 ms 344 KB Output is correct
27 Correct 0 ms 348 KB Output is correct
28 Correct 0 ms 348 KB Output is correct
29 Correct 1 ms 348 KB Output is correct
30 Correct 0 ms 348 KB Output is correct
31 Correct 8 ms 8332 KB Output is correct
32 Correct 7 ms 8388 KB Output is correct
33 Correct 8 ms 8384 KB Output is correct
34 Correct 7 ms 8344 KB Output is correct
35 Correct 7 ms 8420 KB Output is correct
36 Correct 7 ms 8692 KB Output is correct
37 Correct 7 ms 8692 KB Output is correct
38 Correct 6 ms 8348 KB Output is correct
39 Correct 7 ms 8680 KB Output is correct
40 Correct 6 ms 8800 KB Output is correct
41 Correct 6 ms 8344 KB Output is correct
42 Correct 7 ms 8384 KB Output is correct
43 Correct 8 ms 8692 KB Output is correct
44 Correct 8 ms 8400 KB Output is correct
45 Correct 7 ms 8212 KB Output is correct
46 Correct 9 ms 920 KB Output is correct
47 Correct 9 ms 1092 KB Output is correct
48 Correct 9 ms 1116 KB Output is correct
49 Correct 11 ms 1116 KB Output is correct
50 Correct 12 ms 1116 KB Output is correct
51 Correct 12 ms 1116 KB Output is correct
52 Correct 10 ms 1116 KB Output is correct
53 Correct 9 ms 1112 KB Output is correct
54 Correct 9 ms 1112 KB Output is correct
55 Correct 10 ms 1112 KB Output is correct
56 Correct 10 ms 1116 KB Output is correct
57 Correct 9 ms 1116 KB Output is correct
58 Correct 9 ms 1116 KB Output is correct
59 Correct 9 ms 1112 KB Output is correct
60 Correct 10 ms 1116 KB Output is correct
61 Correct 60 ms 1108 KB Output is correct
62 Correct 45 ms 1116 KB Output is correct
63 Correct 42 ms 1292 KB Output is correct
64 Correct 44 ms 1104 KB Output is correct
65 Correct 44 ms 1424 KB Output is correct
66 Correct 53 ms 1092 KB Output is correct
67 Correct 44 ms 1116 KB Output is correct
68 Correct 42 ms 1108 KB Output is correct
69 Correct 43 ms 1336 KB Output is correct
70 Correct 43 ms 1104 KB Output is correct
71 Correct 43 ms 1112 KB Output is correct
72 Correct 43 ms 1204 KB Output is correct
73 Correct 46 ms 1104 KB Output is correct
74 Correct 44 ms 1116 KB Output is correct
75 Correct 42 ms 1260 KB Output is correct
76 Execution timed out 1096 ms 8588 KB Time limit exceeded
77 Halted 0 ms 0 KB -