제출 #874061

#제출 시각아이디문제언어결과실행 시간메모리
874061WongYiKai친구 (IOI14_friend)C++17
8 / 100
1 ms600 KiB
#include <bits/stdc++.h> using namespace std; int findSample(int n, int confidence[], int host[], int protocol[]){ int temp,temp2,test = 0,high = 0; for (int i=0;i<n;i++){ temp = confidence[i]; high = max(high,temp); } for (int i=1;i<n;i++){ if (protocol[i] != 2) test = 1; } if (test == 0){ return high; } }

컴파일 시 표준 에러 (stderr) 메시지

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:5:13: warning: unused variable 'temp2' [-Wunused-variable]
    5 |    int temp,temp2,test = 0,high = 0;
      |             ^~~~~
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...