# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1064425 | anango | Friend (IOI14_friend) | C++17 | 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 "friend.h"
#define int long long
int INF = 1LL<<60;
// Find out best sample
signed findSample(signed n,signed confidence[],signed host[],signed protocol[]){
int ans=10;
//let 0 denote i, 1 denote the friends of i
//let dp0[i] = answer if we are allowed 0 or 1
//dp1[i] = answer if we're only allowed 0
//dp2[i] = answer if we're only allowed 1
//dp3[i] = answer if we're allowed neither
//in the subtree of i
int ma = -INF;
for (int i=0; i<n; i++) {
ma=max(ma,confidence[i]);
}
return ma;
}