結果
| 問題 |
No.3183 Swap or Rotate
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-06-21 14:56:03 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 212 bytes |
| コンパイル時間 | 1,731 ms |
| コンパイル使用メモリ | 82,348 KB |
| 実行使用メモリ | 328,492 KB |
| 最終ジャッジ日時 | 2025-06-21 14:56:14 |
| 合計ジャッジ時間 | 5,347 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 2 |
| other | -- * 21 |
ソースコード
n=int(input())
p=[*map(int,input().split())]
ans=[]
while 1:
if(p[0]+1)%n!=p[1]:
p[0],p[1]=p[1],p[0]
ans+='S',
if p==[*range(n)]:
break
# print(p)
p=p[1:]+[p[0]]
ans+='R',
print(*ans,sep='')