Submission #298077

#TimeUsernameProblemLanguageResultExecution timeMemory
298077mieszko11bFriend (IOI14_friend)C++14
16 / 100
1 ms512 KiB
#include "friend.h" #include <bits/stdc++.h> using namespace std; bool subtask[6]; int findSample(int n,int confidence[],int host[],int protocol[]) { for(int i = 1 ; i<= 5 ; i++) subtask[i] = 1; if(n > 10) subtask[1] = 0; for(int i = 1 ; i < n ; i++) { if(protocol[i] == 0) subtask[2] = subtask[3] = 0; if(protocol[i] == 1) subtask[3] = subtask[4] = 0; if(protocol[i] == 2) subtask[2] = subtask[4] = subtask[5] = 0; } if(subtask[2]) { int sum = 0; for(int i = 0 ; i < n ; i++) sum += confidence[i]; return sum; } if(subtask[3]) { int maxv = 0; for(int i = 0 ; i < n ; i++) maxv = max(maxv, confidence[i]); return maxv; } return 0; }
#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...