Submission #260886

# Submission time Handle Problem Language Result Execution time Memory
260886 2020-08-11T07:00:59 Z 최은수(#5044) Sweeping (JOI20_sweeping) C++17
0 / 100
18000 ms 13172 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=n;
    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];
            cin>>pos[pct].se;
        }
    }
    cout.flush();
    return 0;
}
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 182 ms 9212 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 18039 ms 13172 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 18039 ms 13172 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 640 KB Execution killed with signal 11 (could be triggered by violating memory limits)
2 Halted 0 ms 0 KB -