| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 239127 | T0p_ | Poi (IOI09_poi) | C++14 | 425 ms | 24144 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
 #include<bits/stdc++.h>
 using namespace std;
 
 struct DATA
 {
 	int score, num, no;
 	bool operator < (const DATA & o) const{
 		return (score != o.score) ? score < o.score : ((num != o.num) ? num < o.num : no > o.no);
 	}
 };
 int result[2020][2020], score[2020], point[2020], sum[2020];
 priority_queue<DATA> heap;
 int main()
 {
 	int n, t, p;
 	scanf(" %d %d %d",&n,&t,&p);
 	for(int i=1 ; i<=t ; i++) score[i] = n;
 	for(int i=1 ; i<=n ; i++)
 		for(int j=1 ; j<=t ; j++)
 		{
 			scanf(" %d",&result[i][j]);
 			score[j] -= result[i][j];
 		}
 	for(int i=1 ; i<=n ; i++)
 		for(int j=1 ; j<=t ; j++)
 		{
 			point[i] += score[j] * result[i][j];
 			sum[i] += result[i][j];
 		}
 	for(int i=1 ; i<=n ; i++)
 		heap.push({point[i], sum[i], i});
 	for(int i=1 ; i<=n ; i++)
 	{
 		if(heap.top().no == p)
 		{
 			printf("%d %d\n",heap.top().score, i);
 			return 0;
 		}
 		heap.pop();
 	}
 	return 0;
 }
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
