#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define int long long
string goal;
string durum;
void Benzer() {
for (size_t i = 0; i < goal.length() - 1; ++i) {
if ((goal[i] + 1 == goal[i + 1]) && (durum[i] + 1 == durum[i + 1])) {
continue;
}
if (goal[i] != durum[i] || goal[i + 1] != durum[i + 1]) {
cout<<"ne";
return;
}
}
cout<<"da";
return;
}
void Change(int index,char newChar) {
durum[index] = newChar;
}
int32_t main() {
int Lenght,reform,i;
char c;
cin>>Lenght>>reform;
cin>>durum>>goal;
Benzer();
while (reform--)
{
cin>>i>>c;
Change(i,c);
Benzer();
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
1 ms |
336 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |