#ifndef SorahISA
#define SorahISA
#include SorahISA __FILE__ SorahISA
string XOR(string S, string T) {
string res(SZ(S), '?');
for (int i = 0; i < SZ(S); ++i) {
if (S[i] == T[i]) res[i] = S[i];
else res[i] = int('J') + int('O') + int('I') - int(S[i]) - int(T[i]);
}
return res;
}
void solve() {
int N; cin >> N;
string S; cin >> S >> S >> S;
int Q; cin >> Q;
string T; cin >> T;
for (int q = 0; q <= Q; ++q) {
if (q) {
int l, r; cin >> l >> r, --l;
char c; cin >> c;
fill(begin(T) + l, begin(T) + r, c);
}
cout << (S == T ? "Yes" : "No") << "\n";
}
}
int32_t main() {
fastIO();
int t = 1; // cin >> t;
for (int _ = 1; _ <= t; ++_) {
solve();
}
return 0;
}
#else
#ifdef local
#define _GLIBCXX_DEBUG 1
#endif
#pragma GCC optimize("Ofast", "unroll-loops")
#include <bits/stdc++.h>
using namespace std;
using int64 = long long;
#define int int64
using float80 = long double;
#define double float80
using pii = pair<int, int>;
template <typename T> using Prior = std::priority_queue<T>;
template <typename T> using prior = std::priority_queue<T, vector<T>, greater<T>>;
#define eb emplace_back
#define ef emplace_front
#define ee emplace
#define pb pop_back
#define pf pop_front
#define ALL(x) begin(x), end(x)
#define RALL(x) rbegin(x), rend(x)
#define SZ(x) ((int)(x).size())
#ifdef local
#define fastIO() void()
#define debug(...) \
fprintf(stderr, "\u001b[33m"), \
fprintf(stderr, "At [%s], line %d: (%s) = ", __FUNCTION__, __LINE__, #__VA_ARGS__), \
_do(__VA_ARGS__), \
fprintf(stderr, "\u001b[0m")
template <typename T> void _do(T &&_t) { cerr << _t << "\n"; }
template <typename T, typename ...U> void _do(T &&_t, U &&..._u) { cerr << _t << ", ", _do(_u...); }
#else
#define fastIO() ios_base::sync_with_stdio(0), cin.tie(0)
#define debug(...) void()
#endif
template <typename T, typename U> bool chmin(T &lhs, U rhs) { return lhs > rhs ? lhs = rhs, 1 : 0; }
template <typename T, typename U> bool chmax(T &lhs, U rhs) { return lhs < rhs ? lhs = rhs, 1 : 0; }
#endif
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
29 ms |
1884 KB |
Output is correct |
2 |
Correct |
32 ms |
2016 KB |
Output is correct |
3 |
Correct |
30 ms |
1972 KB |
Output is correct |
4 |
Correct |
31 ms |
1884 KB |
Output is correct |
5 |
Correct |
31 ms |
2044 KB |
Output is correct |
6 |
Correct |
38 ms |
1876 KB |
Output is correct |
7 |
Correct |
31 ms |
1824 KB |
Output is correct |
8 |
Correct |
35 ms |
1884 KB |
Output is correct |
9 |
Correct |
32 ms |
2048 KB |
Output is correct |
10 |
Correct |
44 ms |
1924 KB |
Output is correct |
11 |
Correct |
40 ms |
1876 KB |
Output is correct |
12 |
Correct |
32 ms |
1880 KB |
Output is correct |
13 |
Correct |
31 ms |
1884 KB |
Output is correct |
14 |
Correct |
32 ms |
1876 KB |
Output is correct |
15 |
Correct |
32 ms |
1872 KB |
Output is correct |
16 |
Correct |
31 ms |
1964 KB |
Output is correct |
17 |
Correct |
39 ms |
1912 KB |
Output is correct |
18 |
Correct |
31 ms |
1988 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
29 ms |
1884 KB |
Output is correct |
2 |
Correct |
32 ms |
2016 KB |
Output is correct |
3 |
Correct |
30 ms |
1972 KB |
Output is correct |
4 |
Correct |
31 ms |
1884 KB |
Output is correct |
5 |
Correct |
31 ms |
2044 KB |
Output is correct |
6 |
Correct |
38 ms |
1876 KB |
Output is correct |
7 |
Correct |
31 ms |
1824 KB |
Output is correct |
8 |
Correct |
35 ms |
1884 KB |
Output is correct |
9 |
Correct |
32 ms |
2048 KB |
Output is correct |
10 |
Correct |
44 ms |
1924 KB |
Output is correct |
11 |
Correct |
40 ms |
1876 KB |
Output is correct |
12 |
Correct |
32 ms |
1880 KB |
Output is correct |
13 |
Correct |
31 ms |
1884 KB |
Output is correct |
14 |
Correct |
32 ms |
1876 KB |
Output is correct |
15 |
Correct |
32 ms |
1872 KB |
Output is correct |
16 |
Correct |
31 ms |
1964 KB |
Output is correct |
17 |
Correct |
39 ms |
1912 KB |
Output is correct |
18 |
Correct |
31 ms |
1988 KB |
Output is correct |
19 |
Correct |
96 ms |
3552 KB |
Output is correct |
20 |
Correct |
434 ms |
3536 KB |
Output is correct |
21 |
Correct |
40 ms |
3416 KB |
Output is correct |
22 |
Correct |
38 ms |
3240 KB |
Output is correct |
23 |
Correct |
36 ms |
2396 KB |
Output is correct |
24 |
Correct |
36 ms |
2392 KB |
Output is correct |
25 |
Correct |
43 ms |
3372 KB |
Output is correct |
26 |
Correct |
42 ms |
3464 KB |
Output is correct |
27 |
Correct |
56 ms |
3456 KB |
Output is correct |
28 |
Correct |
53 ms |
3524 KB |
Output is correct |
29 |
Correct |
52 ms |
3480 KB |
Output is correct |
30 |
Correct |
55 ms |
2504 KB |
Output is correct |
31 |
Correct |
53 ms |
3544 KB |
Output is correct |
32 |
Correct |
50 ms |
3624 KB |
Output is correct |
33 |
Correct |
36 ms |
2496 KB |
Output is correct |
34 |
Correct |
51 ms |
3452 KB |
Output is correct |
35 |
Correct |
38 ms |
3212 KB |
Output is correct |
36 |
Correct |
36 ms |
2508 KB |
Output is correct |
37 |
Correct |
50 ms |
2592 KB |
Output is correct |
38 |
Correct |
512 ms |
3460 KB |
Output is correct |
39 |
Correct |
466 ms |
3396 KB |
Output is correct |
40 |
Correct |
40 ms |
3176 KB |
Output is correct |
41 |
Correct |
1057 ms |
3608 KB |
Output is correct |
42 |
Correct |
1343 ms |
3544 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
29 ms |
1884 KB |
Output is correct |
2 |
Correct |
32 ms |
2016 KB |
Output is correct |
3 |
Correct |
30 ms |
1972 KB |
Output is correct |
4 |
Correct |
31 ms |
1884 KB |
Output is correct |
5 |
Correct |
31 ms |
2044 KB |
Output is correct |
6 |
Correct |
38 ms |
1876 KB |
Output is correct |
7 |
Correct |
31 ms |
1824 KB |
Output is correct |
8 |
Correct |
35 ms |
1884 KB |
Output is correct |
9 |
Correct |
32 ms |
2048 KB |
Output is correct |
10 |
Correct |
44 ms |
1924 KB |
Output is correct |
11 |
Correct |
40 ms |
1876 KB |
Output is correct |
12 |
Correct |
32 ms |
1880 KB |
Output is correct |
13 |
Correct |
31 ms |
1884 KB |
Output is correct |
14 |
Correct |
32 ms |
1876 KB |
Output is correct |
15 |
Correct |
32 ms |
1872 KB |
Output is correct |
16 |
Correct |
31 ms |
1964 KB |
Output is correct |
17 |
Correct |
39 ms |
1912 KB |
Output is correct |
18 |
Correct |
31 ms |
1988 KB |
Output is correct |
19 |
Correct |
30 ms |
1884 KB |
Output is correct |
20 |
Correct |
30 ms |
1876 KB |
Output is correct |
21 |
Incorrect |
32 ms |
1880 KB |
Output isn't correct |
22 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
29 ms |
1884 KB |
Output is correct |
2 |
Correct |
32 ms |
2016 KB |
Output is correct |
3 |
Correct |
30 ms |
1972 KB |
Output is correct |
4 |
Correct |
31 ms |
1884 KB |
Output is correct |
5 |
Correct |
31 ms |
2044 KB |
Output is correct |
6 |
Correct |
38 ms |
1876 KB |
Output is correct |
7 |
Correct |
31 ms |
1824 KB |
Output is correct |
8 |
Correct |
35 ms |
1884 KB |
Output is correct |
9 |
Correct |
32 ms |
2048 KB |
Output is correct |
10 |
Correct |
44 ms |
1924 KB |
Output is correct |
11 |
Correct |
40 ms |
1876 KB |
Output is correct |
12 |
Correct |
32 ms |
1880 KB |
Output is correct |
13 |
Correct |
31 ms |
1884 KB |
Output is correct |
14 |
Correct |
32 ms |
1876 KB |
Output is correct |
15 |
Correct |
32 ms |
1872 KB |
Output is correct |
16 |
Correct |
31 ms |
1964 KB |
Output is correct |
17 |
Correct |
39 ms |
1912 KB |
Output is correct |
18 |
Correct |
31 ms |
1988 KB |
Output is correct |
19 |
Correct |
96 ms |
3552 KB |
Output is correct |
20 |
Correct |
434 ms |
3536 KB |
Output is correct |
21 |
Correct |
40 ms |
3416 KB |
Output is correct |
22 |
Correct |
38 ms |
3240 KB |
Output is correct |
23 |
Correct |
36 ms |
2396 KB |
Output is correct |
24 |
Correct |
36 ms |
2392 KB |
Output is correct |
25 |
Correct |
43 ms |
3372 KB |
Output is correct |
26 |
Correct |
42 ms |
3464 KB |
Output is correct |
27 |
Correct |
56 ms |
3456 KB |
Output is correct |
28 |
Correct |
53 ms |
3524 KB |
Output is correct |
29 |
Correct |
52 ms |
3480 KB |
Output is correct |
30 |
Correct |
55 ms |
2504 KB |
Output is correct |
31 |
Correct |
53 ms |
3544 KB |
Output is correct |
32 |
Correct |
50 ms |
3624 KB |
Output is correct |
33 |
Correct |
36 ms |
2496 KB |
Output is correct |
34 |
Correct |
51 ms |
3452 KB |
Output is correct |
35 |
Correct |
38 ms |
3212 KB |
Output is correct |
36 |
Correct |
36 ms |
2508 KB |
Output is correct |
37 |
Correct |
50 ms |
2592 KB |
Output is correct |
38 |
Correct |
512 ms |
3460 KB |
Output is correct |
39 |
Correct |
466 ms |
3396 KB |
Output is correct |
40 |
Correct |
40 ms |
3176 KB |
Output is correct |
41 |
Correct |
1057 ms |
3608 KB |
Output is correct |
42 |
Correct |
1343 ms |
3544 KB |
Output is correct |
43 |
Correct |
30 ms |
1884 KB |
Output is correct |
44 |
Correct |
30 ms |
1876 KB |
Output is correct |
45 |
Incorrect |
32 ms |
1880 KB |
Output isn't correct |
46 |
Halted |
0 ms |
0 KB |
- |