結果

問題 No.2387 Yokan Factory
ユーザー tailstails
提出日時 2023-07-21 22:02:10
言語 cLay
(20240104-1)
結果
AC  
実行時間 435 ms / 5,000 ms
コード長 482 bytes
コンパイル時間 5,292 ms
コンパイル使用メモリ 178,644 KB
実行使用メモリ 15,112 KB
最終ジャッジ日時 2023-10-21 22:04:25
合計ジャッジ時間 8,727 ms
ジャッジサーバーID
(参考情報)
judge13 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,756 KB
testcase_01 AC 2 ms
7,756 KB
testcase_02 AC 3 ms
7,756 KB
testcase_03 AC 3 ms
7,756 KB
testcase_04 AC 3 ms
7,756 KB
testcase_05 AC 3 ms
7,756 KB
testcase_06 AC 3 ms
7,756 KB
testcase_07 AC 3 ms
7,756 KB
testcase_08 AC 3 ms
7,756 KB
testcase_09 AC 3 ms
7,756 KB
testcase_10 AC 3 ms
7,756 KB
testcase_11 AC 2 ms
7,756 KB
testcase_12 AC 3 ms
7,756 KB
testcase_13 AC 3 ms
7,756 KB
testcase_14 AC 3 ms
7,756 KB
testcase_15 AC 104 ms
15,112 KB
testcase_16 AC 22 ms
13,064 KB
testcase_17 AC 137 ms
13,124 KB
testcase_18 AC 338 ms
14,916 KB
testcase_19 AC 227 ms
12,084 KB
testcase_20 AC 181 ms
12,000 KB
testcase_21 AC 435 ms
12,716 KB
testcase_22 AC 167 ms
11,888 KB
testcase_23 AC 257 ms
12,128 KB
testcase_24 AC 78 ms
11,924 KB
testcase_25 AC 150 ms
9,544 KB
testcase_26 AC 282 ms
12,316 KB
testcase_27 AC 357 ms
12,600 KB
testcase_28 AC 3 ms
7,788 KB
testcase_29 AC 4 ms
7,796 KB
testcase_30 AC 3 ms
7,792 KB
testcase_31 AC 3 ms
7,780 KB
testcase_32 AC 3 ms
7,768 KB
testcase_33 AC 3 ms
7,768 KB
testcase_34 AC 4 ms
7,796 KB
testcase_35 AC 3 ms
7,788 KB
testcase_36 AC 3 ms
7,768 KB
testcase_37 AC 3 ms
7,760 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
warning: unknown type [error] for rd (reader) : ab[i].first
warning: unknown type [error] for rd (reader) : ab[i].second

ソースコード

diff #

wgraph<pair<int,int>>g;
ll@n,@m,@x;
int u[m],v[];
pair<int,int>ab[];
rep(i,m){
	rd(u[i]--,v[i]--,ab[i].first,ab[i].second);
}
g.setEdge(n,m,u,v,ab);
DijkstraHeap<ll>h;
h.malloc(n);
ll ok=-1,ng=1d9+1;
while(ok+1<ng){
	ll z=ok+ng>>1;
	h.init(n);
	h.change(0,0);
	while(h.size){
		ll i=h.pop();
		rep(j,g.es[i]){
			if(g.cost[i][j].second>=z){
				h.change(g.edge[i][j],h.val[i]+g.cost[i][j].first);
			}
		}
	}
	if(h.visited[n-1]&&h.val[n-1]<=x){
		ok=z;
	}else{
		ng=z;
	}
}
wt(ok);
0