# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
616653 |
2022-08-01T06:02:47 Z |
이동현(#8506) |
청소 (JOI20_sweeping) |
C++17 |
|
18000 ms |
49276 KB |
#include <bits/stdc++.h>
#define int long long
using namespace std;
signed main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
int n, m, q; cin >> n >> m >> q;
vector<vector<int>> p(m);
for(int i = 0; i < m; ++i){
p[i].resize(2);
cin >> p[i][0] >> p[i][1];
}
while(q--){
int t; cin >> t;
if(t == 1){
int x; cin >> x; --x;
cout << p[x][0] << ' ' << p[x][1] << '\n';
}
else if(t == 2){
int l; cin >> l;
for(int i = 0; i < (int)p.size(); ++i){
if(p[i][1] <= l && p[i][0] <= n - l){
p[i][0] = n - l;
}
}
}
else if(t == 3){
int l; cin >> l;
for(int i = 0; i < (int)p.size(); ++i){
if(p[i][0] <= l && p[i][1] <= n - l){
p[i][1] = n - l;
}
}
}
else{
int x, y; cin >> x >> y;
p.push_back({x, y});
}
}
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
596 KB |
Output is correct |
2 |
Correct |
5 ms |
468 KB |
Output is correct |
3 |
Correct |
2 ms |
592 KB |
Output is correct |
4 |
Correct |
10 ms |
628 KB |
Output is correct |
5 |
Correct |
28 ms |
544 KB |
Output is correct |
6 |
Correct |
9 ms |
468 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18007 ms |
49276 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18052 ms |
38068 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18052 ms |
38068 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
10 ms |
596 KB |
Output is correct |
2 |
Correct |
5 ms |
468 KB |
Output is correct |
3 |
Correct |
2 ms |
592 KB |
Output is correct |
4 |
Correct |
10 ms |
628 KB |
Output is correct |
5 |
Correct |
28 ms |
544 KB |
Output is correct |
6 |
Correct |
9 ms |
468 KB |
Output is correct |
7 |
Execution timed out |
18007 ms |
49276 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |