結果

問題 No.1301 Strange Graph Shortest Path
ユーザー tailstails
提出日時 2020-11-27 22:40:52
言語 cLay
(20240104-1)
結果
AC  
実行時間 234 ms / 3,000 ms
コード長 317 bytes
コンパイル時間 3,116 ms
コンパイル使用メモリ 176,528 KB
実行使用メモリ 40,328 KB
最終ジャッジ日時 2023-09-19 01:53:14
合計ジャッジ時間 14,355 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,060 KB
testcase_01 AC 2 ms
5,064 KB
testcase_02 AC 164 ms
32,740 KB
testcase_03 AC 125 ms
29,004 KB
testcase_04 AC 233 ms
38,184 KB
testcase_05 AC 124 ms
31,428 KB
testcase_06 AC 199 ms
34,644 KB
testcase_07 AC 170 ms
32,888 KB
testcase_08 AC 129 ms
29,128 KB
testcase_09 AC 199 ms
33,512 KB
testcase_10 AC 136 ms
29,420 KB
testcase_11 AC 211 ms
34,648 KB
testcase_12 AC 213 ms
35,668 KB
testcase_13 AC 168 ms
32,980 KB
testcase_14 AC 179 ms
32,240 KB
testcase_15 AC 172 ms
32,000 KB
testcase_16 AC 234 ms
38,600 KB
testcase_17 AC 186 ms
34,104 KB
testcase_18 AC 158 ms
31,216 KB
testcase_19 AC 208 ms
35,260 KB
testcase_20 AC 214 ms
36,284 KB
testcase_21 AC 180 ms
33,524 KB
testcase_22 AC 217 ms
37,280 KB
testcase_23 AC 175 ms
33,368 KB
testcase_24 AC 215 ms
35,916 KB
testcase_25 AC 215 ms
36,844 KB
testcase_26 AC 178 ms
33,468 KB
testcase_27 AC 192 ms
34,152 KB
testcase_28 AC 136 ms
30,748 KB
testcase_29 AC 233 ms
39,300 KB
testcase_30 AC 210 ms
36,072 KB
testcase_31 AC 218 ms
36,972 KB
testcase_32 AC 1 ms
5,000 KB
testcase_33 AC 85 ms
40,328 KB
testcase_34 AC 162 ms
29,144 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int u[1d5],v[1d5];
int c[1d5],d[1d5];
{
	int @n,@m;
	rd((u,v,c,d)(m));
	minCostFlow<int,ll>f;
	f.malloc(n+1);
	f.init(n+1);
	rep(i,m){
		f.addEdge(u[i],v[i],1,c[i]);
		f.addEdge(v[i],u[i],1,c[i]);
		f.addEdge(u[i],v[i],1,d[i]);
		f.addEdge(v[i],u[i],1,d[i]);
	}
	ll fres,cres;
	f.solve(1,n,fres,cres,2);
	wt(cres);
}
0