# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
512609 | new_acc | Exam (eJOI20_exam) | C++14 | 148 ms | 12432 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#define fi first
#define se second
#define rep(a, b) for(ll a = 0; a < (b); a++)
using namespace std;
typedef long long ll;
typedef vector<ll> vi;
typedef vector<ll> vl;
const int N=1e5+10;
const int SS=1<<19;
int a[N],b[N],seg[SS*2+10];
pair<int,int> naj[N];
void Insert(int a,int ind){
for(ind+=SS;ind>0;ind>>=1) seg[ind]=max(seg[ind],a);
}
int Query(int pocz,int kon){
int res=0;
for(pocz+=SS-1,kon+=SS+1;(pocz>>1)!=(kon>>1);pocz>>=1,kon>>=1){
if(!(pocz&1)) res=max(res,seg[pocz+1]);
if(kon&1) res=max(res,seg[kon-1]);
}
return res;
}
unordered_map<int,int>m;
void solve(){
int n;
cin>>n;
rep(i,n) cin>>a[i];
rep(i,n) cin>>b[i];
rep(i,n) Insert(a[i],i);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |