Submission #948077

# Submission time Handle Problem Language Result Execution time Memory
948077 2024-03-17T14:49:51 Z Abito Bliskost (COI23_bliskost) C++17
57 / 100
1000 ms 6488 KB
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define ppb pop_back
#define ep insert
#define endl '\n'
#define elif else if
#define pow pwr
#define sqrt sqrtt
//#define int long long
#define ll long long
typedef unsigned long long ull;
using namespace std;
const int N=1e6+5;
int n,q,a[N];
char s[N],z[N];
int32_t main(){
    ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
    cin>>n>>q;
    for (int i=1;i<=n;i++) cin>>s[i];
    for (int i=1;i<=n;i++) cin>>z[i];
    for (int i=1;i<=n;i++) a[i]=((z[i]-'a')-(s[i]-'a')+26)%26;
    for (int Q=0;Q<=q;Q++){
        if (Q){
            int i;char c;
            cin>>i>>c;
            s[i]=c;
            a[i]=((z[i]-'a')-(s[i]-'a')+26)%26;
        }
        //for (int i=1;i<=n;i++) cout<<a[i]<<' ';cout<<endl;
        int p=0;
        for (int i=1;i<n;i++) p=26-a[i]-p;
        p+=26*10000000;
        p%=26;
        if ((a[n]+p)%26) cout<<"ne"<<endl;
        else cout<<"da"<<endl;
    }
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2392 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 1 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2392 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2392 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 1 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2392 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 1 ms 2648 KB Output is correct
17 Correct 1 ms 2548 KB Output is correct
18 Correct 0 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 0 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 2396 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 1 ms 2444 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2396 KB Output is correct
30 Correct 0 ms 2396 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2392 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 1 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2392 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 1 ms 2648 KB Output is correct
17 Correct 1 ms 2548 KB Output is correct
18 Correct 0 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 0 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 2396 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 1 ms 2444 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2396 KB Output is correct
30 Correct 0 ms 2396 KB Output is correct
31 Correct 24 ms 6236 KB Output is correct
32 Correct 21 ms 6280 KB Output is correct
33 Correct 24 ms 6096 KB Output is correct
34 Correct 20 ms 6268 KB Output is correct
35 Correct 20 ms 6236 KB Output is correct
36 Correct 20 ms 6096 KB Output is correct
37 Correct 21 ms 6224 KB Output is correct
38 Correct 21 ms 6256 KB Output is correct
39 Correct 20 ms 6232 KB Output is correct
40 Correct 20 ms 6236 KB Output is correct
41 Correct 31 ms 6228 KB Output is correct
42 Correct 20 ms 6064 KB Output is correct
43 Correct 20 ms 6232 KB Output is correct
44 Correct 20 ms 6176 KB Output is correct
45 Correct 20 ms 6488 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2392 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 1 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2392 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 10 ms 2652 KB Output is correct
17 Correct 12 ms 2648 KB Output is correct
18 Correct 13 ms 2652 KB Output is correct
19 Correct 10 ms 2648 KB Output is correct
20 Correct 9 ms 2652 KB Output is correct
21 Correct 9 ms 2808 KB Output is correct
22 Correct 10 ms 2652 KB Output is correct
23 Correct 11 ms 2648 KB Output is correct
24 Correct 10 ms 2652 KB Output is correct
25 Correct 10 ms 2652 KB Output is correct
26 Correct 10 ms 2652 KB Output is correct
27 Correct 10 ms 2648 KB Output is correct
28 Correct 14 ms 2648 KB Output is correct
29 Correct 10 ms 2748 KB Output is correct
30 Correct 10 ms 2652 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2392 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 1 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2392 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 1 ms 2648 KB Output is correct
17 Correct 1 ms 2548 KB Output is correct
18 Correct 0 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 0 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 2396 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 1 ms 2444 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2396 KB Output is correct
30 Correct 0 ms 2396 KB Output is correct
31 Correct 10 ms 2652 KB Output is correct
32 Correct 12 ms 2648 KB Output is correct
33 Correct 13 ms 2652 KB Output is correct
34 Correct 10 ms 2648 KB Output is correct
35 Correct 9 ms 2652 KB Output is correct
36 Correct 9 ms 2808 KB Output is correct
37 Correct 10 ms 2652 KB Output is correct
38 Correct 11 ms 2648 KB Output is correct
39 Correct 10 ms 2652 KB Output is correct
40 Correct 10 ms 2652 KB Output is correct
41 Correct 10 ms 2652 KB Output is correct
42 Correct 10 ms 2648 KB Output is correct
43 Correct 14 ms 2648 KB Output is correct
44 Correct 10 ms 2748 KB Output is correct
45 Correct 10 ms 2652 KB Output is correct
46 Correct 66 ms 2676 KB Output is correct
47 Correct 63 ms 2672 KB Output is correct
48 Correct 64 ms 2648 KB Output is correct
49 Correct 62 ms 2644 KB Output is correct
50 Correct 63 ms 2592 KB Output is correct
51 Correct 64 ms 2596 KB Output is correct
52 Correct 66 ms 2744 KB Output is correct
53 Correct 61 ms 2612 KB Output is correct
54 Correct 63 ms 2596 KB Output is correct
55 Correct 62 ms 2640 KB Output is correct
56 Correct 70 ms 2844 KB Output is correct
57 Correct 63 ms 2644 KB Output is correct
58 Correct 74 ms 2568 KB Output is correct
59 Correct 71 ms 2644 KB Output is correct
60 Correct 63 ms 2640 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2396 KB Output is correct
2 Correct 1 ms 2396 KB Output is correct
3 Correct 1 ms 2396 KB Output is correct
4 Correct 1 ms 2392 KB Output is correct
5 Correct 1 ms 2396 KB Output is correct
6 Correct 1 ms 2396 KB Output is correct
7 Correct 1 ms 2396 KB Output is correct
8 Correct 0 ms 2396 KB Output is correct
9 Correct 1 ms 2396 KB Output is correct
10 Correct 1 ms 2396 KB Output is correct
11 Correct 1 ms 2396 KB Output is correct
12 Correct 0 ms 2396 KB Output is correct
13 Correct 1 ms 2392 KB Output is correct
14 Correct 1 ms 2396 KB Output is correct
15 Correct 1 ms 2396 KB Output is correct
16 Correct 1 ms 2648 KB Output is correct
17 Correct 1 ms 2548 KB Output is correct
18 Correct 0 ms 2396 KB Output is correct
19 Correct 1 ms 2396 KB Output is correct
20 Correct 0 ms 2396 KB Output is correct
21 Correct 1 ms 2396 KB Output is correct
22 Correct 1 ms 2396 KB Output is correct
23 Correct 0 ms 2396 KB Output is correct
24 Correct 1 ms 2444 KB Output is correct
25 Correct 1 ms 2396 KB Output is correct
26 Correct 1 ms 2396 KB Output is correct
27 Correct 0 ms 2396 KB Output is correct
28 Correct 1 ms 2396 KB Output is correct
29 Correct 1 ms 2396 KB Output is correct
30 Correct 0 ms 2396 KB Output is correct
31 Correct 24 ms 6236 KB Output is correct
32 Correct 21 ms 6280 KB Output is correct
33 Correct 24 ms 6096 KB Output is correct
34 Correct 20 ms 6268 KB Output is correct
35 Correct 20 ms 6236 KB Output is correct
36 Correct 20 ms 6096 KB Output is correct
37 Correct 21 ms 6224 KB Output is correct
38 Correct 21 ms 6256 KB Output is correct
39 Correct 20 ms 6232 KB Output is correct
40 Correct 20 ms 6236 KB Output is correct
41 Correct 31 ms 6228 KB Output is correct
42 Correct 20 ms 6064 KB Output is correct
43 Correct 20 ms 6232 KB Output is correct
44 Correct 20 ms 6176 KB Output is correct
45 Correct 20 ms 6488 KB Output is correct
46 Correct 10 ms 2652 KB Output is correct
47 Correct 12 ms 2648 KB Output is correct
48 Correct 13 ms 2652 KB Output is correct
49 Correct 10 ms 2648 KB Output is correct
50 Correct 9 ms 2652 KB Output is correct
51 Correct 9 ms 2808 KB Output is correct
52 Correct 10 ms 2652 KB Output is correct
53 Correct 11 ms 2648 KB Output is correct
54 Correct 10 ms 2652 KB Output is correct
55 Correct 10 ms 2652 KB Output is correct
56 Correct 10 ms 2652 KB Output is correct
57 Correct 10 ms 2648 KB Output is correct
58 Correct 14 ms 2648 KB Output is correct
59 Correct 10 ms 2748 KB Output is correct
60 Correct 10 ms 2652 KB Output is correct
61 Correct 66 ms 2676 KB Output is correct
62 Correct 63 ms 2672 KB Output is correct
63 Correct 64 ms 2648 KB Output is correct
64 Correct 62 ms 2644 KB Output is correct
65 Correct 63 ms 2592 KB Output is correct
66 Correct 64 ms 2596 KB Output is correct
67 Correct 66 ms 2744 KB Output is correct
68 Correct 61 ms 2612 KB Output is correct
69 Correct 63 ms 2596 KB Output is correct
70 Correct 62 ms 2640 KB Output is correct
71 Correct 70 ms 2844 KB Output is correct
72 Correct 63 ms 2644 KB Output is correct
73 Correct 74 ms 2568 KB Output is correct
74 Correct 71 ms 2644 KB Output is correct
75 Correct 63 ms 2640 KB Output is correct
76 Execution timed out 1016 ms 6308 KB Time limit exceeded
77 Halted 0 ms 0 KB -