# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
874020 | 2023-11-16T07:54:30 Z | OSoverspike | Friend (IOI14_friend) | C++17 | 0 ms | 0 KB |
#include "friend.h" // Find out best sample int findSample(int n,int confidence[],int host[],int protocol[]){ int ans=0; if (protocol[1]==1) { for (int a=0; a<=n; a++) { ans+=confidence[a]; } } else { for (int a=0; a<=n; a++) { ans=max(ans, confidence[a]); } } return ans; }