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;
// Find out best sample
int findSample(int n,int confidence[],int host[],int protocol[]){
int type0 = 0,type1 = 0,type2 = 0;
int ans = 0;
for(int i = 1; i < n; i ++){
type0 |= (protocol[i]==0);
type1 |= (protocol[i]==1);
type2 |= (protocol[i]==2);
}
if(type0 and (!type1) and (!type2)){
}
else if(type1 and (!type0) and (!type2)){
for(int i = 0; i < n; i ++) ans += confidence[i];
}
else if(type2 and (!type1) and (!type0)){
for(int i = 0; i < n; i ++) ans = max(ans,confidence[i]);
}
else{
}
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... |