#include<bits/stdc++.h>
using namespace std;
int a,b,c,d,e,i,j,ii,jj,zx,xc,tes,t;
string S[9],s;
char ch;
int main(){
ios_base::sync_with_stdio(false),cin.tie(0),cout.tie(0);
cin>>a;
cin>>S[1]>>S[2]>>S[3];
for(i=1; i<=3; i++) S[i]="0"+S[i];
cin>>tes;
cin>>s;s="0"+s;
for(i=1; i<=a; i++){
if(S[1][i]!=s[i]) break;
}
if(i==a+1){
cout<<"Yes\n";
}else{
cout<<"No\n";
}
for(t=1; t<=tes; t++){
cin>>c>>d>>ch;
for(i=c; i<=d; i++){
s[i]=ch;
}
for(i=1; i<=a; i++){
if(S[1][i]!=s[i]) break;
}
if(i==a+1){
cout<<"Yes\n";
}else{
cout<<"No\n";
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
40 ms |
836 KB |
Output is correct |
2 |
Correct |
43 ms |
2384 KB |
Output is correct |
3 |
Correct |
83 ms |
2256 KB |
Output is correct |
4 |
Correct |
50 ms |
2240 KB |
Output is correct |
5 |
Correct |
42 ms |
2244 KB |
Output is correct |
6 |
Correct |
43 ms |
2280 KB |
Output is correct |
7 |
Correct |
41 ms |
2264 KB |
Output is correct |
8 |
Correct |
43 ms |
2372 KB |
Output is correct |
9 |
Correct |
43 ms |
2448 KB |
Output is correct |
10 |
Correct |
43 ms |
2380 KB |
Output is correct |
11 |
Correct |
42 ms |
2432 KB |
Output is correct |
12 |
Correct |
42 ms |
2372 KB |
Output is correct |
13 |
Correct |
44 ms |
2408 KB |
Output is correct |
14 |
Correct |
44 ms |
2348 KB |
Output is correct |
15 |
Correct |
43 ms |
2364 KB |
Output is correct |
16 |
Correct |
43 ms |
2372 KB |
Output is correct |
17 |
Correct |
54 ms |
2496 KB |
Output is correct |
18 |
Correct |
90 ms |
2272 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
40 ms |
836 KB |
Output is correct |
2 |
Correct |
43 ms |
2384 KB |
Output is correct |
3 |
Correct |
83 ms |
2256 KB |
Output is correct |
4 |
Correct |
50 ms |
2240 KB |
Output is correct |
5 |
Correct |
42 ms |
2244 KB |
Output is correct |
6 |
Correct |
43 ms |
2280 KB |
Output is correct |
7 |
Correct |
41 ms |
2264 KB |
Output is correct |
8 |
Correct |
43 ms |
2372 KB |
Output is correct |
9 |
Correct |
43 ms |
2448 KB |
Output is correct |
10 |
Correct |
43 ms |
2380 KB |
Output is correct |
11 |
Correct |
42 ms |
2432 KB |
Output is correct |
12 |
Correct |
42 ms |
2372 KB |
Output is correct |
13 |
Correct |
44 ms |
2408 KB |
Output is correct |
14 |
Correct |
44 ms |
2348 KB |
Output is correct |
15 |
Correct |
43 ms |
2364 KB |
Output is correct |
16 |
Correct |
43 ms |
2372 KB |
Output is correct |
17 |
Correct |
54 ms |
2496 KB |
Output is correct |
18 |
Correct |
90 ms |
2272 KB |
Output is correct |
19 |
Execution timed out |
7014 ms |
3940 KB |
Time limit exceeded |
20 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
40 ms |
836 KB |
Output is correct |
2 |
Correct |
43 ms |
2384 KB |
Output is correct |
3 |
Correct |
83 ms |
2256 KB |
Output is correct |
4 |
Correct |
50 ms |
2240 KB |
Output is correct |
5 |
Correct |
42 ms |
2244 KB |
Output is correct |
6 |
Correct |
43 ms |
2280 KB |
Output is correct |
7 |
Correct |
41 ms |
2264 KB |
Output is correct |
8 |
Correct |
43 ms |
2372 KB |
Output is correct |
9 |
Correct |
43 ms |
2448 KB |
Output is correct |
10 |
Correct |
43 ms |
2380 KB |
Output is correct |
11 |
Correct |
42 ms |
2432 KB |
Output is correct |
12 |
Correct |
42 ms |
2372 KB |
Output is correct |
13 |
Correct |
44 ms |
2408 KB |
Output is correct |
14 |
Correct |
44 ms |
2348 KB |
Output is correct |
15 |
Correct |
43 ms |
2364 KB |
Output is correct |
16 |
Correct |
43 ms |
2372 KB |
Output is correct |
17 |
Correct |
54 ms |
2496 KB |
Output is correct |
18 |
Correct |
90 ms |
2272 KB |
Output is correct |
19 |
Correct |
43 ms |
2216 KB |
Output is correct |
20 |
Correct |
84 ms |
2288 KB |
Output is correct |
21 |
Incorrect |
50 ms |
2428 KB |
Output isn't correct |
22 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
40 ms |
836 KB |
Output is correct |
2 |
Correct |
43 ms |
2384 KB |
Output is correct |
3 |
Correct |
83 ms |
2256 KB |
Output is correct |
4 |
Correct |
50 ms |
2240 KB |
Output is correct |
5 |
Correct |
42 ms |
2244 KB |
Output is correct |
6 |
Correct |
43 ms |
2280 KB |
Output is correct |
7 |
Correct |
41 ms |
2264 KB |
Output is correct |
8 |
Correct |
43 ms |
2372 KB |
Output is correct |
9 |
Correct |
43 ms |
2448 KB |
Output is correct |
10 |
Correct |
43 ms |
2380 KB |
Output is correct |
11 |
Correct |
42 ms |
2432 KB |
Output is correct |
12 |
Correct |
42 ms |
2372 KB |
Output is correct |
13 |
Correct |
44 ms |
2408 KB |
Output is correct |
14 |
Correct |
44 ms |
2348 KB |
Output is correct |
15 |
Correct |
43 ms |
2364 KB |
Output is correct |
16 |
Correct |
43 ms |
2372 KB |
Output is correct |
17 |
Correct |
54 ms |
2496 KB |
Output is correct |
18 |
Correct |
90 ms |
2272 KB |
Output is correct |
19 |
Execution timed out |
7014 ms |
3940 KB |
Time limit exceeded |
20 |
Halted |
0 ms |
0 KB |
- |