#include<bits/stdc++.h>
using namespace std;
#pragma GCC optimize("O3")
#define tof_io ios_base::sync_with_stdio(false);cin.tie(0) , cout.tie(0);
#define double long double
//#define int long long
#define pb push_back
#define all(x) x.begin(),x.end()
#define endl '\n'
const int mod = 1e9+7; //998244353
const long long inf = 1e18;
const int N = 200000 + 23;
const int dx[4] = {1, 0, -1, 0};
const int dy[4] = {0, 1, 0, -1};
int l[N];
int r[N];
char c[N];
void cm(string a , string b)
{
if(a == b) cout << "Yes";
else cout << "No";
cout << endl;
}
int32_t main()
{
int n;
cin >> n;
string a ;
cin >> a >> a >> a;
int q;
cin >> q;
string t;
cin >> t;
cm(a, t);
int i = 0;
while(q--)
{
cin >> l[i] >> r[i];
cin >> c[i];
fill(t.begin() + l[i] - 1, t.begin() + r[i] , c[i]);
if(a == t) cout << "Yes";
else cout << "No";
cout << endl;
i++;
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
273 ms |
2388 KB |
Output is correct |
2 |
Correct |
295 ms |
2924 KB |
Output is correct |
3 |
Correct |
306 ms |
2640 KB |
Output is correct |
4 |
Correct |
286 ms |
3052 KB |
Output is correct |
5 |
Correct |
282 ms |
4124 KB |
Output is correct |
6 |
Correct |
277 ms |
3924 KB |
Output is correct |
7 |
Correct |
289 ms |
4428 KB |
Output is correct |
8 |
Correct |
297 ms |
4176 KB |
Output is correct |
9 |
Correct |
302 ms |
4436 KB |
Output is correct |
10 |
Correct |
292 ms |
4180 KB |
Output is correct |
11 |
Correct |
299 ms |
4184 KB |
Output is correct |
12 |
Correct |
293 ms |
4156 KB |
Output is correct |
13 |
Correct |
302 ms |
4628 KB |
Output is correct |
14 |
Correct |
292 ms |
4080 KB |
Output is correct |
15 |
Correct |
298 ms |
4692 KB |
Output is correct |
16 |
Correct |
293 ms |
4120 KB |
Output is correct |
17 |
Correct |
293 ms |
4180 KB |
Output is correct |
18 |
Correct |
293 ms |
4176 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
273 ms |
2388 KB |
Output is correct |
2 |
Correct |
295 ms |
2924 KB |
Output is correct |
3 |
Correct |
306 ms |
2640 KB |
Output is correct |
4 |
Correct |
286 ms |
3052 KB |
Output is correct |
5 |
Correct |
282 ms |
4124 KB |
Output is correct |
6 |
Correct |
277 ms |
3924 KB |
Output is correct |
7 |
Correct |
289 ms |
4428 KB |
Output is correct |
8 |
Correct |
297 ms |
4176 KB |
Output is correct |
9 |
Correct |
302 ms |
4436 KB |
Output is correct |
10 |
Correct |
292 ms |
4180 KB |
Output is correct |
11 |
Correct |
299 ms |
4184 KB |
Output is correct |
12 |
Correct |
293 ms |
4156 KB |
Output is correct |
13 |
Correct |
302 ms |
4628 KB |
Output is correct |
14 |
Correct |
292 ms |
4080 KB |
Output is correct |
15 |
Correct |
298 ms |
4692 KB |
Output is correct |
16 |
Correct |
293 ms |
4120 KB |
Output is correct |
17 |
Correct |
293 ms |
4180 KB |
Output is correct |
18 |
Correct |
293 ms |
4176 KB |
Output is correct |
19 |
Correct |
393 ms |
6892 KB |
Output is correct |
20 |
Correct |
764 ms |
6796 KB |
Output is correct |
21 |
Correct |
318 ms |
6404 KB |
Output is correct |
22 |
Correct |
313 ms |
6268 KB |
Output is correct |
23 |
Correct |
319 ms |
5060 KB |
Output is correct |
24 |
Correct |
314 ms |
4944 KB |
Output is correct |
25 |
Correct |
339 ms |
6888 KB |
Output is correct |
26 |
Correct |
356 ms |
6960 KB |
Output is correct |
27 |
Correct |
349 ms |
6888 KB |
Output is correct |
28 |
Correct |
349 ms |
6876 KB |
Output is correct |
29 |
Correct |
346 ms |
6652 KB |
Output is correct |
30 |
Correct |
314 ms |
5040 KB |
Output is correct |
31 |
Correct |
354 ms |
6864 KB |
Output is correct |
32 |
Correct |
335 ms |
6644 KB |
Output is correct |
33 |
Correct |
320 ms |
5168 KB |
Output is correct |
34 |
Correct |
348 ms |
6888 KB |
Output is correct |
35 |
Correct |
316 ms |
6140 KB |
Output is correct |
36 |
Correct |
311 ms |
5148 KB |
Output is correct |
37 |
Correct |
318 ms |
5200 KB |
Output is correct |
38 |
Correct |
836 ms |
6904 KB |
Output is correct |
39 |
Correct |
775 ms |
7076 KB |
Output is correct |
40 |
Correct |
332 ms |
6392 KB |
Output is correct |
41 |
Correct |
1456 ms |
7344 KB |
Output is correct |
42 |
Correct |
1698 ms |
6400 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
273 ms |
2388 KB |
Output is correct |
2 |
Correct |
295 ms |
2924 KB |
Output is correct |
3 |
Correct |
306 ms |
2640 KB |
Output is correct |
4 |
Correct |
286 ms |
3052 KB |
Output is correct |
5 |
Correct |
282 ms |
4124 KB |
Output is correct |
6 |
Correct |
277 ms |
3924 KB |
Output is correct |
7 |
Correct |
289 ms |
4428 KB |
Output is correct |
8 |
Correct |
297 ms |
4176 KB |
Output is correct |
9 |
Correct |
302 ms |
4436 KB |
Output is correct |
10 |
Correct |
292 ms |
4180 KB |
Output is correct |
11 |
Correct |
299 ms |
4184 KB |
Output is correct |
12 |
Correct |
293 ms |
4156 KB |
Output is correct |
13 |
Correct |
302 ms |
4628 KB |
Output is correct |
14 |
Correct |
292 ms |
4080 KB |
Output is correct |
15 |
Correct |
298 ms |
4692 KB |
Output is correct |
16 |
Correct |
293 ms |
4120 KB |
Output is correct |
17 |
Correct |
293 ms |
4180 KB |
Output is correct |
18 |
Correct |
293 ms |
4176 KB |
Output is correct |
19 |
Correct |
283 ms |
3928 KB |
Output is correct |
20 |
Correct |
296 ms |
4032 KB |
Output is correct |
21 |
Incorrect |
294 ms |
4168 KB |
Output isn't correct |
22 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
273 ms |
2388 KB |
Output is correct |
2 |
Correct |
295 ms |
2924 KB |
Output is correct |
3 |
Correct |
306 ms |
2640 KB |
Output is correct |
4 |
Correct |
286 ms |
3052 KB |
Output is correct |
5 |
Correct |
282 ms |
4124 KB |
Output is correct |
6 |
Correct |
277 ms |
3924 KB |
Output is correct |
7 |
Correct |
289 ms |
4428 KB |
Output is correct |
8 |
Correct |
297 ms |
4176 KB |
Output is correct |
9 |
Correct |
302 ms |
4436 KB |
Output is correct |
10 |
Correct |
292 ms |
4180 KB |
Output is correct |
11 |
Correct |
299 ms |
4184 KB |
Output is correct |
12 |
Correct |
293 ms |
4156 KB |
Output is correct |
13 |
Correct |
302 ms |
4628 KB |
Output is correct |
14 |
Correct |
292 ms |
4080 KB |
Output is correct |
15 |
Correct |
298 ms |
4692 KB |
Output is correct |
16 |
Correct |
293 ms |
4120 KB |
Output is correct |
17 |
Correct |
293 ms |
4180 KB |
Output is correct |
18 |
Correct |
293 ms |
4176 KB |
Output is correct |
19 |
Correct |
393 ms |
6892 KB |
Output is correct |
20 |
Correct |
764 ms |
6796 KB |
Output is correct |
21 |
Correct |
318 ms |
6404 KB |
Output is correct |
22 |
Correct |
313 ms |
6268 KB |
Output is correct |
23 |
Correct |
319 ms |
5060 KB |
Output is correct |
24 |
Correct |
314 ms |
4944 KB |
Output is correct |
25 |
Correct |
339 ms |
6888 KB |
Output is correct |
26 |
Correct |
356 ms |
6960 KB |
Output is correct |
27 |
Correct |
349 ms |
6888 KB |
Output is correct |
28 |
Correct |
349 ms |
6876 KB |
Output is correct |
29 |
Correct |
346 ms |
6652 KB |
Output is correct |
30 |
Correct |
314 ms |
5040 KB |
Output is correct |
31 |
Correct |
354 ms |
6864 KB |
Output is correct |
32 |
Correct |
335 ms |
6644 KB |
Output is correct |
33 |
Correct |
320 ms |
5168 KB |
Output is correct |
34 |
Correct |
348 ms |
6888 KB |
Output is correct |
35 |
Correct |
316 ms |
6140 KB |
Output is correct |
36 |
Correct |
311 ms |
5148 KB |
Output is correct |
37 |
Correct |
318 ms |
5200 KB |
Output is correct |
38 |
Correct |
836 ms |
6904 KB |
Output is correct |
39 |
Correct |
775 ms |
7076 KB |
Output is correct |
40 |
Correct |
332 ms |
6392 KB |
Output is correct |
41 |
Correct |
1456 ms |
7344 KB |
Output is correct |
42 |
Correct |
1698 ms |
6400 KB |
Output is correct |
43 |
Correct |
283 ms |
3928 KB |
Output is correct |
44 |
Correct |
296 ms |
4032 KB |
Output is correct |
45 |
Incorrect |
294 ms |
4168 KB |
Output isn't correct |
46 |
Halted |
0 ms |
0 KB |
- |