結果
| 問題 |
No.2710 How many more?
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-31 14:14:35 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 345 bytes |
| コンパイル時間 | 129 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 27,388 KB |
| 最終ジャッジ日時 | 2024-09-30 19:13:33 |
| 合計ジャッジ時間 | 3,864 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 1 |
| other | TLE * 1 -- * 16 |
ソースコード
n, q = map(int, input().split())
a = tuple(map(int, input().split()))
indexs = dict()
for (i, a_s) in enumerate(a):
indexs[i + 1] = a_s
def keys(a):
global indexs
return indexs[a]
indexs = sorted(indexs, key=keys)
for i in range(q):
x, y = map(int, input().split())
print(-min(0, indexs.index(y) - indexs.index(x)) - 1)