xxxxxxxxxx
from bisect import bisect_left, bisect_right
n = int(input())
xs = []
for _ in range(n):
x, y = map(int, input().split())
xs.append(x)
xs.sort()
ans = []
q = int(input())
queries = map(int, input().split())
for a in queries: ans.append(bisect_right(xs, a) - bisect_left(xs, a))
print(*ans)
提出日時 | |
ユーザー | ![]() |
言語 | Python3 (pypy3 7.3.1) |
結果 | AC |
実行時間 | 586 ms |
メモリ | 190964 kb |
テストケース名 | 結果 | 実行時間 | メモリ |
---|---|---|---|
00_sample1.txt | AC | 57 ms | 190964 kb |
00_sample2.txt | AC | 42 ms | 190964 kb |
00_sample3.txt | AC | 40 ms | 190964 kb |
01_randomSmall1.txt | AC | 44 ms | 190964 kb |
01_randomSmall2.txt | AC | 41 ms | 190964 kb |
01_randomSmall3.txt | AC | 43 ms | 190964 kb |
02_randomLarge1.txt | AC | 556 ms | 190964 kb |
02_randomLarge2.txt | AC | 586 ms | 190964 kb |
02_randomLarge3.txt | AC | 568 ms | 190964 kb |
99_cppunorderedmapkiller.txt | AC | 459 ms | 190964 kb |
99_pythondictkiller.txt | AC | 424 ms | 190964 kb |