#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;
}
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;
}
cout << (cur == 0 ? "da" : "ne") << '\n';
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |