結果

問題 No.2254 Reverse Only
ユーザー tailstails
提出日時 2023-03-25 14:56:52
言語 cLay
(20240104-1)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 271 bytes
コンパイル時間 7,089 ms
コンパイル使用メモリ 209,564 KB
実行使用メモリ 10,380 KB
最終ジャッジ日時 2023-10-19 01:37:23
合計ジャッジ時間 8,590 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
7,860 KB
testcase_01 AC 2 ms
7,860 KB
testcase_02 AC 2 ms
7,860 KB
testcase_03 AC 2 ms
7,860 KB
testcase_04 AC 2 ms
7,860 KB
testcase_05 AC 2 ms
7,860 KB
testcase_06 AC 2 ms
7,860 KB
testcase_07 AC 2 ms
7,860 KB
testcase_08 AC 17 ms
10,380 KB
testcase_09 AC 12 ms
10,376 KB
testcase_10 AC 9 ms
10,376 KB
testcase_11 AC 16 ms
10,376 KB
testcase_12 AC 15 ms
10,376 KB
testcase_13 AC 11 ms
10,376 KB
testcase_14 AC 12 ms
10,376 KB
testcase_15 AC 12 ms
10,376 KB
testcase_16 AC 12 ms
10,376 KB
testcase_17 AC 13 ms
10,376 KB
testcase_18 AC 15 ms
10,376 KB
testcase_19 AC 11 ms
10,376 KB
testcase_20 AC 10 ms
10,376 KB
testcase_21 AC 10 ms
10,376 KB
testcase_22 AC 7 ms
10,132 KB
testcase_23 AC 9 ms
10,376 KB
testcase_24 AC 9 ms
10,376 KB
testcase_25 AC 9 ms
10,376 KB
testcase_26 AC 10 ms
10,376 KB
testcase_27 AC 2 ms
7,908 KB
testcase_28 AC 5 ms
8,668 KB
testcase_29 AC 7 ms
9,536 KB
testcase_30 AC 7 ms
9,432 KB
testcase_31 AC 5 ms
8,724 KB
testcase_32 AC 5 ms
8,848 KB
testcase_33 AC 3 ms
8,280 KB
testcase_34 AC 9 ms
9,744 KB
testcase_35 AC 6 ms
9,352 KB
testcase_36 AC 13 ms
10,136 KB
testcase_37 AC 14 ms
10,196 KB
testcase_38 AC 4 ms
8,524 KB
testcase_39 AC 12 ms
10,040 KB
testcase_40 AC 2 ms
7,908 KB
testcase_41 AC 6 ms
9,196 KB
testcase_42 AC 5 ms
8,588 KB
testcase_43 AC 9 ms
9,812 KB
testcase_44 AC 11 ms
10,280 KB
testcase_45 AC 10 ms
9,720 KB
testcase_46 AC 3 ms
7,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int@n,@k,@a[n],@b[n],f;
if(k<n-1){
	sortA(n,a);
	sortA(n,b);
}
unsigned m=time(0)|1,o=1,c=0,d=0,e=0;
rep(i,n){
	c=c*m+a[i];
	d=d*m+b[i];
	e=e+o*b[i];
	o*=m;
}
f=c==d;
if(n==k){
	f|=c==e;
}
if(k==n-1){
	rep(i,n){
		f|=c==d|c==e;
		c=c*m+(1-o)*a[i];
	}
}
wt(f?"Yes":"No");
0