#include<bits/stdc++.h>
#ifdef LOCAL
#include "Essentials/algo/debug.h"
#else
#define debug(...) 69
#endif
using namespace std;
typedef long long ll;
typedef pair<int,int> pii;
const int N = 2e5 + 23;
const ll inf = 1e18;
#define F first
#define S second
#define pb push_back
#define kill(x) cout<<x<<endl, exit(0);
#define all(x) x.begin(),x.end()
#define sz(x) (int)x.size()
#define lc (v << 1)
#define rc ((v<<1) |1)
int n,q;
string s,beg;
int32_t main() {
cin.tie(nullptr)->sync_with_stdio(false);
cin>>n>>s>>s>>s; s= "#" + s;
cin>>q;
cin>>beg; beg = "#" + beg;
cout<< (beg == s ? "Yes" : "No") << '\n';
while(q--) {
int l,r; char c; cin>>l>>r>>c;
for(int i = l ; i <= r; i ++) beg[i] = 'c';
cout<< (beg == s ? "Yes" : "No") << '\n';
}
return 0;
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
2012 KB |
Output is correct |
2 |
Correct |
42 ms |
1880 KB |
Output is correct |
3 |
Correct |
39 ms |
1880 KB |
Output is correct |
4 |
Incorrect |
32 ms |
1880 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
2012 KB |
Output is correct |
2 |
Correct |
42 ms |
1880 KB |
Output is correct |
3 |
Correct |
39 ms |
1880 KB |
Output is correct |
4 |
Incorrect |
32 ms |
1880 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
2012 KB |
Output is correct |
2 |
Correct |
42 ms |
1880 KB |
Output is correct |
3 |
Correct |
39 ms |
1880 KB |
Output is correct |
4 |
Incorrect |
32 ms |
1880 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
30 ms |
2012 KB |
Output is correct |
2 |
Correct |
42 ms |
1880 KB |
Output is correct |
3 |
Correct |
39 ms |
1880 KB |
Output is correct |
4 |
Incorrect |
32 ms |
1880 KB |
Output isn't correct |
5 |
Halted |
0 ms |
0 KB |
- |