結果
| 問題 | No.3085 Easy Problems |
| コンテスト | |
| ユーザー |
回転
|
| 提出日時 | 2025-04-04 21:28:26 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 507 bytes |
| 記録 | |
| コンパイル時間 | 2,067 ms |
| コンパイル使用メモリ | 81,588 KB |
| 実行使用メモリ | 161,460 KB |
| 最終ジャッジ日時 | 2025-04-04 21:29:46 |
| 合計ジャッジ時間 | 64,465 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 3 WA * 2 TLE * 26 |
ソースコード
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)
回転