# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1045154 | karthi222528 | Factories (JOI14_factories) | C++17 | 8035 ms | 362108 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>
using namespace std;
struct segTree{
int n;
int inf = 1e9;
vector<pair<int,int>> st;
void init(int n){
this->n = n;
st.resize(4*n,{-1,inf});
}
pair<int,int> merge_pair(pair<int,int> &p1,pair<int,int> &p2){
if(p1.second<p2.second){
return p1;
}else{
if(p1.second>p2.second){
return p2;
}
if(p1.first<p2.first){
return p1;
}
return p2;
}
}
void build(int node,int s,int e,vector<pair<int,int>> &v){
if(s==e){
st[node] = v[s];
return;
}
int lc = 2*node + 1;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |