結果
| 問題 |
No.2710 How many more?
|
| コンテスト | |
| ユーザー |
茅ヶ崎裕太
|
| 提出日時 | 2024-03-31 14:45:58 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 267 bytes |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 21,960 KB |
| 最終ジャッジ日時 | 2024-09-30 19:55:14 |
| 合計ジャッジ時間 | 9,506 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 WA * 12 |
ソースコード
from bisect import *
H,Q=map(int,input().split())
A=list(map(int,input().split()))
L=sorted(A)
for i in range(Q):
x,y=map(int,input().split())
if A[x-1] <= A[y-1]:
print(0)
continue
print(((bisect(L,A[x-1])-bisect_left(L,A[y-1])-2)))
茅ヶ崎裕太