結果
問題 |
No.3085 Easy Problems
|
ユーザー |
![]() |
提出日時 | 2025-08-24 14:59:50 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 1,164 ms / 2,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 347 ms |
コンパイル使用メモリ | 82,944 KB |
実行使用メモリ | 101,968 KB |
最終ジャッジ日時 | 2025-08-24 15:00:31 |
合計ジャッジ時間 | 37,550 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 31 |
ソースコード
from bisect import bisect from collections import defaultdict N2 = 10 ** 5 + 1 X = [[0] for _ in range(N2)] N = int(input()) for _ in range(N): a,b = map(int,input().split()) X[b].append(a) X[0].append(a) for i in range(N2): X[i].sort() for _ in range(int(input())): x,y = map(int,input().split()) print(bisect(X[0],x)-bisect(X[y],x))