제출 #522264

#제출 시각아이디문제언어결과실행 시간메모리
522264new_accPoi (IOI09_poi)C++14
5 / 100
247 ms36192 KiB
#include<bits/stdc++.h> #define fi first #define se second #define rep(a, b) for(int a = 0; a < (int)(b); a++) using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<ll> vl; const int N=5e5+10; pair<int,int>t[N]; int ile[N]; vi xd[N]; void solve(){ int n,m,p; cin>>n>>m>>p; p--; rep(i,n){ rep(j,m){ int a; cin>>a; ile[j]+=!a; xd[i].push_back(a); } } rep(i,n){ rep(j,m) if(xd[i][j]==1) t[i].fi+=ile[j]; t[i].se=i; } sort(t,t+n); rep(i,n) if(t[i].se==p) cout<<t[i].fi<<" "<<i+1<<"\n"; } int main(){ ios_base::sync_with_stdio(0),cin.tie(0); solve(); }
#Verdict Execution timeMemoryGrader output
Fetching results...