結果
問題 | No.875 Range Mindex Query |
ユーザー | kfrisatsun |
提出日時 | 2019-09-11 16:14:25 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 610 bytes |
コンパイル時間 | 150 ms |
コンパイル使用メモリ | 10,664 KB |
実行使用メモリ | 21,924 KB |
最終ジャッジ日時 | 2023-09-15 13:49:20 |
合計ジャッジ時間 | 4,360 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,784 KB |
testcase_01 | AC | 20 ms
7,768 KB |
testcase_02 | AC | 25 ms
7,884 KB |
testcase_03 | AC | 17 ms
7,848 KB |
testcase_04 | AC | 18 ms
7,808 KB |
testcase_05 | AC | 17 ms
7,876 KB |
testcase_06 | AC | 21 ms
7,756 KB |
testcase_07 | AC | 21 ms
7,852 KB |
testcase_08 | AC | 18 ms
7,752 KB |
testcase_09 | AC | 18 ms
7,732 KB |
testcase_10 | AC | 25 ms
7,800 KB |
testcase_11 | TLE | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
ソースコード
# 1 行目に数列の長さを表す整数 N とクエリの数を表す整数 Q がこの順で半角スペース区切りで与えられます。 N, Q = map(int, input().split()) # 2 行目には N 個の整数が半角スペース区切りで与えられ、その内の i 番目 (1≤i≤N) の整数は、初期の ai の値を表します。 ai_list = list(map(int, input().split())) for _ in range(Q): type, l, r = map(int, input().split()) if type == 1: ai_list[l-1], ai_list[r-1] = ai_list[r-1], ai_list[l-1] else: print(ai_list.index(min(ai_list[l-1:r])) + 1)