# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
222678 | dfistric | Plahte (COCI17_plahte) | C++14 | 2097 ms | 127352 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<iostream>
#include<vector>
#include<map>
#include<set>
#include<cassert>
#include<algorithm>
using namespace std;
vector <pair<pair<int,int>,pair<int,int> > > v,v4;
vector <int> v2,t[525005],p[525005],v3[525005];
//vector <pair<int,int> > v1[160005];
vector <int> v5;
int off=1,parent[525005],cnt1[525005];
map <pair<int,int>,int> m1;
map <int,vector<pair<int,int> > > v1;
set <int> dfs(int x) {
//cout << x << "\n";
set <int> ret,s;
if(v[x].second.first==-1) {
ret.insert(m1[v[x].first]);
return ret;
}
for(int i=0;i<v3[x].size();i++) {
s=dfs(v3[x][i]);
if(ret.size()<s.size()) swap(ret,s);
for(set <int>::iterator it=s.begin();it!=s.end();it++) {
ret.insert(*it);
}
}
cnt1[x]=ret.size();
return ret;
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |