結果

問題 No.2301 Namorientation
ユーザー tailstails
提出日時 2023-05-15 12:16:31
言語 cLay
(20240104-1)
結果
AC  
実行時間 44 ms / 3,000 ms
コード長 251 bytes
コンパイル時間 2,975 ms
コンパイル使用メモリ 177,360 KB
実行使用メモリ 22,272 KB
最終ジャッジ日時 2024-05-07 22:08:52
合計ジャッジ時間 11,253 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 2 ms
5,248 KB
testcase_02 AC 3 ms
5,376 KB
testcase_03 AC 2 ms
6,944 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 1 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 25 ms
11,264 KB
testcase_13 AC 23 ms
10,496 KB
testcase_14 AC 37 ms
15,488 KB
testcase_15 AC 30 ms
12,160 KB
testcase_16 AC 32 ms
14,080 KB
testcase_17 AC 24 ms
11,392 KB
testcase_18 AC 37 ms
14,464 KB
testcase_19 AC 24 ms
10,240 KB
testcase_20 AC 37 ms
14,336 KB
testcase_21 AC 30 ms
11,904 KB
testcase_22 AC 24 ms
22,272 KB
testcase_23 AC 24 ms
22,016 KB
testcase_24 AC 21 ms
18,944 KB
testcase_25 AC 13 ms
13,824 KB
testcase_26 AC 16 ms
16,512 KB
testcase_27 AC 41 ms
15,616 KB
testcase_28 AC 38 ms
15,744 KB
testcase_29 AC 41 ms
15,872 KB
testcase_30 AC 39 ms
15,744 KB
testcase_31 AC 44 ms
15,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int z[3d5];
graph g;
void f(int i){
	rep[g.edge[i]](j,g.es[i])if(!z[j])z[j]=i,f(j);
}
{
	int@n,m,a[n],b[],r[n+1];
	rd((a,b)(n));
	g.setEdge(n+1,n,a,b);
	m=g.anUndirectedCycle(r);
	f(*r);
	rep(i,m)z[r[i]]=r[i+1];
	rep(i,n)wt(z[a[i]]-b[i]?"<-":"->");
}
0