結果
問題 | No.1650 Moving Coins |
ユーザー |
![]() |
提出日時 | 2024-01-16 23:22:34 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 530 bytes |
コンパイル時間 | 377 ms |
コンパイル使用メモリ | 82,320 KB |
実行使用メモリ | 135,428 KB |
最終ジャッジ日時 | 2024-09-28 03:05:16 |
合計ジャッジ時間 | 10,242 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 2 |
other | AC * 1 WA * 23 |
ソースコード
n = int(input())a = list(map(int,input().split()))b = list(map(int,input().split()))ans = 0if a == b:print(0)exit()lism = []lisp = []for i in range(n):if a[i] == b[i]:continueif a[i] > b[i]:lisp.append([i+1,a[i]-b[i]])else:lism.append([i+1,b[i]-a[i]])lism.reverse()ans = []for i,cnt in lism:for j in range(cnt):ans.append([i,"R"])for i,cnt in lisp:for j in range(cnt):ans.append([i,"L"])for i in ans:print(*i)