結果

問題 No.1650 Moving Coins
ユーザー tassei903tassei903
提出日時 2021-08-20 21:51:47
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 208 ms / 2,000 ms
コード長 654 bytes
コンパイル時間 169 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 132,896 KB
最終ジャッジ日時 2024-04-22 04:21:06
合計ジャッジ時間 7,657 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 40 ms
51,584 KB
testcase_01 AC 39 ms
52,096 KB
testcase_02 AC 37 ms
51,968 KB
testcase_03 AC 138 ms
98,432 KB
testcase_04 AC 126 ms
92,288 KB
testcase_05 AC 138 ms
96,256 KB
testcase_06 AC 138 ms
98,816 KB
testcase_07 AC 146 ms
99,200 KB
testcase_08 AC 184 ms
111,488 KB
testcase_09 AC 170 ms
105,088 KB
testcase_10 AC 200 ms
111,744 KB
testcase_11 AC 182 ms
112,512 KB
testcase_12 AC 180 ms
100,608 KB
testcase_13 AC 161 ms
100,224 KB
testcase_14 AC 175 ms
104,960 KB
testcase_15 AC 157 ms
97,408 KB
testcase_16 AC 182 ms
115,840 KB
testcase_17 AC 186 ms
116,352 KB
testcase_18 AC 192 ms
120,832 KB
testcase_19 AC 198 ms
132,860 KB
testcase_20 AC 199 ms
132,652 KB
testcase_21 AC 206 ms
132,896 KB
testcase_22 AC 208 ms
131,864 KB
testcase_23 AC 203 ms
132,128 KB
testcase_24 AC 139 ms
98,816 KB
testcase_25 AC 142 ms
98,816 KB
testcase_26 AC 114 ms
108,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
sys.setrecursionlimit(10**7)
yes = lambda :print("yes");Yes = lambda :print("Yes")
no = lambda :print("no");No = lambda :print("No")
inf = 10**16
#######################################################################


n = ni()
a = na()
b = na()
ans = []
for i in range(n):
    if b[i]-a[i]<0:
        for j in range(a[i]-b[i]):
            ans.append((i+1,"L"))


for i in range(n-1,-1,-1):
    if b[i]-a[i]>0:
        for j in range(b[i]-a[i]):
            ans.append((i+1,"R"))

print(len(ans))
for i ,j in ans:
    print(i,j)
0