結果

問題 No.1650 Moving Coins
ユーザー nasutarou1341nasutarou1341
提出日時 2021-08-20 21:47:19
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 368 bytes
コンパイル時間 256 ms
コンパイル使用メモリ 82,660 KB
実行使用メモリ 128,664 KB
最終ジャッジ日時 2024-04-22 04:12:58
合計ジャッジ時間 9,765 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 36 ms
51,712 KB
testcase_02 AC 36 ms
52,984 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 209 ms
107,392 KB
testcase_09 WA -
testcase_10 AC 210 ms
114,428 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 228 ms
128,664 KB
testcase_21 WA -
testcase_22 AC 237 ms
125,716 KB
testcase_23 AC 233 ms
125,848 KB
testcase_24 AC 162 ms
101,796 KB
testcase_25 AC 165 ms
101,756 KB
testcase_26 AC 116 ms
108,296 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

ans = []
for i in range(N):
  a = A[i]
  b = B[i]
  if b < a:
    for n in range(a - b):
      ans.append([i + 1, "L"])
for i in range(N):
  a = A[i]
  b = B[i]
  if a < b:
    for n in range(b - a):
      ans.append([i + 1, "R"])

print(len(ans))
for a, b in ans:
  print(a, b)
0