結果

問題 No.1650 Moving Coins
ユーザー pluto77pluto77
提出日時 2022-02-16 09:58:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 267 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 86,884 KB
実行使用メモリ 126,356 KB
最終ジャッジ日時 2023-09-11 17:07:48
合計ジャッジ時間 13,120 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,168 KB
testcase_01 AC 72 ms
71,108 KB
testcase_02 AC 72 ms
71,264 KB
testcase_03 AC 195 ms
101,760 KB
testcase_04 AC 171 ms
99,104 KB
testcase_05 AC 186 ms
99,084 KB
testcase_06 AC 196 ms
102,316 KB
testcase_07 AC 195 ms
102,560 KB
testcase_08 AC 241 ms
115,580 KB
testcase_09 AC 234 ms
112,180 KB
testcase_10 AC 241 ms
114,660 KB
testcase_11 AC 250 ms
113,752 KB
testcase_12 AC 226 ms
105,964 KB
testcase_13 AC 226 ms
105,464 KB
testcase_14 AC 245 ms
110,504 KB
testcase_15 AC 226 ms
110,468 KB
testcase_16 AC 251 ms
115,436 KB
testcase_17 AC 255 ms
114,152 KB
testcase_18 AC 253 ms
119,308 KB
testcase_19 AC 262 ms
126,272 KB
testcase_20 AC 267 ms
126,356 KB
testcase_21 AC 265 ms
125,140 KB
testcase_22 AC 264 ms
125,640 KB
testcase_23 AC 264 ms
125,596 KB
testcase_24 AC 194 ms
102,936 KB
testcase_25 AC 196 ms
102,576 KB
testcase_26 AC 147 ms
109,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1650
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
res=[]
for i in range(n):
 x=a[i]
 y=b[i]
 if x>y:
  for j in range(x-y):
   res.append([i+1,'L'])
for i in range(n-1,-1,-1):
 x=a[i]
 y=b[i]
 if x<y:
  for j in range(y-x):
   res.append([i+1,'R'])
print (len(res))
for x,y in res:
 print(x,y)
0