結果
| 問題 |
No.875 Range Mindex Query
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-09-06 21:56:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 475 bytes |
| コンパイル時間 | 224 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 23,644 KB |
| 最終ジャッジ日時 | 2024-06-24 17:43:21 |
| 合計ジャッジ時間 | 4,353 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 10 TLE * 1 -- * 7 |
ソースコード
n, q = map(int, input().split())
a = list(map(int, input().split()))
for i in range(q):
query = input().split()
if query[0] == '1':
l = int(query[1]) - 1
r = int(query[2]) - 1
temp = a[l]
a[l] = a[r]
a[r] = temp
else:
minV = 10**10
minIdx = 0
for i in range(int(query[1])-1, int(query[2])):
if a[i] < minV:
minV = a[i]
minIdx = i
print(minIdx+1)