結果
| 問題 | No.2710 How many more? |
| コンテスト | |
| ユーザー |
shobonvip
|
| 提出日時 | 2024-04-01 01:42:43 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 263 ms / 2,000 ms |
| コード長 | 262 bytes |
| 記録 | |
| コンパイル時間 | 158 ms |
| コンパイル使用メモリ | 85,076 KB |
| 実行使用メモリ | 97,200 KB |
| 最終ジャッジ日時 | 2026-04-16 23:04:47 |
| 合計ジャッジ時間 | 4,585 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 17 |
ソースコード
import bisect n,q=map(int,input().split()) a=list(map(int,input().split())) b=sorted(a) for i in range(q): x,y=map(int,input().split()) x-=1 y-=1 if a[x]<=a[y]: print(0) else: f = bisect.bisect_right(b,a[y]) g = bisect.bisect_left(b,a[x]) print(g-f)
shobonvip