結果

問題 No.1301 Strange Graph Shortest Path
ユーザー tailstails
提出日時 2021-04-09 12:10:59
言語 cLay
(20240104-1)
結果
AC  
実行時間 238 ms / 3,000 ms
コード長 317 bytes
コンパイル時間 2,973 ms
コンパイル使用メモリ 175,360 KB
実行使用メモリ 42,260 KB
最終ジャッジ日時 2023-09-19 02:21:49
合計ジャッジ時間 11,209 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,408 KB
testcase_01 AC 2 ms
5,344 KB
testcase_02 AC 174 ms
34,864 KB
testcase_03 AC 132 ms
31,016 KB
testcase_04 AC 234 ms
40,272 KB
testcase_05 AC 122 ms
33,268 KB
testcase_06 AC 200 ms
36,864 KB
testcase_07 AC 174 ms
34,852 KB
testcase_08 AC 133 ms
31,300 KB
testcase_09 AC 195 ms
35,704 KB
testcase_10 AC 138 ms
31,392 KB
testcase_11 AC 205 ms
36,720 KB
testcase_12 AC 212 ms
37,684 KB
testcase_13 AC 168 ms
35,000 KB
testcase_14 AC 179 ms
34,328 KB
testcase_15 AC 173 ms
33,756 KB
testcase_16 AC 238 ms
40,632 KB
testcase_17 AC 182 ms
35,976 KB
testcase_18 AC 166 ms
33,456 KB
testcase_19 AC 210 ms
37,232 KB
testcase_20 AC 210 ms
38,300 KB
testcase_21 AC 185 ms
35,588 KB
testcase_22 AC 213 ms
39,312 KB
testcase_23 AC 173 ms
35,452 KB
testcase_24 AC 203 ms
37,920 KB
testcase_25 AC 229 ms
39,056 KB
testcase_26 AC 184 ms
35,348 KB
testcase_27 AC 204 ms
36,364 KB
testcase_28 AC 139 ms
32,580 KB
testcase_29 AC 238 ms
41,336 KB
testcase_30 AC 220 ms
38,012 KB
testcase_31 AC 224 ms
39,020 KB
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 85 ms
42,260 KB
testcase_34 AC 167 ms
31,168 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