結果

問題 No.1449 新プロランド
ユーザー tailstails
提出日時 2022-10-26 19:51:10
言語 cLay
(20240104-1)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 3,503 ms
コンパイル使用メモリ 176,548 KB
実行使用メモリ 6,084 KB
最終ジャッジ日時 2023-08-25 16:54:13
合計ジャッジ時間 3,624 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,380 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 4 ms
6,084 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 AC 2 ms
5,928 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,376 KB
testcase_11 AC 2 ms
5,868 KB
testcase_12 AC 3 ms
4,376 KB
testcase_13 AC 1 ms
4,384 KB
testcase_14 AC 2 ms
5,804 KB
testcase_15 AC 2 ms
4,376 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 1 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 1 ms
4,376 KB
testcase_21 AC 2 ms
4,384 KB
testcase_22 AC 1 ms
4,376 KB
testcase_23 AC 2 ms
5,936 KB
testcase_24 AC 2 ms
4,376 KB
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 8 ms
6,012 KB
testcase_28 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

unsigned@n,@m;
int a[m],b[];
unsigned c[];
rd((a--,b--,c)(m));
unsigned@t[n];
wgraph<unsigned>g;
g.setEdge(n,m,a,b,c);
DijkstraHeap<unsigned>h;
h.walloc(n<<10,1);
h.change(0,0);
while(1){
	unsigned s=h.pop();
	unsigned u=s>>10;
	unsigned w=h.val[s];
	if(u==n-1){
		wt(w);
		exit(0);
	}
	w+=t[u];
	s=min(1023,(s&1023)+t[u]);
	rep(j,g.es[u]){
		h.change(g.edge[u][j]<<10|s,w+g.cost[u][j]/s);
	}
}
0