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 <bits/stdc++.h>
// Find out best sample
int findSample(int n,int confidence[],int host[],int protocol[]){
int alfa=1,beta=0;
int cores[n]={};
for(int i=1;i!=n;++i){
int h = host[i];
int c = cores[h];
if(protocol[i]==0){///I am your friend
cores[i]=!c;
if(!c)++beta;else ++alfa;
}else {
cores[i]=c;
if(c)++beta;else ++alfa;
}
}
return std::max(alfa,beta);
}
# | 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... |