| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 293969 | kshitij_sodani | Poi (IOI09_poi) | C++14 | 327 ms | 23840 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
#define a first
#define b second
#define pb push_back
typedef long long llo;
int n,m,t;
int it[2001][2001];
int co[2001];
int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	cin>>n>>m>>t;
	vector<pair<pair<int,int>,int>> ss;
	for(int i=0;i<n;i++){
		for(int j=0;j<m;j++){
			cin>>it[i][j];
			if(it[i][j]==0){
				co[j]+=1;
			}
		}
	}
	for(int i=0;i<n;i++){
		int so=0;
		int so2=0;
		for(int j=0;j<m;j++){
			if(it[i][j]==1){
				so+=co[j];
				so2+=1;
			}
		}
		ss.pb({{-so,-so2},i});
	}
	sort(ss.begin(),ss.end());
	for(int i=0;i<n;i++){
		if(ss[i].b==t-1){
			cout<<-ss[i].a.a<<" "<<i+1<<endl;
		}
	}
	
	return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
