Submission #296635

#TimeUsernameProblemLanguageResultExecution timeMemory
296635emil_physmathFriend (IOI14_friend)C++17
16 / 100
1 ms384 KiB
#include <algorithm> #include <numeric> #include "friend.h" using namespace std; using llong = long long; enum Protocol { ME = 0, MY = 1, WE = 2 }; // Find out best sample int findSample(int n, int a[], int host[], int prot[]){ if (count(prot + 1, prot + n, ME) == n - 1) { } if (count(prot + 1, prot + n, MY) == n - 1) return accumulate(a, a + n, 0); if (count(prot + 1, prot + n, WE) == n - 1) return *max_element(a, a + n); }

Compilation message (stderr)

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:16:1: warning: control reaches end of non-void function [-Wreturn-type]
   16 | }
      | ^
#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...