#include<bits/stdc++.h>
#define ll long long
#define F first
#define S second
#define in insert
#define er erase
#define pb push_back
#define ppb pop_back()
#define ph push
#define pp pop()
#define d3 ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define cans cout << ans << "\n";
#define yes cout << "Yes" << "\n";
#define no cout << "No" << "\n";
#define pll pair<ll,ll>
#define lin cout << "\n";
#define sqr 340
#define mod 1000000007
using namespace std;
string sa , sb , sc;
void check(string t)
{
ll n = t.size();
bool l = 1;
for(int i = 0 ; n>i ; i++)
if(sa[i]!=t[i])
l=0;
if(l)
yes
else
no
}
int main()
{
d3
ll n;
cin >> n;
cin >> sa >> sb >> sc;
ll q;
cin >> q;
string t;
cin >> t;
check(t);
while(q--)
{
ll l , r;
char c;
cin >> l >> r >> c;
for(int i = l-1 ; r>i ; i++)
t[i]=c;
check(t);
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
45 ms |
848 KB |
Output is correct |
2 |
Correct |
54 ms |
2356 KB |
Output is correct |
3 |
Correct |
58 ms |
2240 KB |
Output is correct |
4 |
Correct |
48 ms |
2384 KB |
Output is correct |
5 |
Correct |
46 ms |
2384 KB |
Output is correct |
6 |
Correct |
47 ms |
2388 KB |
Output is correct |
7 |
Correct |
45 ms |
2388 KB |
Output is correct |
8 |
Correct |
51 ms |
2508 KB |
Output is correct |
9 |
Correct |
51 ms |
2476 KB |
Output is correct |
10 |
Correct |
50 ms |
2388 KB |
Output is correct |
11 |
Correct |
51 ms |
3060 KB |
Output is correct |
12 |
Correct |
51 ms |
2512 KB |
Output is correct |
13 |
Correct |
50 ms |
2484 KB |
Output is correct |
14 |
Correct |
53 ms |
2408 KB |
Output is correct |
15 |
Correct |
55 ms |
2484 KB |
Output is correct |
16 |
Correct |
54 ms |
2384 KB |
Output is correct |
17 |
Correct |
50 ms |
2528 KB |
Output is correct |
18 |
Correct |
59 ms |
2412 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
45 ms |
848 KB |
Output is correct |
2 |
Correct |
54 ms |
2356 KB |
Output is correct |
3 |
Correct |
58 ms |
2240 KB |
Output is correct |
4 |
Correct |
48 ms |
2384 KB |
Output is correct |
5 |
Correct |
46 ms |
2384 KB |
Output is correct |
6 |
Correct |
47 ms |
2388 KB |
Output is correct |
7 |
Correct |
45 ms |
2388 KB |
Output is correct |
8 |
Correct |
51 ms |
2508 KB |
Output is correct |
9 |
Correct |
51 ms |
2476 KB |
Output is correct |
10 |
Correct |
50 ms |
2388 KB |
Output is correct |
11 |
Correct |
51 ms |
3060 KB |
Output is correct |
12 |
Correct |
51 ms |
2512 KB |
Output is correct |
13 |
Correct |
50 ms |
2484 KB |
Output is correct |
14 |
Correct |
53 ms |
2408 KB |
Output is correct |
15 |
Correct |
55 ms |
2484 KB |
Output is correct |
16 |
Correct |
54 ms |
2384 KB |
Output is correct |
17 |
Correct |
50 ms |
2528 KB |
Output is correct |
18 |
Correct |
59 ms |
2412 KB |
Output is correct |
19 |
Execution timed out |
7033 ms |
3580 KB |
Time limit exceeded |
20 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
45 ms |
848 KB |
Output is correct |
2 |
Correct |
54 ms |
2356 KB |
Output is correct |
3 |
Correct |
58 ms |
2240 KB |
Output is correct |
4 |
Correct |
48 ms |
2384 KB |
Output is correct |
5 |
Correct |
46 ms |
2384 KB |
Output is correct |
6 |
Correct |
47 ms |
2388 KB |
Output is correct |
7 |
Correct |
45 ms |
2388 KB |
Output is correct |
8 |
Correct |
51 ms |
2508 KB |
Output is correct |
9 |
Correct |
51 ms |
2476 KB |
Output is correct |
10 |
Correct |
50 ms |
2388 KB |
Output is correct |
11 |
Correct |
51 ms |
3060 KB |
Output is correct |
12 |
Correct |
51 ms |
2512 KB |
Output is correct |
13 |
Correct |
50 ms |
2484 KB |
Output is correct |
14 |
Correct |
53 ms |
2408 KB |
Output is correct |
15 |
Correct |
55 ms |
2484 KB |
Output is correct |
16 |
Correct |
54 ms |
2384 KB |
Output is correct |
17 |
Correct |
50 ms |
2528 KB |
Output is correct |
18 |
Correct |
59 ms |
2412 KB |
Output is correct |
19 |
Correct |
49 ms |
2388 KB |
Output is correct |
20 |
Correct |
58 ms |
2388 KB |
Output is correct |
21 |
Incorrect |
52 ms |
2384 KB |
Output isn't correct |
22 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
45 ms |
848 KB |
Output is correct |
2 |
Correct |
54 ms |
2356 KB |
Output is correct |
3 |
Correct |
58 ms |
2240 KB |
Output is correct |
4 |
Correct |
48 ms |
2384 KB |
Output is correct |
5 |
Correct |
46 ms |
2384 KB |
Output is correct |
6 |
Correct |
47 ms |
2388 KB |
Output is correct |
7 |
Correct |
45 ms |
2388 KB |
Output is correct |
8 |
Correct |
51 ms |
2508 KB |
Output is correct |
9 |
Correct |
51 ms |
2476 KB |
Output is correct |
10 |
Correct |
50 ms |
2388 KB |
Output is correct |
11 |
Correct |
51 ms |
3060 KB |
Output is correct |
12 |
Correct |
51 ms |
2512 KB |
Output is correct |
13 |
Correct |
50 ms |
2484 KB |
Output is correct |
14 |
Correct |
53 ms |
2408 KB |
Output is correct |
15 |
Correct |
55 ms |
2484 KB |
Output is correct |
16 |
Correct |
54 ms |
2384 KB |
Output is correct |
17 |
Correct |
50 ms |
2528 KB |
Output is correct |
18 |
Correct |
59 ms |
2412 KB |
Output is correct |
19 |
Execution timed out |
7033 ms |
3580 KB |
Time limit exceeded |
20 |
Halted |
0 ms |
0 KB |
- |