Submission #1015912

#TimeUsernameProblemLanguageResultExecution timeMemory
1015912isaachewBliskost (COI23_bliskost)C++17
100 / 100
118 ms16464 KiB
#include <bits/stdc++.h> int main(){ std::ios::sync_with_stdio(0); std::cin.tie(0); int n,q; std::cin>>n>>q; std::string st1,st2; std::cin>>st1>>st2; int taltsum=0; for(int i=0;i<n;i++){ taltsum+=i%2?-st1[i]:st1[i]; taltsum-=i%2?-st2[i]:st2[i]; } std::cout<<(taltsum%26==0?"da\n":"ne\n"); for(int i=0;i<q;i++){ int a; char c; std::cin>>a>>c; a--; taltsum-=a%2?-st1[a]:st1[a]; st1[a]=c; taltsum+=a%2?-c:c; std::cout<<(taltsum%26==0?"da\n":"ne\n"); } }
#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...