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 pii pair<int,int>
using namespace std;
pii c[1005];
int findSample(int n, int confidence[], int host[], int protocol[]) {
for(int i=n-1; i>0; i--) {
c[i].first += confidence[i];
c[host[i]].first = max(c[host[i]].first, c[i].second);
c[host[i]].second += c[i].first;
}
return max(c[0].first, c[0].second); /// return maximum confidence possible
}
# | 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... |