結果

問題 No.2301 Namorientation
ユーザー tailstails
提出日時 2023-05-12 22:07:46
言語 cLay
(20240104-1)
結果
AC  
実行時間 44 ms / 3,000 ms
コード長 385 bytes
コンパイル時間 3,402 ms
コンパイル使用メモリ 164,616 KB
実行使用メモリ 30,616 KB
最終ジャッジ日時 2023-08-19 04:53:40
合計ジャッジ時間 12,388 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,728 KB
testcase_01 AC 2 ms
5,404 KB
testcase_02 AC 2 ms
5,460 KB
testcase_03 AC 2 ms
5,660 KB
testcase_04 AC 2 ms
5,472 KB
testcase_05 AC 2 ms
5,516 KB
testcase_06 AC 2 ms
5,412 KB
testcase_07 AC 2 ms
5,384 KB
testcase_08 AC 2 ms
5,408 KB
testcase_09 AC 2 ms
5,460 KB
testcase_10 AC 1 ms
5,412 KB
testcase_11 AC 2 ms
5,464 KB
testcase_12 AC 25 ms
14,132 KB
testcase_13 AC 21 ms
11,928 KB
testcase_14 AC 40 ms
17,100 KB
testcase_15 AC 30 ms
14,144 KB
testcase_16 AC 36 ms
16,824 KB
testcase_17 AC 26 ms
13,960 KB
testcase_18 AC 38 ms
16,804 KB
testcase_19 AC 22 ms
11,672 KB
testcase_20 AC 38 ms
16,752 KB
testcase_21 AC 28 ms
14,044 KB
testcase_22 AC 30 ms
30,616 KB
testcase_23 AC 31 ms
30,132 KB
testcase_24 AC 25 ms
27,536 KB
testcase_25 AC 14 ms
16,372 KB
testcase_26 AC 18 ms
19,220 KB
testcase_27 AC 42 ms
17,108 KB
testcase_28 AC 41 ms
17,096 KB
testcase_29 AC 43 ms
17,224 KB
testcase_30 AC 44 ms
17,168 KB
testcase_31 AC 42 ms
17,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int z[2d5];
graph g;

void f(int i,int p){
	rep[g.edge[i]](j,g.es[i]){
		if(j!=p&&!z[j]){
			z[j]=~i;
			f(j,i);
		}
	}
}

{
	int@n,a[n],b[],r[n+1];
	rd((a--,b--)(n));
	g.setEdge(n,n,a,b);
	int m=g.anUndirectedCycle(r);
	f(r[0],-1);
	rep(i,m){
		z[r[i]]=~r[i+1];
	}
	rep(i,n){
		if(z[a[i]]==~b[i]){
			wt("->");
		}else if(~a[i]==z[b[i]]){
			wt("<-");
		}else{
			wt("??");
		}
	}
}

0