| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 1113490 | Zflop | Poi (IOI09_poi) | C++14 | 402 ms | 24040 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
using namespace std;
 
#include <ext/pb_ds/assoc_container.hpp>
using namespace __gnu_pbds;
int N,M,P,A[2001][2001],scor_problema[2001];
void solve() {
	cin >> N >> M >> P;
	for (int i = 1; i <= N;++i) {
		for (int j = 1; j <= M;++j)
			cin >> A[i][j];
		}
	for (int j = 1; j <= M;++j) 
		for (int i = 1; i <= N;++i)
			scor_problema[j] += !A[i][j];
	vector<vector<int>>jucatori;
	for (int i = 1; i <= N;++i) {
		int scor = 0,tasks = 0;
		for (int j = 1; j <= M;++j) {
			if (A[i][j]) {
				++tasks;
				scor += scor_problema[j];
				}
			}
		jucatori.push_back({scor,tasks,i});
		}
	sort(jucatori.begin(),jucatori.end(),[&](vector<int>a,vector<int>b) {
		if (a[0] != b[0]) return a[0] > b[0];
		if (a[1] != b[1]) return a[1] > b[1];
		return a[2] < b[2];
		});
	for (int i = 0; i < N;++i)
		if (jucatori[i][2] == P)
			cout << jucatori[i][0] << ' ' << i + 1 << '\n';
	}
int main() {
	solve();
	return 0;
	}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
