이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... |