結果

問題 No.2301 Namorientation
ユーザー tailstails
提出日時 2023-05-15 12:16:31
言語 cLay
(20240104-1)
結果
AC  
実行時間 53 ms / 3,000 ms
コード長 251 bytes
コンパイル時間 4,893 ms
コンパイル使用メモリ 173,452 KB
実行使用メモリ 27,248 KB
最終ジャッジ日時 2023-08-20 15:43:50
合計ジャッジ時間 19,311 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,612 KB
testcase_01 AC 2 ms
4,960 KB
testcase_02 AC 2 ms
5,024 KB
testcase_03 AC 2 ms
4,956 KB
testcase_04 AC 2 ms
5,020 KB
testcase_05 AC 2 ms
4,960 KB
testcase_06 AC 2 ms
5,020 KB
testcase_07 AC 2 ms
4,956 KB
testcase_08 AC 2 ms
4,952 KB
testcase_09 AC 2 ms
4,952 KB
testcase_10 AC 2 ms
5,020 KB
testcase_11 AC 2 ms
4,952 KB
testcase_12 AC 29 ms
10,888 KB
testcase_13 AC 24 ms
13,908 KB
testcase_14 AC 43 ms
14,728 KB
testcase_15 AC 33 ms
14,212 KB
testcase_16 AC 41 ms
13,464 KB
testcase_17 AC 28 ms
14,100 KB
testcase_18 AC 43 ms
13,816 KB
testcase_19 AC 25 ms
14,020 KB
testcase_20 AC 43 ms
13,488 KB
testcase_21 AC 32 ms
14,352 KB
testcase_22 AC 35 ms
25,420 KB
testcase_23 AC 34 ms
27,248 KB
testcase_24 AC 29 ms
25,056 KB
testcase_25 AC 16 ms
13,320 KB
testcase_26 AC 22 ms
19,224 KB
testcase_27 AC 44 ms
17,328 KB
testcase_28 AC 53 ms
17,356 KB
testcase_29 AC 47 ms
17,236 KB
testcase_30 AC 49 ms
17,256 KB
testcase_31 AC 47 ms
17,308 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