Submission #491945

#TimeUsernameProblemLanguageResultExecution timeMemory
491945davi_bartFriend (IOI14_friend)C++14
16 / 100
1 ms336 KiB
#include "friend.h" #pragma GCC optimize("O3") #include <bits/stdc++.h> using namespace std; #define ll long long // #define int ll #define fi first #define se second #define ld long double #define pb push_back mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); // Find out best sample int findSample(int N, int confidence[], int host[], int protocol[]) { if (protocol[1] == 1) { int tot = 0; for (int i = 0; i < N; i++) tot += confidence[i]; return tot; } if (protocol[1] == 2) { int tot = 0; for (int i = 0; i < N; i++) tot = max(confidence[i], tot); return tot; } }

Compilation message (stderr)

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