# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1064198 | wood | Friend (IOI14_friend) | C++17 | 1 ms | 604 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"
#include <bits/stdc++.h>
#define pb push_back
#define ll long long
using namespace std;
// Find out best sample
int findSample(int n,int confidence[],int host[],int protocol[]){
int res[n][3]; res[0][0] = res[0][1] = 0; res[0][2] = 1;
for(int i = 1; i<n; i++){
if(protocol[i]==0){
res[i][0] = res[host[i]][1];
res[i][1] = res[host[i]][2];
res[i][2] = res[host[i]][1]+1;
}
else{
res[i][0] = res[host[i]][0];
res[i][1] = res[host[i]][2];
res[i][2] = res[host[i]][0]+1;
}
}
cout<<max(max(res[n-1][0],res[n-1][1]),res[n-1][2]);
}
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |