結果
問題 |
No.3085 Easy Problems
|
ユーザー |
|
提出日時 | 2025-04-04 22:44:41 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 385 bytes |
コンパイル時間 | 464 ms |
コンパイル使用メモリ | 11,904 KB |
実行使用メモリ | 42,260 KB |
最終ジャッジ日時 | 2025-04-04 22:46:21 |
合計ジャッジ時間 | 10,961 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 3 TLE * 28 |
ソースコード
N = int(input()) all = [] from collections import defaultdict d = defaultdict(list) for i in range(N): a, b = map(int, input().split()) d[b].append(a) all.append(a) all.sort() for k in d.keys(): d[k].sort() from bisect import bisect_right Q = int(input()) for _ in range(Q): x, y = map(int, input().split()) print(bisect_right(all, x) - bisect_right(d[y], x))