結果
| 問題 |
No.3085 Easy Problems
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-04-04 21:52:49 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 406 bytes |
| コンパイル時間 | 2,771 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 139,396 KB |
| 最終ジャッジ日時 | 2025-04-04 21:53:20 |
| 合計ジャッジ時間 | 28,925 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 RE * 1 |
| other | AC * 1 WA * 29 RE * 1 |
ソースコード
from collections import defaultdict import bisect n=int(input()) L=[list(map(int,input().split())) for _ in range(n)] q=int(input()) Q=[list(map(int,input().split())) for _ in range(n)] T=[L[i][0] for i in range(n)] T.sort() D=defaultdict(list) for a,b in L: D[b].append(a) for k in D.keys(): D[k].sort() for x,y in Q: tot=bisect.bisect_right(T,x) Y=len(D[y])-bisect.bisect_left(D[y],x) print(tot-Y)