# |
제출 시각 |
아이디 |
문제 |
언어 |
결과 |
실행 시간 |
메모리 |
260888 |
2020-08-11T07:04:54 Z |
최은수(#5044) |
청소 (JOI20_sweeping) |
C++17 |
|
18000 ms |
6616 KB |
#include<iostream>
#include<vector>
#include<algorithm>
#define ep emplace
#define eb emplace_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
using namespace std;
typedef long long ll;
typedef pair<int,int>pi;
typedef pair<ll,ll>pl;
const int inf=1e9+7;
const ll INF=1e18;
int pct;
int when[1500010];
pi pos[1500010];
int typ[1000010],len[1000010];
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n,m,q;
cin>>n>>m>>q;
pct=m;
for(int i=0;i++<m;)
cin>>pos[i].fi>>pos[i].se;
for(int i=0;i++<q;)
{
cin>>typ[i]>>len[i];
if(typ[i]==1)
{
pi cp=pos[len[i]];
for(int j=when[len[i]]+1;j<i;j++)
{
if(typ[j]==2&&cp.se<=len[j])
cp.fi=max(cp.fi,n-len[j]);
else if(typ[j]==3&&cp.fi<=len[j])
cp.se=max(cp.se,n-len[j]);
}
cout<<cp.fi<<' '<<cp.se<<'\n';
}
else if(typ[i]==2)
{
}
else if(typ[i]==3)
{
}
else
{
pos[++pct].fi=len[i];
when[pct]=i;
cin>>pos[pct].se;
}
}
cout.flush();
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
512 KB |
Output is correct |
2 |
Correct |
12 ms |
512 KB |
Output is correct |
3 |
Correct |
10 ms |
512 KB |
Output is correct |
4 |
Correct |
18 ms |
512 KB |
Output is correct |
5 |
Correct |
2 ms |
512 KB |
Output is correct |
6 |
Correct |
22 ms |
512 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18078 ms |
6616 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18077 ms |
6028 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
18077 ms |
6028 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
24 ms |
512 KB |
Output is correct |
2 |
Correct |
12 ms |
512 KB |
Output is correct |
3 |
Correct |
10 ms |
512 KB |
Output is correct |
4 |
Correct |
18 ms |
512 KB |
Output is correct |
5 |
Correct |
2 ms |
512 KB |
Output is correct |
6 |
Correct |
22 ms |
512 KB |
Output is correct |
7 |
Execution timed out |
18078 ms |
6616 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |