# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
586931 | 2022-07-01T05:27:50 Z | 반딧불(#8396) | Olympiads (BOI19_olympiads) | C++17 | 9 ms | 976 KB |
#include <bits/stdc++.h> using namespace std; typedef long long ll; int n, k, c; int mat[502][10]; vector<int> vec; int main(){ scanf("%d %d %d", &n, &k, &c); for(int i=1; i<=n; i++) for(int j=0; j<k; j++) scanf("%d", &mat[i][j]); if(k==1){ for(int i=1; i<=n; i++) vec.push_back(mat[i][0]); } else{ for(int i=1; i<=n; i++) for(int j=i+1; j<=n; j++) vec.push_back(max(mat[i][0], mat[j][0]) + max(mat[i][1], mat[j][1])); } sort(vec.rbegin(), vec.rend()); printf("%d", vec[c-1]); }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 9 ms | 976 KB | Output is correct |
2 | Correct | 8 ms | 848 KB | Output is correct |
3 | Correct | 6 ms | 976 KB | Output is correct |
4 | Correct | 4 ms | 948 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 212 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 5 ms | 976 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 9 ms | 976 KB | Output is correct |
2 | Correct | 8 ms | 848 KB | Output is correct |
3 | Correct | 6 ms | 976 KB | Output is correct |
4 | Correct | 4 ms | 948 KB | Output is correct |
5 | Incorrect | 1 ms | 212 KB | Output isn't correct |
6 | Halted | 0 ms | 0 KB | - |