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 t1=confidence[0], t2=0;
int S[n]={}; S[0]=1;
for (int i=1; i<n; i++){
if (protocol[i]==0){
S[i]=3-S[host[i]];
}else if (protocol[i]==1){
S[i]=S[host[i]];
}else{
//clown
}
if (S[i]==1){
t1+=confidence[i];
}else if (S[i]==2){
t2+=confidence[i];
}
}
return max(t1,t2);
}
# | 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... |