Submission #313469

#TimeUsernameProblemLanguageResultExecution timeMemory
313469kylych03Friend (IOI14_friend)C++14
16 / 100
3 ms2688 KiB
#include "friend.h" #include <bits/stdc++.h> //#include "grader.cpp" using namespace std; // Find out best sample bool f[3]; vector <int> g[100001]; int findSample(int n,int confidence[],int host[],int protocol[]){ int sum=0, mx=0; f[0]=f[1]=f[2]=false; for(int i = 1 ; i < n;i++){ f[protocol[i]]=true; } for(int i =0; i < n; i++){ sum +=confidence[i]; mx = max(mx, confidence[i] ); } if( f[0]==false && f[2]==false ) return sum; if( f[0]==false && f[1]==false ) return mx; if(n<=10){ } }

Compilation message (stderr)

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