結果

問題 No.1650 Moving Coins
ユーザー c-yanc-yan
提出日時 2021-08-21 03:06:11
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 418 bytes
コンパイル時間 357 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 45,040 KB
最終ジャッジ日時 2024-04-22 12:21:10
合計ジャッジ時間 10,192 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 29 ms
10,752 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 296 ms
36,316 KB
testcase_09 WA -
testcase_10 AC 306 ms
36,252 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 420 ms
45,040 KB
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 177 ms
26,368 KB
testcase_26 AC 200 ms
38,432 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))

result = []
for i in range(N):
    if A[i] <= B[i]:
        continue
    for _ in range(A[i] - B[i]):
        result.append('%d L' % (i + 1))
for i in range(N - 1, -1, -1):
    if A[i] >= B[i]:
        continue
    for _ in range(A[i] - B[i]):
        result.append('%d R' % (i + 1))
print(len(result))
print(*result, sep='\n')
0