結果
| 問題 | No.3085 Easy Problems |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-07-18 10:27:39 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 410 bytes |
| 記録 | |
| コンパイル時間 | 285 ms |
| コンパイル使用メモリ | 12,032 KB |
| 実行使用メモリ | 37,356 KB |
| 最終ジャッジ日時 | 2025-12-08 18:53:34 |
| 合計ジャッジ時間 | 66,208 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 7 TLE * 24 |
ソースコード
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)