# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1055057 | 2024-08-12T14:16:17 Z | cpdreamer | Crossing (JOI21_crossing) | C++14 | 7000 ms | 3872 KB |
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <utility> #define V vector #define P pair #define S second #define F first #define pb push_back #define all(v) v.begin(),v.end() typedef long long ll; using namespace __gnu_pbds; using namespace std; typedef tree<int,null_type,less<int>,rb_tree_tag, tree_order_statistics_node_update> indexed_set; static int called = 0;const long long MOD = 1e9+7; // 1e9 + 7 void file(){ freopen("input.txt.txt","r",stdin); freopen("output.txt.txt","w",stdout); } void file(string s) { freopen((s + ".in").c_str(), "r", stdin); freopen((s + ".out").c_str(), "w", stdout); } bool check(string s,string t){ for(int i=0;i<s.size();i++){ if(s[i]!=t[i]) return false; } return true; } void solve() { int n; cin>>n; string s1,s2,s3; cin>>s1>>s2>>s3; int q; cin>>q; string t; cin>>t; if(check(t,s1)) cout<<"Yes"<<endl; else cout<<"No"<<endl; while(q--){ int l,r; cin>>l>>r; char c; cin>>c; for(int i=l-1;i<r;i++) t[i]=c; if(check(s1,t)) cout<<"Yes"<<endl; else cout<<"No"<<endl; } } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); //file(); solve(); return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 176 ms | 856 KB | Output is correct |
2 | Correct | 227 ms | 2640 KB | Output is correct |
3 | Correct | 202 ms | 2388 KB | Output is correct |
4 | Correct | 185 ms | 2448 KB | Output is correct |
5 | Correct | 190 ms | 2388 KB | Output is correct |
6 | Correct | 191 ms | 2388 KB | Output is correct |
7 | Correct | 190 ms | 2384 KB | Output is correct |
8 | Correct | 206 ms | 2384 KB | Output is correct |
9 | Correct | 196 ms | 2388 KB | Output is correct |
10 | Correct | 192 ms | 2388 KB | Output is correct |
11 | Correct | 239 ms | 2460 KB | Output is correct |
12 | Correct | 193 ms | 2404 KB | Output is correct |
13 | Correct | 191 ms | 2332 KB | Output is correct |
14 | Correct | 198 ms | 2384 KB | Output is correct |
15 | Correct | 191 ms | 2320 KB | Output is correct |
16 | Correct | 197 ms | 2408 KB | Output is correct |
17 | Correct | 203 ms | 2468 KB | Output is correct |
18 | Correct | 205 ms | 2384 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 176 ms | 856 KB | Output is correct |
2 | Correct | 227 ms | 2640 KB | Output is correct |
3 | Correct | 202 ms | 2388 KB | Output is correct |
4 | Correct | 185 ms | 2448 KB | Output is correct |
5 | Correct | 190 ms | 2388 KB | Output is correct |
6 | Correct | 191 ms | 2388 KB | Output is correct |
7 | Correct | 190 ms | 2384 KB | Output is correct |
8 | Correct | 206 ms | 2384 KB | Output is correct |
9 | Correct | 196 ms | 2388 KB | Output is correct |
10 | Correct | 192 ms | 2388 KB | Output is correct |
11 | Correct | 239 ms | 2460 KB | Output is correct |
12 | Correct | 193 ms | 2404 KB | Output is correct |
13 | Correct | 191 ms | 2332 KB | Output is correct |
14 | Correct | 198 ms | 2384 KB | Output is correct |
15 | Correct | 191 ms | 2320 KB | Output is correct |
16 | Correct | 197 ms | 2408 KB | Output is correct |
17 | Correct | 203 ms | 2468 KB | Output is correct |
18 | Correct | 205 ms | 2384 KB | Output is correct |
19 | Execution timed out | 7064 ms | 3872 KB | Time limit exceeded |
20 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 176 ms | 856 KB | Output is correct |
2 | Correct | 227 ms | 2640 KB | Output is correct |
3 | Correct | 202 ms | 2388 KB | Output is correct |
4 | Correct | 185 ms | 2448 KB | Output is correct |
5 | Correct | 190 ms | 2388 KB | Output is correct |
6 | Correct | 191 ms | 2388 KB | Output is correct |
7 | Correct | 190 ms | 2384 KB | Output is correct |
8 | Correct | 206 ms | 2384 KB | Output is correct |
9 | Correct | 196 ms | 2388 KB | Output is correct |
10 | Correct | 192 ms | 2388 KB | Output is correct |
11 | Correct | 239 ms | 2460 KB | Output is correct |
12 | Correct | 193 ms | 2404 KB | Output is correct |
13 | Correct | 191 ms | 2332 KB | Output is correct |
14 | Correct | 198 ms | 2384 KB | Output is correct |
15 | Correct | 191 ms | 2320 KB | Output is correct |
16 | Correct | 197 ms | 2408 KB | Output is correct |
17 | Correct | 203 ms | 2468 KB | Output is correct |
18 | Correct | 205 ms | 2384 KB | Output is correct |
19 | Correct | 186 ms | 2236 KB | Output is correct |
20 | Correct | 227 ms | 2412 KB | Output is correct |
21 | Incorrect | 235 ms | 2360 KB | Output isn't correct |
22 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 176 ms | 856 KB | Output is correct |
2 | Correct | 227 ms | 2640 KB | Output is correct |
3 | Correct | 202 ms | 2388 KB | Output is correct |
4 | Correct | 185 ms | 2448 KB | Output is correct |
5 | Correct | 190 ms | 2388 KB | Output is correct |
6 | Correct | 191 ms | 2388 KB | Output is correct |
7 | Correct | 190 ms | 2384 KB | Output is correct |
8 | Correct | 206 ms | 2384 KB | Output is correct |
9 | Correct | 196 ms | 2388 KB | Output is correct |
10 | Correct | 192 ms | 2388 KB | Output is correct |
11 | Correct | 239 ms | 2460 KB | Output is correct |
12 | Correct | 193 ms | 2404 KB | Output is correct |
13 | Correct | 191 ms | 2332 KB | Output is correct |
14 | Correct | 198 ms | 2384 KB | Output is correct |
15 | Correct | 191 ms | 2320 KB | Output is correct |
16 | Correct | 197 ms | 2408 KB | Output is correct |
17 | Correct | 203 ms | 2468 KB | Output is correct |
18 | Correct | 205 ms | 2384 KB | Output is correct |
19 | Execution timed out | 7064 ms | 3872 KB | Time limit exceeded |
20 | Halted | 0 ms | 0 KB | - |