| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 210714 | socho | Poi (IOI09_poi) | C++14 | 852 ms | 15992 KiB | 
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "bits/stdc++.h"
using namespace std;
int main() {
	
	int n, t, f;
	cin >> n >> t >> f;
	
	int score[t];
	memset(score, 0, sizeof score);
	
	int by[n][t];
	
	vector<pair<int, pair<int, int> > > vc; // score, solves, -id
	
	for (int i=0; i<n; i++) {
		for (int j=0; j<t; j++) {
			cin >> by[i][j];
			if (by[i][j] == 0) score[j]++;
		}
	}
	
	for (int i=0; i<n; i++) {
		
		int person_solve = 0;
		int person_score = 0;
		
		for (int j=0; j<t; j++) {
			if (by[i][j]) {
				person_solve++;
				person_score += score[j];
			}
		}
		
		vc.push_back(make_pair(person_score, make_pair(person_solve, -i-1)));
	
	}
	
	sort(vc.begin(), vc.end());
	reverse(vc.begin(), vc.end());
	
	for (int i=0; i<n; i++) {
		if (vc[i].second.second == -f) {
			cout << vc[i].first << ' ' << i + 1 << endl;
		}
	}
	
	
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
