# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
102312 | janlivens | Ball Machine (BOI13_ballmachine) | C++14 | 1082 ms | 9720 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.
// This Program is made by Jan(Codezebra)
#include<bits/stdc++.h>
//#define int long long
//#define INF 0x3f3f3f3f3f3f3f3f
using namespace std;
int n,q;
int root;
vector<bool> vol;
vector<int>parent;
vector<vector<pair<int,int> > >children;
//vector<int>m;
int find(int x){
for(int i=0;i<children[parent[x]].size();i++){
if(children[parent[x]][i].second==x){
return i;
}
}
return -1;
}
int build(int x){
// cout<<x<<" % ";
if(children[x].empty()){
//cout<<"0";
return children[parent[x]][find(x)].first=x;
Compilation message (stderr)
# | 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... |