| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 520187 | tkwiatkowski | Poi (IOI09_poi) | C++17 | 279 ms | 12036 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
/*
	Zadanie: POI
	Autor: Tomasz Kwiatkowski
*/
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2e3 + 7;
int score[MAXN];
bool solved[MAXN][MAXN];
int main()
{
	ios_base::sync_with_stdio(0), cin.tie(0);
	int n, t, p;
	cin >> n >> t >> p;
	for (int i = 1; i <= n; ++i) {
		for (int j = 1; j <= t; ++j) {
			cin >> solved[i][j];
			if (!solved[i][j])
				score[j] += 1;
		}
	}
	int p_score = 0, p_solved = 0;
	for (int j = 1; j <= t; ++j) {
		p_score += solved[p][j]*score[j];
		p_solved += solved[p][j];
	}
	int p_place = 1;
	for (int i = 1; i <= n; ++i) {
		int c_score = 0, c_solved = 0;
		for (int j = 1; j <= t; ++j) {
			c_score += solved[i][j]*score[j];
			c_solved += solved[i][j];
		}
		if ((c_score > p_score) || (c_score == p_score && c_solved > p_solved) || (c_score == p_score && c_solved == p_solved && i < p))
			++p_place;
	}
	cout << p_score << ' ' << p_place << '\n';
	return 0;
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
