結果
| 問題 |
No.3085 Easy Problems
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-18 10:27:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 1,828 ms / 2,000 ms |
| コード長 | 410 bytes |
| コンパイル時間 | 190 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 37,228 KB |
| 最終ジャッジ日時 | 2025-11-14 18:32:46 |
| 合計ジャッジ時間 | 58,509 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 31 |
ソースコード
import bisect
n = int(input())
A, B = [], [[] for _ in range(10**5+1)]
for i in range(n):
a, b = map(int, input().split())
A.append(a)
B[b].append(a)
A.sort()
for i in range(len(B)):
B[i].sort()
q = int(input())
ans = []
for i in range(q):
x, y = map(int, input().split())
t = bisect.bisect_right(A, x) - bisect.bisect_right(B[y], x)
ans.append(t)
for s in ans:
print(s)