結果
| 問題 |
No.3183 Swap or Rotate
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-21 14:59:30 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
AC
|
| 実行時間 | 83 ms / 1,000 ms |
| コード長 | 255 bytes |
| コンパイル時間 | 392 ms |
| コンパイル使用メモリ | 82,308 KB |
| 実行使用メモリ | 76,448 KB |
| 最終ジャッジ日時 | 2025-06-21 14:59:35 |
| 合計ジャッジ時間 | 3,704 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
n=int(input())
p=[*map(int,input().split())]
ans=[]
while 1:
if n-1!=p[0]>p[1]:
p[0],p[1]=p[1],p[0]
ans+='S',
# print(p)
if p==[*range(n)]:
break
p=p[1:]+[p[0]]
# print(p)
ans+='R',
if p==[*range(n)]:
break
print(*ans,sep='')