Submission #961237

#TimeUsernameProblemLanguageResultExecution timeMemory
961237IUA_HasinFriend (IOI14_friend)C++17
16 / 100
1 ms504 KiB
#include "friend.h" #include <bits/stdc++.h> #define endl "\n" #define yeap cout<<"YES"<<endl #define nope cout<<"NO"<<endl #define ll long long using namespace std; // Find out best sample int findSample(int n,int confidence[],int host[],int protocol[]){ if(protocol[1]==1){ ll ans = 0; for(int i=0; i<n; i++){ ans = ans+confidence[i]; } return ans; } else if(protocol[1]==2){ int ans = -1; for(int i=0; i<n; i++){ ans = max(ans, confidence[i]); } return ans; } }

Compilation message (stderr)

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