結果
問題 |
No.3183 Swap or Rotate
|
ユーザー |
![]() |
提出日時 | 2025-06-20 21:29:03 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 1,000 ms |
コード長 | 281 bytes |
コンパイル時間 | 270 ms |
コンパイル使用メモリ | 82,348 KB |
実行使用メモリ | 62,152 KB |
最終ジャッジ日時 | 2025-06-20 21:29:06 |
合計ジャッジ時間 | 2,217 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 21 |
ソースコード
N = int(input()) P = list(map(int, input().split())) ans = [] for i in reversed(range(N)): for j in range(N-1): if P[j] == i and j < i: P[j], P[j+1] = P[j+1], P[j] ans.append("S") ans.append("R") ans.append("R") print("".join(ans))