結果
| 問題 |
No.1650 Moving Coins
|
| コンテスト | |
| ユーザー |
player
|
| 提出日時 | 2023-12-23 15:23:36 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 448 bytes |
| コンパイル時間 | 379 ms |
| コンパイル使用メモリ | 81,884 KB |
| 実行使用メモリ | 130,284 KB |
| 最終ジャッジ日時 | 2024-09-27 12:24:53 |
| 合計ジャッジ時間 | 11,117 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 4 WA * 20 |
ソースコード
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
if a == b:
print(0)
exit()
ans = 0
lis = []
for i in range(n):
cnt = abs(b[i]-a[i])
if b[i]-a[i] > 0:
for j in range(cnt):
lis.append([i+1,"R"])
elif b[i]-a[i] < 0:
for j in range(cnt):
lis.append([i+1,"L"])
ans += cnt
print(ans)
for i in range(n):
print(*lis[i])
player