| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 | 
|---|---|---|---|---|---|---|---|
| 261857 | Sakamotoo | Crocodile's Underground City (IOI11_crocodile) | C++14 | 930 ms | 74664 KiB | 
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "crocodile.h"
#include<bits/stdc++.h>
using namespace std;
#define mp make_pair
#define fi first
#define se second
int travel_plan(int n, int m, int r[][2], int l[], int k, int p[]){
	priority_queue<long long> jar[n+1];
	vector<pair<long long, long long> > adj[n+1];
	for(int i=0; i<m; i++){
		adj[r[i][0]].push_back(mp(r[i][1],l[i]));
		adj[r[i][1]].push_back(mp(r[i][0],l[i]));
	}
	
	priority_queue<pair<long long, long long> > pq;
	
	for(int i=0; i<k; i++){
		jar[p[i]].push(0);
		jar[p[i]].push(0);
		pq.push(mp(0,p[i]));
	}
	
	while(!pq.empty()){
		long long x=-pq.top().fi,y=pq.top().se;
		pq.pop();
		if(jar[y].top()<x) continue;
		if(x>1e9) continue;
		for(int i=0; i<adj[y].size(); i++){
			long long ind=adj[y][i].fi,cost=adj[y][i].se;
			
			if(jar[ind].size()<2){
				jar[ind].push(x+cost);
				if(jar[ind].size()==2){
					pq.push(mp(-jar[ind].top(),ind));
				}
			}else{
				if(jar[ind].top()>x+cost){
					jar[ind].pop();
					jar[ind].push(x+cost);
					pq.push(mp(-jar[ind].top(),ind));
				}
			}
		}
	}
	return jar[0].top();
}
컴파일 시 표준 에러 (stderr) 메시지
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output | 
|---|---|---|---|---|
| Fetching results... | ||||
