Submission #529987

#TimeUsernameProblemLanguageResultExecution timeMemory
529987c28dnv9q3Crossing (JOI21_crossing)C++17
26 / 100
2704 ms7452 KiB
#include <iostream> using namespace std; const int MAX_Q = 200'005; int n, q; string str1, str2, str3, t; int l[MAX_Q], r[MAX_Q]; char c[MAX_Q]; char cross(char a, char b) { if(a == b) { return a; } if('J' != a && 'J' != b) { return 'J'; } if('O' != a && 'O' != b) { return 'O'; } return 'I'; } int main() { cin >> n >> str1 >> str2 >> str3 >> q >> t; cout << ((str1 == t) ? "Yes" : "No") << "\n"; for(int i = 0; i < q; ++i) { cin >> l[i] >> r[i] >> c[i]; fill(t.begin() + l[i] - 1, t.begin() + r[i], c[i]); cout << ((str1 == t) ? "Yes" : "No") << "\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...