제출 #600305

#제출 시각아이디문제언어결과실행 시간메모리
600305CodulaPoi (IOI09_poi)C++17
5 / 100
245 ms39516 KiB
//IOI 2023 I am coming. #include "bits/stdc++.h" using namespace std; #define fast ios_base::sync_with_stdio(false);cin.tie(nullptr) #define int int64_t #define pb push_back int32_t main(){ fast; int n,t,p; cin>>n>>t>>p; vector<vector<int>>a(n,vector<int>(t,0)); vector<int>b(t); for(int i=0;i<n;++i){ for(int j=0;j<t;++j){ cin>>a[i][j]; b[j]+=a[i][j]; } } vector<pair<int,int>>scores(n); for(int i=0;i<n;++i){ for(int j=0;j<t;++j){ if(a[i][j]!=0){ scores[i].first+=(n-b[j]); scores[i].second=i; } } } p--; sort(scores.begin(),scores.end()); for(int i=0;i<n;++i){ if(scores[i].second==p){ cout<<scores[i].first<<" "<<i+1<<"\n"; break; } } //~ cout<<"\n"; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...