Submission #1112550

#TimeUsernameProblemLanguageResultExecution timeMemory
1112550vjudge1Bliskost (COI23_bliskost)C++17
0 / 100
1 ms336 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...