제출 #1224178

#제출 시각아이디문제언어결과실행 시간메모리
1224178sleepntsheepOlympiads (BOI19_olympiads)C++17
0 / 100
1 ms836 KiB
#include <stdio.h> #include <algorithm> using namespace std; #define N 505 #define K 3 int n, c, k, a[N][K], cc[N * N], tp; int main() { scanf("%d%d%d", &n, &k, &c); for (int i = 0; i < n; ++i) for (int j = 0; j < k; ++j) scanf("%d", &a[i][j]); for (int i = 0; i < n; ++i) for (int j = i + 1; j < n; ++j) { cc[tp++] = max(a[i][0], a[j][0]) + max(a[j][1], a[i][1]); } nth_element(cc, cc + c - 1, cc + tp); printf("%d\n", cc[c - 1]); return 0; }

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

olympiads.cpp: In function 'int main()':
olympiads.cpp:12:14: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   12 |         scanf("%d%d%d", &n, &k, &c);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~
olympiads.cpp:15:30: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
   15 |                         scanf("%d", &a[i][j]);
      |                         ~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...