結果

問題 No.2482 Sandglasses
ユーザー tailstails
提出日時 2023-09-22 22:11:01
言語 cLay
(20240104-1)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 179 bytes
コンパイル時間 7,091 ms
コンパイル使用メモリ 217,488 KB
実行使用メモリ 14,336 KB
最終ジャッジ日時 2024-04-28 09:02:03
合計ジャッジ時間 10,574 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 AC 41 ms
13,568 KB
testcase_04 AC 46 ms
13,440 KB
testcase_05 AC 34 ms
13,568 KB
testcase_06 AC 37 ms
13,568 KB
testcase_07 AC 35 ms
13,568 KB
testcase_08 AC 34 ms
13,568 KB
testcase_09 AC 37 ms
13,568 KB
testcase_10 AC 30 ms
13,696 KB
testcase_11 AC 31 ms
13,568 KB
testcase_12 AC 37 ms
13,568 KB
testcase_13 AC 36 ms
13,532 KB
testcase_14 AC 35 ms
13,440 KB
testcase_15 AC 34 ms
13,568 KB
testcase_16 AC 36 ms
13,568 KB
testcase_17 AC 36 ms
13,312 KB
testcase_18 AC 35 ms
13,568 KB
testcase_19 AC 39 ms
13,440 KB
testcase_20 AC 37 ms
13,568 KB
testcase_21 AC 37 ms
13,568 KB
testcase_22 AC 35 ms
13,568 KB
testcase_23 AC 26 ms
14,208 KB
testcase_24 AC 26 ms
14,208 KB
testcase_25 AC 26 ms
14,208 KB
testcase_26 AC 25 ms
14,336 KB
testcase_27 AC 26 ms
14,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@k,@t;
char@a[n];
ll@b[],c[],d[];
rep(i,n){
	ll u=((a[i]=='A'?2k-b[i]:b[i])+t)%(2k);
	c[i]=u<k?u:2k-u;
}
sortA(n,c);
sortA_index(n,b,d);
rep(i,n){
	b[d[i]]=c[i];
}
wt(b(n));
0