Submission #529977

# Submission time Handle Problem Language Result Execution time Memory
529977 2022-02-24T08:45:06 Z c28dnv9q3 Crossing (JOI21_crossing) C++17
0 / 100
323 ms 4400 KB
#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;
    cin >> str1 >> str2 >> str3;
    cin >> 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] - 1, c[i]);
        cout << ((str1 == t) ? "Yes" : "No") << "\n";
    }
}
# Verdict Execution time Memory Grader output
1 Correct 291 ms 2452 KB Output is correct
2 Correct 322 ms 4400 KB Output is correct
3 Correct 310 ms 4036 KB Output is correct
4 Incorrect 323 ms 4136 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 291 ms 2452 KB Output is correct
2 Correct 322 ms 4400 KB Output is correct
3 Correct 310 ms 4036 KB Output is correct
4 Incorrect 323 ms 4136 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 291 ms 2452 KB Output is correct
2 Correct 322 ms 4400 KB Output is correct
3 Correct 310 ms 4036 KB Output is correct
4 Incorrect 323 ms 4136 KB Output isn't correct
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 291 ms 2452 KB Output is correct
2 Correct 322 ms 4400 KB Output is correct
3 Correct 310 ms 4036 KB Output is correct
4 Incorrect 323 ms 4136 KB Output isn't correct
5 Halted 0 ms 0 KB -