# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
996248 | salmon | Jobs (BOI24_jobs) | C++14 | 0 ms | 0 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;
int N;
vector<int> root;
int h,h1;
long long int lst[300100];
int parent[300100];
pair<set<long long int>*,long long int> dfs(int i, int p){
}
int main(){
scanf(" %d",&N);
for(int i = 1; i <= N; i++){
scanf(" %d",&h);
scanf(" %d",&h1);
if(h1 == 0){
root.push_back(i);
}
lst[i] = h;
parent[i] = h1;
}
for(int i : root){
dfs(root,-1);
}
}