Submission #874010

#TimeUsernameProblemLanguageResultExecution timeMemory
874010teacupFriend (IOI14_friend)C++14
8 / 100
1 ms604 KiB
#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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...