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>
using namespace std;
int findSample (int N, int confidence[], int host[], int protocol[])
{
int ans = 0;
for (int i=1; i<N; i++)
{
int x = host[i], y = i, curr = min (confidence[x], confidence[y]);
ans += curr;
confidence[x] -= curr;
confidence[y] -= curr;
}
for (int i=0; i<N; i++)
ans += confidence[i];
return ans;
}
# | 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... |