# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
1046848 |
2024-08-07T04:58:54 Z |
변재우(#11026) |
청소 (JOI20_sweeping) |
C++17 |
|
13 ms |
1112 KB |
#include <bits/stdc++.h>
#define int long long
using namespace std;
const int Nmax=10010;
int N, M, Q, X[Nmax], Y[Nmax];
signed main() {
ios_base::sync_with_stdio(0); cin.tie(0);
cin>>N>>M>>Q;
for(int i=1; i<=M; i++) cin>>X[i]>>Y[i];
while(Q--) {
int op; cin>>op;
if(op==1) {
int k; cin>>k;
cout<<X[k]<<" "<<Y[k]<<"\n";
}
else if(op==2) {
int l; cin>>l;
for(int i=1; i<=M; i++) if(Y[i]<=l) X[i]=max(X[i], N-l);
}
else if(op==3) {
int l; cin>>l;
for(int i=1; i<=M; i++) if(X[i]<=l) Y[i]=max(Y[i], N-l);
}
else {
++M;
cin>>X[M]>>Y[M];
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
600 KB |
Output is correct |
2 |
Correct |
3 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
8 ms |
604 KB |
Output is correct |
5 |
Correct |
13 ms |
348 KB |
Output is correct |
6 |
Correct |
3 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
2 ms |
1100 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
2 ms |
1112 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
2 ms |
1112 KB |
Execution killed with signal 11 |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
600 KB |
Output is correct |
2 |
Correct |
3 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
604 KB |
Output is correct |
4 |
Correct |
8 ms |
604 KB |
Output is correct |
5 |
Correct |
13 ms |
348 KB |
Output is correct |
6 |
Correct |
3 ms |
348 KB |
Output is correct |
7 |
Runtime error |
2 ms |
1100 KB |
Execution killed with signal 11 |
8 |
Halted |
0 ms |
0 KB |
- |