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;
bool subtask[6];
int findSample(int n,int confidence[],int host[],int protocol[]) {
for(int i = 1 ; i<= 5 ; i++)
subtask[i] = 1;
if(n > 10)
subtask[1] = 0;
for(int i = 1 ; i < n ; i++) {
if(protocol[i] == 0)
subtask[2] = subtask[3] = 0;
if(protocol[i] == 1)
subtask[3] = subtask[4] = 0;
if(protocol[i] == 2)
subtask[2] = subtask[4] = subtask[5] = 0;
}
if(subtask[2]) {
int sum = 0;
for(int i = 0 ; i < n ; i++)
sum += confidence[i];
return sum;
}
if(subtask[3]) {
int maxv = 0;
for(int i = 0 ; i < n ; i++)
maxv = max(maxv, confidence[i]);
return maxv;
}
return 0;
}
# | 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... |