結果
| 問題 | No.3085 Easy Problems |
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2025-04-04 21:28:26 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 507 bytes |
| 記録 | |
| コンパイル時間 | 934 ms |
| コンパイル使用メモリ | 96,240 KB |
| 実行使用メモリ | 169,668 KB |
| 最終ジャッジ日時 | 2026-07-08 08:38:04 |
| 合計ジャッジ時間 | 40,254 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 4 WA * 27 |
ソースコード
from collections import defaultdict
N = int(input())
all = []
for _ in range(N):
a,b = list(map(int,input().split()))
all.append((a,b,-1))
Q = int(input())
for i in range(Q):
x,y = list(map(int,input().split()))
all.append((x,y,i))
all.sort()
ans = [-1 for _ in range(Q)]
bunya = defaultdict(int)
prob_count = 0
for i in range(N+Q):
a,b,c = all[i]
if(c == -1):
bunya[b] += 1
prob_count += 1
else:
ans[c] = prob_count - bunya[b]
for i in ans:
print(i)
回転