Submission #872596

#TimeUsernameProblemLanguageResultExecution timeMemory
872596ZeroMutating DNA (IOI21_dna)C++17
0 / 100
33 ms3976 KiB
#include <bits/stdc++.h> #define pb push_back using namespace std; bool mo = false; string xx,yy; void init(std::string a, std::string b) { xx = a; yy = b; } int get_distance(int x, int y) { if(mo)return -1; int c = 0; for(int i=x; i<=y; i ++){ if(xx[i] != yy[i]) c++; } map<char,int> q,w; for(int i=x; i<=y; i++) q[xx[i]]++,w[yy[i]]++; if(q != w) { return -1; } return c-1; } // int main(){ // string a,b; cin >> a >> b; // init(a,b); // int q; cin >> q; // while(q--){ // int x,y; cin >> x >> y; // cout << get_distance(x,y) << '\n'; // } // 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...