結果

問題 No.2254 Reverse Only
ユーザー tailstails
提出日時 2023-03-25 14:52:15
言語 cLay
(20240104-1)
結果
AC  
実行時間 20 ms / 2,000 ms
コード長 265 bytes
コンパイル時間 6,949 ms
コンパイル使用メモリ 209,276 KB
実行使用メモリ 11,972 KB
最終ジャッジ日時 2023-10-19 01:33:05
合計ジャッジ時間 9,513 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
7,888 KB
testcase_01 AC 3 ms
7,888 KB
testcase_02 AC 3 ms
7,888 KB
testcase_03 AC 3 ms
7,888 KB
testcase_04 AC 3 ms
7,888 KB
testcase_05 AC 2 ms
7,888 KB
testcase_06 AC 2 ms
7,888 KB
testcase_07 AC 3 ms
7,888 KB
testcase_08 AC 20 ms
11,972 KB
testcase_09 AC 15 ms
11,972 KB
testcase_10 AC 13 ms
11,972 KB
testcase_11 AC 20 ms
11,972 KB
testcase_12 AC 20 ms
11,972 KB
testcase_13 AC 15 ms
11,972 KB
testcase_14 AC 14 ms
11,972 KB
testcase_15 AC 14 ms
11,972 KB
testcase_16 AC 15 ms
11,972 KB
testcase_17 AC 15 ms
11,972 KB
testcase_18 AC 19 ms
11,972 KB
testcase_19 AC 14 ms
11,972 KB
testcase_20 AC 13 ms
11,972 KB
testcase_21 AC 13 ms
11,972 KB
testcase_22 AC 9 ms
11,728 KB
testcase_23 AC 13 ms
11,972 KB
testcase_24 AC 12 ms
11,972 KB
testcase_25 AC 13 ms
11,972 KB
testcase_26 AC 13 ms
11,972 KB
testcase_27 AC 3 ms
7,984 KB
testcase_28 AC 6 ms
9,032 KB
testcase_29 AC 8 ms
10,288 KB
testcase_30 AC 10 ms
10,092 KB
testcase_31 AC 6 ms
9,112 KB
testcase_32 AC 6 ms
9,284 KB
testcase_33 AC 4 ms
8,496 KB
testcase_34 AC 10 ms
10,704 KB
testcase_35 AC 7 ms
9,980 KB
testcase_36 AC 17 ms
11,488 KB
testcase_37 AC 18 ms
11,604 KB
testcase_38 AC 5 ms
8,836 KB
testcase_39 AC 16 ms
11,300 KB
testcase_40 AC 3 ms
7,984 KB
testcase_41 AC 7 ms
9,768 KB
testcase_42 AC 6 ms
8,924 KB
testcase_43 AC 11 ms
10,844 KB
testcase_44 AC 14 ms
11,776 KB
testcase_45 AC 13 ms
10,656 KB
testcase_46 AC 3 ms
7,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@k,@a[n],@b[n],f;
if(k<n-1){
	sortA(n,a);
	sortA(n,b);
}
ull 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