Submission #363556

#TimeUsernameProblemLanguageResultExecution timeMemory
363556silverfishFriend (IOI14_friend)C++14
16 / 100
1 ms364 KiB
#include "friend.h" #include <bits/stdc++.h> using namespace std; // Find out best sample int findSample(int n,int conf[],int host[],int protocol[]){ bool subtask2 = 1, subtask3 = 1; for(int i = 1; i < n; ++i){ if(protocol[i] != 1) subtask2 = 0; if(protocol[i] != 2) subtask3 = 0; } if(subtask2){ long long ans = 0; for(int i = 0; i < n; ++i) ans += 1LL*conf[i]; return ans; } if(subtask3){ return *max_element(conf, conf+n); } return -1; }
#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...