제출 #928930

#제출 시각아이디문제언어결과실행 시간메모리
928930UmairAhmadMirzaOlympiads (BOI19_olympiads)C++14
13 / 100
7 ms1092 KiB
#include <bits/stdc++.h> using namespace std; int const N=505; vector<int> arr[N]; vector<int> answer; int main(){ int n,k,c; cin>>n>>k>>c; for(int i=0;i<n;i++) for(int j=0;j<k;j++){ int a; cin>>a; arr[i].push_back(a); } for(int i=0;i<n;i++) for(int j=i+1;j<n;j++){ int sm=0; for(int t=0;t<k;t++) sm+=max(arr[i][t],arr[j][t]); answer.push_back(sm); } sort(answer.begin(),answer.end()); reverse(answer.begin(),answer.end()); cout<<answer[c-1]<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...