| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 531448 | AdamGS | Poi (IOI09_poi) | C++17 | 239 ms | 23800 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#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... | ||||
