# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
957615 | ezzzay | Olympiads (BOI19_olympiads) | C++14 | 3 ms | 8540 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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];
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |