제출 #961237

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

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