Submission #1122877

#TimeUsernameProblemLanguageResultExecution timeMemory
1122877SulACrossing (JOI21_crossing)C++20
3 / 100
7089 ms1940 KiB
#include <bits/stdc++.h>
using namespace std;
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/pb_ds/assoc_container.hpp>
//#pragma GCC target("popcnt")
using namespace __gnu_pbds;
using namespace std;
using ordered_set = tree<int, null_type, less_equal<>, rb_tree_tag, tree_order_statistics_node_update>;
#define popcount __builtin_popcountll
#define all(a) (a).begin(), (a).end()

const int MOD = 1e9+7;

signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);

    int n; cin >> n;
    string A,B,C; cin >> A >> B >> C;
    string T; int q;
    cin >> q >> T;
    auto solve = [&]() {
        cout << (T == A ? "Yes" : "No") << "\n";
    };
    solve();
    while (q--) {
        int l,r; char c; cin >> l >> r >> c;
        for (int i = l-1; i <= r-1; i++)
            T[i] = c;
        solve();
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...