結果

問題 No.875 Range Mindex Query
ユーザー daku9640daku9640
提出日時 2019-09-06 21:32:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 316 bytes
コンパイル時間 715 ms
コンパイル使用メモリ 10,464 KB
実行使用メモリ 45,544 KB
最終ジャッジ日時 2023-09-06 22:43:17
合計ジャッジ時間 15,630 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
29,636 KB
testcase_01 AC 133 ms
29,600 KB
testcase_02 AC 137 ms
29,364 KB
testcase_03 AC 129 ms
29,428 KB
testcase_04 AC 130 ms
29,364 KB
testcase_05 AC 129 ms
29,472 KB
testcase_06 AC 131 ms
29,424 KB
testcase_07 AC 133 ms
29,540 KB
testcase_08 AC 130 ms
29,516 KB
testcase_09 AC 132 ms
29,584 KB
testcase_10 AC 134 ms
29,552 KB
testcase_11 AC 1,249 ms
38,628 KB
testcase_12 AC 975 ms
35,932 KB
testcase_13 AC 902 ms
39,964 KB
testcase_14 AC 891 ms
39,844 KB
testcase_15 AC 1,264 ms
40,056 KB
testcase_16 TLE -
testcase_17 TLE -
testcase_18 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np
def solve():
    n, q = map(int, input().split())
    A = np.asarray([0] + list(map(int, input().split())))
    for _ in range(q):
        c, l, r = map(int, input().split())
        if c == 1:
            A[l], A[r] = A[r], A[l]
        else:
            print(l + np.argmin(A[l:r + 1]))
solve()
0