結果
| 問題 | No.2710 How many more? |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2024-04-28 03:54:12 |
| 言語 | Python3 (3.15.0 + numpy 2.5.4 + scipy 1.18.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 716 ms / 2,000 ms |
| + 519µs | |
| コード長 | 307 bytes |
| 記録 | |
| コンパイル時間 | 52 ms |
| コンパイル使用メモリ | 14,464 KB |
| 実行使用メモリ | 22,460 KB |
| 最終ジャッジ日時 | 2026-10-15 01:47:34 |
| 合計ジャッジ時間 | 10,506 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
from bisect import bisect,bisect_left
N,Q=map(int,input().split())
A=list(map(int,input().split()))
SA=sorted(A)
for tests in range(Q):
x,y=map(int,input().split())
p=A[x-1]
q=A[y-1]
if p<=q:
print(0)
continue
x=bisect(SA,q)
y=bisect_left(SA,p)
print(y-x)
titia