結果
| 問題 | No.3183 Swap or Rotate |
| コンテスト | |
| ユーザー |
ゼット
|
| 提出日時 | 2025-06-20 22:44:21 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 70 ms / 1,000 ms |
| + 287µs | |
| コード長 | 335 bytes |
| 記録 | |
| コンパイル時間 | 1,059 ms |
| コンパイル使用メモリ | 95,720 KB |
| 実行使用メモリ | 84,800 KB |
| 最終ジャッジ日時 | 2026-07-12 15:46:59 |
| 合計ジャッジ時間 | 3,640 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 |
ソースコード
N=int(input())
A=list(map(int,input().split()))
count=0
result=[]
P=[i for i in range(N)]
while True:
if A[0]>A[1] and A[0]!=N-1:
A[0],A[1]=A[1],A[0]
result.append('S')
count+=1
result.append('R')
count+=1
A=A[1:]+A[0:1]
if P==A:
print(*result,sep='')
exit()
if count>20000:
p=[1]
print(p[1])
ゼット