結果
| 問題 | No.2710 How many more? |
| コンテスト | |
| ユーザー |
sasa8uyauya
|
| 提出日時 | 2024-04-05 14:00:36 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 234 bytes |
| 記録 | |
| コンパイル時間 | 384 ms |
| コンパイル使用メモリ | 82,432 KB |
| 実行使用メモリ | 92,312 KB |
| 最終ジャッジ日時 | 2024-10-01 01:06:42 |
| 合計ジャッジ時間 | 7,282 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 2 |
| other | AC * 1 WA * 16 |
ソースコード
n,q=map(int,input().split()) a=list(map(int,input().split())) b=sorted(a) from bisect import bisect_left,bisect_right for i in range(q): x,y=map(int,input().split()) x-=1 y-=1 print(max(0,bisect_left(b,a[y])-bisect_right(b,a[x])))
sasa8uyauya