# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
957615 | 2024-04-04T05:50:12 Z | ezzzay | Olympiads (BOI19_olympiads) | C++14 | 3 ms | 8540 KB |
#include<bits/stdc++.h> using namespace std; #define int long long #define ff first #define ss second #define pb push_back const int N=2e3+4; int a[N][N]; signed main(){ int n,k,c; cin>>n>>k>>c; vector<int>vc; for(int i=1;i<=n;i++){ for(int j=1;j<=k;j++){ cin>>a[i][j]; } } int s=0; for(int i=1;i<=n;i++){ int tmp[N]; for(int l=0;l<=k;l++)tmp[l]=0; for(int l=0;l<=n;l++){ if(i==l)continue; for(int j=1;j<=k;j++){ tmp[j]=max(tmp[j],a[l][j]); } } int h=0; for(int j=1;j<=k;j++)h+=tmp[j]; vc.pb(h); } sort(vc.begin(),vc.end(), greater<int>()); cout<<vc[k-1]; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 8540 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 1 ms | 2396 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 8540 KB | Output is correct |
2 | Correct | 3 ms | 8540 KB | Output is correct |
3 | Incorrect | 3 ms | 8540 KB | Output isn't correct |
4 | Halted | 0 ms | 0 KB | - |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Incorrect | 2 ms | 8540 KB | Output isn't correct |
2 | Halted | 0 ms | 0 KB | - |