# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
38121 | minchurl | Dreaming (IOI13_dreaming) | C++11 | 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>
#define MAX_N 100005
#define pb push_back
#define inf 0x7fffffff
using namespace std;
struct node{
int y,cost;
};
struct cmp{
bool operator()(node x,node y){
if(x.cost==y.cost) return x.y<y.y;
return x.cost>y.cost;
}
};
int N,M,L,an,b[MAX_N],bn,ans;
bool c1[MAX_N],c2[MAX_N],c3[MAX_N];
node arr[MAX_N],X,Y;
vector<node> net[MAX_N];
set<node,cmp> S;
void is_far(int x,int cost){
int sz;
node y;
c1[x]=true;
sz=net[x].size();
if(X.cost<cost){
X.cost=cost;
X.y=x;
}
while(sz--){
y=net[x][sz];