Submission #881314

# Submission time Handle Problem Language Result Execution time Memory
881314 2023-12-01T06:17:46 Z arashMLG Crossing (JOI21_crossing) C++17
3 / 100
7000 ms 3824 KB
#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 852 KB Output is correct
2 Correct 32 ms 880 KB Output is correct
3 Correct 41 ms 852 KB Output is correct
4 Correct 32 ms 932 KB Output is correct
5 Correct 32 ms 1880 KB Output is correct
6 Correct 31 ms 1900 KB Output is correct
7 Correct 32 ms 1876 KB Output is correct
8 Correct 34 ms 1868 KB Output is correct
9 Correct 32 ms 1884 KB Output is correct
10 Correct 34 ms 1880 KB Output is correct
11 Correct 33 ms 1996 KB Output is correct
12 Correct 37 ms 1928 KB Output is correct
13 Correct 33 ms 1952 KB Output is correct
14 Correct 34 ms 1880 KB Output is correct
15 Correct 33 ms 1832 KB Output is correct
16 Correct 33 ms 1876 KB Output is correct
17 Correct 32 ms 2080 KB Output is correct
18 Correct 53 ms 1984 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 30 ms 852 KB Output is correct
2 Correct 32 ms 880 KB Output is correct
3 Correct 41 ms 852 KB Output is correct
4 Correct 32 ms 932 KB Output is correct
5 Correct 32 ms 1880 KB Output is correct
6 Correct 31 ms 1900 KB Output is correct
7 Correct 32 ms 1876 KB Output is correct
8 Correct 34 ms 1868 KB Output is correct
9 Correct 32 ms 1884 KB Output is correct
10 Correct 34 ms 1880 KB Output is correct
11 Correct 33 ms 1996 KB Output is correct
12 Correct 37 ms 1928 KB Output is correct
13 Correct 33 ms 1952 KB Output is correct
14 Correct 34 ms 1880 KB Output is correct
15 Correct 33 ms 1832 KB Output is correct
16 Correct 33 ms 1876 KB Output is correct
17 Correct 32 ms 2080 KB Output is correct
18 Correct 53 ms 1984 KB Output is correct
19 Correct 3181 ms 3824 KB Output is correct
20 Execution timed out 7054 ms 3016 KB Time limit exceeded
21 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 30 ms 852 KB Output is correct
2 Correct 32 ms 880 KB Output is correct
3 Correct 41 ms 852 KB Output is correct
4 Correct 32 ms 932 KB Output is correct
5 Correct 32 ms 1880 KB Output is correct
6 Correct 31 ms 1900 KB Output is correct
7 Correct 32 ms 1876 KB Output is correct
8 Correct 34 ms 1868 KB Output is correct
9 Correct 32 ms 1884 KB Output is correct
10 Correct 34 ms 1880 KB Output is correct
11 Correct 33 ms 1996 KB Output is correct
12 Correct 37 ms 1928 KB Output is correct
13 Correct 33 ms 1952 KB Output is correct
14 Correct 34 ms 1880 KB Output is correct
15 Correct 33 ms 1832 KB Output is correct
16 Correct 33 ms 1876 KB Output is correct
17 Correct 32 ms 2080 KB Output is correct
18 Correct 53 ms 1984 KB Output is correct
19 Correct 35 ms 1872 KB Output is correct
20 Correct 54 ms 2040 KB Output is correct
21 Incorrect 33 ms 1872 KB Output isn't correct
22 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 30 ms 852 KB Output is correct
2 Correct 32 ms 880 KB Output is correct
3 Correct 41 ms 852 KB Output is correct
4 Correct 32 ms 932 KB Output is correct
5 Correct 32 ms 1880 KB Output is correct
6 Correct 31 ms 1900 KB Output is correct
7 Correct 32 ms 1876 KB Output is correct
8 Correct 34 ms 1868 KB Output is correct
9 Correct 32 ms 1884 KB Output is correct
10 Correct 34 ms 1880 KB Output is correct
11 Correct 33 ms 1996 KB Output is correct
12 Correct 37 ms 1928 KB Output is correct
13 Correct 33 ms 1952 KB Output is correct
14 Correct 34 ms 1880 KB Output is correct
15 Correct 33 ms 1832 KB Output is correct
16 Correct 33 ms 1876 KB Output is correct
17 Correct 32 ms 2080 KB Output is correct
18 Correct 53 ms 1984 KB Output is correct
19 Correct 3181 ms 3824 KB Output is correct
20 Execution timed out 7054 ms 3016 KB Time limit exceeded
21 Halted 0 ms 0 KB -