Submission #1015910

#TimeUsernameProblemLanguageResultExecution timeMemory
1015910isaachewBliskost (COI23_bliskost)C++17
57 / 100
1022 ms14140 KiB
#include <bits/stdc++.h> int main(){ 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...