제출 #296635

#제출 시각아이디문제언어결과실행 시간메모리
296635emil_physmath친구 (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); }

컴파일 시 표준 에러 (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...