# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
846790 |
2023-09-08T12:37:45 Z |
Abito |
Crossing (JOI21_crossing) |
C++17 |
|
50 ms |
2568 KB |
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define ppb pop_back
#define ep insert
#define endl '\n'
#define elif else if
#define pow pwr
#define sqrt sqrtt
//#define int long long
#define y1 YONE
typedef unsigned long long ull;
using namespace std;
const int N=105;
int n,q;
char a[N],b[N];
int32_t main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
cin>>n;
for (int i=0;i<3;i++) for (int i=1;i<=n;i++) cin>>a[i];
cin>>q;bool ok=true;
for (int i=1;i<=n;i++) {cin>>b[i];if (b[i]!=a[i]) ok=false;}
if (ok) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
while (q--){
ok=true;
int l,r;char x;cin>>l>>r>>x;
for (int i=l;i<=r;i++) b[i]=x;
for (int i=1;i<=n;i++) if (b[i]!=a[i]) ok=false;
if (ok) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
2384 KB |
Output is correct |
2 |
Correct |
39 ms |
2384 KB |
Output is correct |
3 |
Correct |
39 ms |
2384 KB |
Output is correct |
4 |
Correct |
39 ms |
2384 KB |
Output is correct |
5 |
Correct |
35 ms |
2404 KB |
Output is correct |
6 |
Correct |
36 ms |
2384 KB |
Output is correct |
7 |
Correct |
34 ms |
2384 KB |
Output is correct |
8 |
Correct |
40 ms |
2384 KB |
Output is correct |
9 |
Correct |
40 ms |
2384 KB |
Output is correct |
10 |
Correct |
39 ms |
2420 KB |
Output is correct |
11 |
Correct |
41 ms |
2392 KB |
Output is correct |
12 |
Correct |
42 ms |
2384 KB |
Output is correct |
13 |
Correct |
41 ms |
2384 KB |
Output is correct |
14 |
Correct |
40 ms |
2380 KB |
Output is correct |
15 |
Correct |
40 ms |
2384 KB |
Output is correct |
16 |
Correct |
40 ms |
2440 KB |
Output is correct |
17 |
Correct |
41 ms |
2568 KB |
Output is correct |
18 |
Correct |
39 ms |
2388 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
2384 KB |
Output is correct |
2 |
Correct |
39 ms |
2384 KB |
Output is correct |
3 |
Correct |
39 ms |
2384 KB |
Output is correct |
4 |
Correct |
39 ms |
2384 KB |
Output is correct |
5 |
Correct |
35 ms |
2404 KB |
Output is correct |
6 |
Correct |
36 ms |
2384 KB |
Output is correct |
7 |
Correct |
34 ms |
2384 KB |
Output is correct |
8 |
Correct |
40 ms |
2384 KB |
Output is correct |
9 |
Correct |
40 ms |
2384 KB |
Output is correct |
10 |
Correct |
39 ms |
2420 KB |
Output is correct |
11 |
Correct |
41 ms |
2392 KB |
Output is correct |
12 |
Correct |
42 ms |
2384 KB |
Output is correct |
13 |
Correct |
41 ms |
2384 KB |
Output is correct |
14 |
Correct |
40 ms |
2380 KB |
Output is correct |
15 |
Correct |
40 ms |
2384 KB |
Output is correct |
16 |
Correct |
40 ms |
2440 KB |
Output is correct |
17 |
Correct |
41 ms |
2568 KB |
Output is correct |
18 |
Correct |
39 ms |
2388 KB |
Output is correct |
19 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 11 |
20 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
2384 KB |
Output is correct |
2 |
Correct |
39 ms |
2384 KB |
Output is correct |
3 |
Correct |
39 ms |
2384 KB |
Output is correct |
4 |
Correct |
39 ms |
2384 KB |
Output is correct |
5 |
Correct |
35 ms |
2404 KB |
Output is correct |
6 |
Correct |
36 ms |
2384 KB |
Output is correct |
7 |
Correct |
34 ms |
2384 KB |
Output is correct |
8 |
Correct |
40 ms |
2384 KB |
Output is correct |
9 |
Correct |
40 ms |
2384 KB |
Output is correct |
10 |
Correct |
39 ms |
2420 KB |
Output is correct |
11 |
Correct |
41 ms |
2392 KB |
Output is correct |
12 |
Correct |
42 ms |
2384 KB |
Output is correct |
13 |
Correct |
41 ms |
2384 KB |
Output is correct |
14 |
Correct |
40 ms |
2380 KB |
Output is correct |
15 |
Correct |
40 ms |
2384 KB |
Output is correct |
16 |
Correct |
40 ms |
2440 KB |
Output is correct |
17 |
Correct |
41 ms |
2568 KB |
Output is correct |
18 |
Correct |
39 ms |
2388 KB |
Output is correct |
19 |
Correct |
37 ms |
2384 KB |
Output is correct |
20 |
Correct |
50 ms |
2212 KB |
Output is correct |
21 |
Incorrect |
50 ms |
2460 KB |
Output isn't correct |
22 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
34 ms |
2384 KB |
Output is correct |
2 |
Correct |
39 ms |
2384 KB |
Output is correct |
3 |
Correct |
39 ms |
2384 KB |
Output is correct |
4 |
Correct |
39 ms |
2384 KB |
Output is correct |
5 |
Correct |
35 ms |
2404 KB |
Output is correct |
6 |
Correct |
36 ms |
2384 KB |
Output is correct |
7 |
Correct |
34 ms |
2384 KB |
Output is correct |
8 |
Correct |
40 ms |
2384 KB |
Output is correct |
9 |
Correct |
40 ms |
2384 KB |
Output is correct |
10 |
Correct |
39 ms |
2420 KB |
Output is correct |
11 |
Correct |
41 ms |
2392 KB |
Output is correct |
12 |
Correct |
42 ms |
2384 KB |
Output is correct |
13 |
Correct |
41 ms |
2384 KB |
Output is correct |
14 |
Correct |
40 ms |
2380 KB |
Output is correct |
15 |
Correct |
40 ms |
2384 KB |
Output is correct |
16 |
Correct |
40 ms |
2440 KB |
Output is correct |
17 |
Correct |
41 ms |
2568 KB |
Output is correct |
18 |
Correct |
39 ms |
2388 KB |
Output is correct |
19 |
Runtime error |
1 ms |
600 KB |
Execution killed with signal 11 |
20 |
Halted |
0 ms |
0 KB |
- |