제출 #1042656

#제출 시각아이디문제언어결과실행 시간메모리
1042656jer033친구 (IOI14_friend)C++17
0 / 100
1 ms448 KiB
#include "friend.h" #include <bits/stdc++.h> using namespace std; // Find out best sample int findSample(int n,int confidence[],int host[],int protocol[]){ if (protocol[0] == 1) { int ans = 0; for (int k=0; k<n; k++) ans+=confidence[k]; return ans; } int ans = 0; for (int k=0; k<n; k++) { if (confidence[k ]> ans); ans = confidence[k]; } return ans; }

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

friend.cpp: In function 'int findSample(int, int*, int*, int*)':
friend.cpp:17:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   17 |         if (confidence[k ]> ans);
      |         ^~
friend.cpp:18:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
   18 |             ans = confidence[k];
      |             ^~~
#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...