| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 531448 | AdamGS | Poi (IOI09_poi) | C++17 | 239 ms | 23800 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;
typedef long long ll;
typedef long double ld;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
const int LIM=2e3+7;
int ile[LIM], T[LIM][LIM];
pair<pair<int,int>,int>W[LIM];
int main() {
	ios_base::sync_with_stdio(0); cin.tie(0);
	int n, t, p;
	cin >> n >> t >> p; --p;
	rep(i, t) ile[i]=n;
	rep(i, n) rep(j, t) {
		cin >> T[i][j];
		if(T[i][j]) --ile[j];
	}
	rep(i, n) {
		int a=0, b=0;
		rep(j, t) {
			if(T[i][j]) a+=ile[j];
			b+=T[i][j];
		}
		W[i]={{-a, -b}, i};
	}
	sort(W, W+n);
	rep(i, n) if(W[i].nd==p) {
		cout << -W[i].st.st << " " << i+1 << '\n';
	}
}
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
