Submission #1089911

# Submission time Handle Problem Language Result Execution time Memory
1089911 2024-09-17T11:45:48 Z lucri popa (BOI18_popa) C++17
0 / 100
12 ms 432 KB
    #include "popa.h"
    #include <bits/stdc++.h>
    #define pb push_back
    #define fst first
    #define snd second
    #define fore(i,a,b) for(ll i=a,mxcont=b;i<mxcont;i++)
    #define SZ(x) ((int)x.size())
    #define ALL(x) x.begin(),x.end()
    #define mset(a,v) memset((a),(v),sizeof(a))
    #define imp(v) {for(auto jfhg:v)cout<<jfhg<<" ";cout<<"\n";}
    using namespace std;
    typedef long long ll;
    typedef pair<ll,ll> ii;
     
    int solve(int n, int* L, int* R)
    {
    	fore(i,0,n)L[i]=R[i]=-1;
    	auto gano=[&](ll i, ll j){
    		return query(j,i,i,i);
    	};
    	vector<ll>v;
    	fore(i,0,n){
    		while(SZ(v)&&gano(i,v.back()))L[i]=v.back(),v.pop_back();
    		if(SZ(v))R[v.back()]=i;
    		v.pb(i);
    	}
        return 0;
    }
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 344 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 9 ms 420 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 12 ms 432 KB Execution killed with signal 13
2 Halted 0 ms 0 KB -