This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |