結果

問題 No.2630 Colorful Vertices and Cheapest Paths
ユーザー 👑 p-adicp-adic
提出日時 2024-02-17 19:14:05
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 274 bytes
コンパイル時間 3,094 ms
コンパイル使用メモリ 179,536 KB
実行使用メモリ 48,192 KB
最終ジャッジ日時 2024-02-17 19:14:14
合計ジャッジ時間 7,991 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
16,832 KB
testcase_01 AC 201 ms
27,968 KB
testcase_02 AC 213 ms
44,352 KB
testcase_03 AC 3 ms
7,488 KB
testcase_04 WA -
testcase_05 AC 2 ms
7,488 KB
testcase_06 AC 100 ms
12,736 KB
testcase_07 AC 175 ms
47,552 KB
testcase_08 AC 165 ms
43,072 KB
testcase_09 AC 175 ms
48,192 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 193 ms
8,512 KB
testcase_16 AC 225 ms
8,512 KB
testcase_17 AC 185 ms
8,512 KB
testcase_18 AC 119 ms
19,264 KB
testcase_19 AC 156 ms
38,720 KB
testcase_20 AC 153 ms
33,088 KB
testcase_21 AC 183 ms
48,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@N,@M,@--(A,B)[M],@--C[N],@W[10],@Q,@--(U,V)[Q],a[Q],c;rep(q,Q)a[q]=1e18;REP(b,1024){c=sum[d,0,10@(b>>d)&1](W[d]);unionFind t('m',N,1);rep(j,M)if((b>>C[A[j]])&1&(b>>C[B[j]]))t.connect(A[j],B[j]);rep(q,Q)if((b>>C[U[q]])&1&(b>>C[V[q]])&t(U[q])==t(V[q]))a[q]<?=c;}wtLn(a(Q));
0