結果

問題 No.2630 Colorful Vertices and Cheapest Paths
ユーザー 👑 p-adicp-adic
提出日時 2024-02-17 19:20:50
言語 cLay
(20240104-1)
結果
AC  
実行時間 254 ms / 2,500 ms
コード長 282 bytes
コンパイル時間 2,462 ms
コンパイル使用メモリ 179,000 KB
実行使用メモリ 48,192 KB
最終ジャッジ日時 2024-02-17 19:20:58
合計ジャッジ時間 6,994 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 81 ms
16,832 KB
testcase_01 AC 193 ms
27,968 KB
testcase_02 AC 210 ms
44,352 KB
testcase_03 AC 3 ms
7,488 KB
testcase_04 AC 3 ms
7,488 KB
testcase_05 AC 3 ms
7,488 KB
testcase_06 AC 107 ms
12,736 KB
testcase_07 AC 184 ms
47,552 KB
testcase_08 AC 174 ms
43,072 KB
testcase_09 AC 205 ms
48,192 KB
testcase_10 AC 232 ms
48,064 KB
testcase_11 AC 235 ms
48,064 KB
testcase_12 AC 234 ms
48,064 KB
testcase_13 AC 234 ms
48,064 KB
testcase_14 AC 254 ms
48,064 KB
testcase_15 AC 175 ms
8,512 KB
testcase_16 AC 176 ms
8,512 KB
testcase_17 AC 176 ms
8,512 KB
testcase_18 AC 111 ms
19,264 KB
testcase_19 AC 161 ms
38,720 KB
testcase_20 AC 164 ms
33,088 KB
testcase_21 AC 176 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]=-1;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[a,q](s,Q)if((b>>C[U[q]])&1&(b>>C[V[q]])&t(U[q])==t(V[q])&(s<0|s>c))s=c;}wtLn(a(Q));
0