結果
| 問題 | No.2710 How many more? |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-31 14:57:31 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 512 ms / 2,000 ms |
| + 229µs | |
| コード長 | 270 bytes |
| 記録 | |
| コンパイル時間 | 98 ms |
| コンパイル使用メモリ | 64,388 KB |
| 実行使用メモリ | 72,012 KB |
| 最終ジャッジ日時 | 2026-10-15 01:39:11 |
| 合計ジャッジ時間 | 9,268 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 18 |
ソースコード
import bisect n, q = map(int,input().split()) A = [int(i)*-1 for i in input().split()] R = sorted(A) for i in range(q): x,y=map(int, input().split()) ans=bisect.bisect_right(R,A[x-1])-bisect.bisect_left(R,A[y-1]) if A[x-1] >= A[y-1]: print(0) else: print(-1*ans)