Problem:


Score : 200 points

Problem Statement

There are N rectangular plate materials made of special metal called AtCoder Alloy.
The dimensions of the i-th material are A_i \times B_i (A_i vertically and B_i horizontally).

Takahashi wants a rectangular plate made of AtCoder Alloy whose dimensions are exactly H \times W.
He is trying to obtain such a plate by choosing one of the N materials and cutting it if necessary.
When cutting a material, the cuts must be parallel to one of the sides of the material.
Also, the materials have fixed directions and cannot be rotated.
For example, a 5 \times 3 material cannot be used as a 3 \times 5 plate.

Out of the N materials, how many can produce an H \times W plate if properly cut?

Constraints

1 \leq N \leq 1000

1 \leq H \leq 10^9

1 \leq W \leq 10^9

1 \leq A_i \leq 10^9

1 \leq B_i \leq 10^9

Input

Input is given from Standard Input in the following format:

N H W
A_1 B_1
A_2 B_2
:
A_N B_N

Output

Print the answer.

Sample Input 1

3 5 2
10 3
5 2
2 5

Sample Output 1

2

Takahashi wants a 5 \times 2 plate.

The dimensions of the first material are 10 \times 3. We can obtain a 5 \times 2 plate by properly cutting it.

The dimensions of the second material are 5 \times 2. We can obtain a 5 \times 2 plate without cutting it.

The dimensions of the third material are 2 \times 5. We cannot obtain a 5 \times 2 plate, whatever cuts are made. Note that the material cannot be rotated and used as a 5 \times 2 plate.

Sample Input 2

10 587586158 185430194
894597290 708587790
680395892 306946994
590262034 785368612
922328576 106880540
847058850 326169610
936315062 193149191
702035777 223363392
11672949 146832978
779291680 334178158
615808191 701464268

Sample Output 2

8



Sample input:
3 5 2
10 3
5 2
2 5


Sample output:
2

Submission status: Accepted

Solution code:
N, H, W = map(int,input().split())
ans = 0
for i in range(N):
  A, B = map(int,input().split())
  if A >= H and B >= W: ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, h , w = map(int, input().split())
ans = 0
for _ in range(n):
    a, b = map(int, input().split())
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for i in range(N):
    a, b = map(int, input().split())
    if a >= H and b >= W:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

ans = 0
for i in range(n):
    a = ab[i][0]
    b = ab[i][1]
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
ans=0
for a in range(n):
  H,W=map(int,input().split())
  if H>=h and W>=w:ans+=1
print(ans)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
s = [list(map(int,input().split())) for _ in range(n)]
cnt = 0
for a in s:
    if a[0] >= h and a[1] >= w:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
a_b = [list(map(int, input().split())) for _ in range(n)]
cnt = 0
for i in range(n):
  if a_b[i][0] >= h and a_b[i][1] >= w:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = 1e10

#solve
def solve():
    n, h, w = LI()
    ab = LIR(n)
    ans = 0
    for a, b in ab:
        if a >= h and b >= w:
            ans += 1
    print(ans)
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n,h,w = iim()
ans = 0
for i in range(n):
    a,b = iim()
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())

t = 0
for i in range(n):
    a, b = map(int, input().split())
    if h <= a and w <= b:
        t += 1
print(t)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
ans=0
for _ in range(n):
    a,b=map(int,input().split())
    if a>=h and b>=w: ans+=1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(n)]
cnt = 0
for j in ab:
    if j[0] >= h and j[1] >= w:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
A=[0]*N
B=[0]*N

cnt=0
for i in range(N):
  A[i],B[i]=map(int,input().split())
  if A[i]>=H and B[i]>=W:
    cnt +=1
    
print(cnt)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
alloy = [list(map(int, input().split())) for _ in range(n)]

res = 0
for i in alloy:
    a, b = i[0], i[1]
    if a >= h and b >= w:
        res += 1

print(res)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
cnt=0
for i in range(n):
    a,b=map(int,input().split())
    cnt+=min(a//h, b//w)
print(cnt)

Submission status: Accepted

Solution code:
#template
from sys import setrecursionlimit
setrecursionlimit(10**6)
from collections import Counter
def inputlist(): return [int(j) for j in input().split()]
#template
N,H,W = inputlist()
count = 0
for i in range(N):
    A,B = inputlist()
    if A >= H and B >= W:
        count+=1
print(count)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

n, h, w = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(n)]
ans = 0
for i in range(n):
    if ab[i][0] >= h and ab[i][1] >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

ans = 0
for a, b in ab:
    if a >= h and b >= w:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
def main():
    plates, height, width = map(int, input().split())
    answer = 0
    for _ in range(plates):
        h, w = map(int, input().split())
        if height <= h and width <= w:
            answer += 1
    print(answer)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.buffer.readline
    N, H, W = (int(i) for i in input().split())
    AB = [[int(i) for i in input().split()] for j in range(N)]
    ans = 0
    for a, b in AB:
        ans += min(a//H, b//W)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N,H,W = map(int, input().split())
count = 0
for i in range(N):
  A,B = map(int,input().split())
  if A >= H and B >= W:
    count = count + 1
print(count)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
ans = 0

for i in range(n):
    a,b = map(int,input().split())
    if h <= a and w <= b:
        ans += 1
#        print(a,b)

print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for i in range(N):
    A, B = map(int, input().split())
    ans += (A >= H and B >= W)
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for _ in range(N):
  A, B = map(int, input().split())
  if A >= H and B >= W:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
ans = 0
for i in range(N):
    h,w = map(int,input().split())
    if (h >= H)and(w >= W):
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ls = [list(map(int, input().split())) for _ in range(n)]

ans = 0

for ab in ls:
	if ab[0] >= h and ab[1] >= w:
		ans += 1

print(ans)

Submission status: Accepted

Solution code:
def main():
    n, h, w = map(int, input().split())
    ans = 0
    for _ in range(n):
        a, b = map(int, input().split())
        if a >= h and b >= w:
            ans += 1
    print(ans)

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
P = [tuple(map(int, input().split())) for i in range(N)]

print(len(list(filter(lambda p: p[0] >= H and p[1] >= W, P))))

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
count = 0
for n in range(N):
    A, B = map(int, input().split())
    if A >= H and B >= W:
        count += 1
print(count)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
res = 0
for i in range(n):
    a,b = map(int,input().split())
    if a >= h and b >= w:
        res+=1
print(res)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
mat=[list(map(int,input().split())) for _ in range(N)]
c=0
for i in range(N):
    if (mat[i][0]>=H)and(mat[i][1]>=W):
        c=c+1
print(c)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
c=0
for i in range(n):
  a,b=map(int,input().split())
  if a>=h and b>=w:
    c+=1
print(c)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
al, bl = [], []
for _ in range(n):
    a, b = map(int, input().split())
    al.append(a)
    bl.append(b)

ans = 0
for a, b in zip(al, bl):
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
ret = 0
for i in range(N):
  a,b=map(int,input().split())
  if a>=H and b>=W:
    ret += 1
print(ret)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for _ in range(N):
    A, B = map(int, input().split())
    if A>=H and B>=W:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read

N, H, W, *AB = map(int, read().split())
answer = 0
for a, b in zip(*[iter(AB)] * 2):
    if H <= a and W <= b:
        answer += 1

print(answer)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())

ans = 0
for _ in range(n):
    a, b = map(int, input().split())
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ok = lambda ab: ab[0]>=H and ab[1]>=W
print(sum(ok(tuple(map(int, input().split()))) for _ in range(N)))

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
AB=[list(map(int,input().split())) for i in range(N)]
ans=0
for i in range(N):
  if AB[i][0]>=H and AB[i][1]>=W:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
res = 0
for _ in range(n):
    hh,ww = map(int, input().split())
    if hh >= h and ww >= w:
        res += 1
print(res)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

n, h, w = [int(x) for x in input().split()]
c = 0
for _ in range(n):
    a, b = [int(x) for x in input().split()]
    if a >= h and b >= w:
        c += 1
print(c)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int, H: int, W: int, A: "List[int]", B: "List[int]"):
    answer = 0
    for i in range(N):
        if H <= A[i] and W <= B[i]:
            answer += 1
    print(answer)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    A = [int()] * (N)  # type: "List[int]"
    B = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        A[i] = int(next(tokens))
        B[i] = int(next(tokens))
    solve(N, H, W, A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
cnt = 0
for i in range(N):
    A, B = map(int, input().split())
    if(A >= H and B >= W):
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#!/usr/bin/env python3
n,h,w = map(int,input().split())
cnt = 0
for i in range(n):
    a,b = map(int,input().split())
    if a >= h and b >= w:  cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())

ans = 0
for _ in range(N):
  a, b = map(int, input().split())
  if a >= H and b >= W:
    ans += 1
    
print(ans)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
A = []
B = []
for i in range(N):
	a,b = map(int,input().split())
	A.append(a)
	B.append(b)
cnt = 0
for i in range(N):
	if A[i] >= H and B[i] >= W:
		cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
c=0
for _ in range(n):
  a,b=map(int,input().split())
  if a>=h and b>=w:
    c+=1
print(c)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ab = [input().split() for _ in range(n)]
c = 0

for i in range(n):
	if int(ab[i][0]) >= h and int(ab[i][1]) >= w:
		c += 1

print(c)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]
ans = 0
for i in range(N):
    if (AB[i][0] >= H) and (AB[i][1] >= W):
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
A,B,C =  map(int,input().split())
count = 0
for _ in range(A):
  D,E = map(int,input().split())
  if B <= D  and C <=  E:
    count += 1
print(count)

Submission status: Accepted

Solution code:
from sys import stdin

n,h,w = [int(x) for x in stdin.readline().rstrip().split()]
li = [list(map(int,stdin.readline().rstrip().split())) for _ in range(n)]
point = 0
for i in li:
    if i[0] >= h and i[1] >= w:
        point += 1
print(point)

Submission status: Accepted

Solution code:
def main():
    N,H,W = map(int,input().split())
    A,B = [],[]
    for _ in range(N):
        a,b = map(int,input().split())
        A.append(a)
        B.append(b)
    ans = 0
    for i in range(N):
        if H<=A[i] and W<=B[i]:
            ans += 1
    print(ans)
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
a,b = [],[]
for _ in range(n):
	ta, tb = map(int, input().split())
	a.append(ta)
	b.append(tb)
cnt = 0
for i in range(n):
	if a[i] >= h and b[i] >= w:
		cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
inputs=lambda:map(int,input().split())
cnt=0
n,h,w=inputs()
for i in range(n):
  a,b=inputs()
  if a>=h and b>=w:
    cnt+=1
    
print(cnt)

Submission status: Accepted

Solution code:
N,H,W = map(int, input().split())
R = 0
for x in range(N):
  h,w = map(int, input().split())
  if h >= H and w >= W:
    R += 1
print(R)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

n,h,w = map(int,input().split())
for i in range(n):
    a,b=map(int,input().split())
    if (a>=h) and (b>=w):
        count+=1
print(count)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
result = 0
for i in range(N):
  A,B = map(int,input().split())
  if A >= H and B >= W:
    result += 1
print(result)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())

ans = 0

for i in range(n):
	a,b=map(int,input().split())
	if a>=h and b>=w:
		ans = ans + 1

print(ans)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
cnt=0
for i in range(n):
  a,b=map(int,input().split())
  if a>=h and b>=w:
    cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
N, H, W = map(int,input().split())
ans = 0
for _ in range(N):
  a,b = map(int,input().split())
  if a>=H and b>=W:ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
A = []
B = []
for i in range(N):
    x1,y1=[int(i) for i in input().split()]
    A.append(x1)
    B.append(y1)

cnt=0

for i in range(N):
    if A[i]>=H and B[i]>=W:
        cnt+=1

print(cnt)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())

cnt = 0

for i in range(0, N):
	a, b = map(int, input().split())
	if a >= H and b >= W:
		cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
ans=0
for i in range(li[0]):
    x,y = map(int,input().split())
    if x>=li[1] and y>=li[2]:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for _ in range(N):
    a, b = map(int, input().split())
    if a>=H and b>= W: ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
ans = 0
for _ in range(n):
    a,b = map(int,input().split())
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
ans=0

for i in range(n):
    a,b = map(int,input().split())
    if a>=h and b>=w:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
import sys


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    n, h, w = list(map(int, readline().split()))
    cnt = 0
    for i in range(n):
        a, b = list(map(int, readline().split()))
        if a >= h and b >= w:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
ans=0
for _ in range(n):
  a,b=map(int,input().split())
  if a>=h and b>=w:
    ans+=1

print(ans)

Submission status: Accepted

Solution code:
n,h,w,*L=map(int,open(0).read().split());print(sum(h-x<=0<=y-w for x,y in zip(*[iter(L)]*2)))

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ab = []
for i in range(n):
    ab.append(list(map(int, input().split())))
cnt = 0
for j in ab:
    if j[0] >= h and j[1] >= w:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N, H, W = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(N)]

ans = 0

for A, B in AB:
    ans += A >= H and B >= W

print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(N)]
cnt = 0
for i in range(N):
  if AB[i][0] >= H and AB[i][1] >= W:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
cnt = 0
for _ in range(N):
    a,b = map(int,input().split())
    if a>=H and b>=W:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
#coding:utf-8
n, h, w = map(int, input().split())
ans = 0

for i in range(0, n):
    a, b = map(int, input().split())
    if h <= a and w <= b:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
ans = 0
k = []
for i in range(N):
  k.append(list(map(int,input().split())))
for i in range(N):
  if k[i][0]>=H and k[i][1]>=W:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

ans = 0

for ab in AB:
    if ab[0] >= H and ab[1] >= W:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
# 2019/11/29

n,h,w=map(int,input().split())
cnt=0
for _ in range(n):
    a,b=map(int,input().split())
    if a>=h and b>=w:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
ans=0
for i in range(N):
    A,B=map(int,input().split())
    if A>=H and B>=W:
        ans+=1

print(ans)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
AB=[list(map(int,input().split())) for i in range(N)]
ans=0
for i in range(N):
    if AB[i][0]>=H and AB[i][1]>=W:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]

ans = 0
for a, b in AB:
  if H <= a and W <= b:
    ans += 1

print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(N: int, H: int, W: int, A: "List[int]", B: "List[int]"):
    print([A[i] >= H and B[i] >= W for i in range(N)].count(True))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    A = [int()] * (N)  # type: "List[int]"
    B = [int()] * (N)  # type: "List[int]"
    for i in range(N):
        A[i] = int(next(tokens))
        B[i] = int(next(tokens))
    solve(N, H, W, A, B)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
ans=0
for i in range(n):
  a,b=map(int,input().split())
  if a>=h and b>=w:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ans = 0
for i in range(n):
  a, b = map(int, input().split())
  if h <= a and w <= b:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
     
ans = 0
     
for i in range(N):
  A,B = map(int,input().split())

  #print (A,H,B,W)
  if (A >= H) and (B >= W):
     ans += 1
        
print (ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline
 
##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)
 
##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力
 
# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと
 
##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順
 
# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順
 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N,H,W = inputMap()
    AB = []
    for i in range(N):
        a,b = inputMap()
        AB.append((a,b))
        
    ans = 0
    for i,val in enumerate(AB):
        a,b = val
        if a >= H and b >= W:
            ans += 1
    
    print(ans)
    
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ABlist = [list(map(int, input().split())) for _ in range(N)]
counter = 0
for a, b in ABlist:
    if a >= H and b >= W:
        counter += 1

print(counter)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(N)]
ans = 0
for a, b in AB:
  if a >= H and b >= W:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ans = 0
for i in range(n):
    a, b = map(int, input().split())
    if (a >= h) & (b >= w):
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
c = 0
for _ in range(n):
  a, b = map(int, input().split())
  if a>=h and b>=w:
    c += 1
print(c)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
li = [list(map(int,input().split())) for _ in range(n)]

cnt = 0
for x,y in li:
    if x >= h and y >= w:
        cnt += 1
        
print(cnt)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
cnt = 0
for i in range(n):
    H, W = map(int, input().split())
    if h <= H and w <= W:
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
a=[0]*n
b=[0]*n
ans=0
for i in range(n):
    a[i],b[i]=map(int,input().split())
for j in range(n):
    if a[j]>=h and b[j]>=w:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
AB = (tuple(map(int, input().split())) for _ in range(N))
print(sum((1 if a >= H and b >= W else 0 for a, b in AB)))

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
ans=0
for _ in range(n):
    a,b=map(int,input().split())
    if a>=h and b>=w:
        ans+=1

print(ans)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())
A,B=[0]*N,[0]*N
ans=0
for i in range(N):
  A[i],B[i]=map(int,input().split())
  if(A[i]>=H and B[i]>=W):
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())

ans = 0
for i in range(n):
    a, b = map(int, input().split())
    if a >= h and b >= w:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
n,H,W=map(int,input().split())
ans=0
for i in range(n):
    h,w=map(int,input().split())
    if h>=H and w>=W:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())

ans = 0

for _ in range(n):
    a, b = map(int, input().split())
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
cnt=0
for i in range(n):
  a,b=map(int,input().split())
  cnt+=1 if a>=h and b>=w else 0
print(cnt)

Submission status: Accepted

Solution code:
n, h, w, *a = list(map(int, open(0).read().split()))

ans = 0
for a, b in zip(*[iter(a)]*2):
    ans += not(a < h or b < w)
print(ans)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ret = 0
for _ in range(N) :
    A, B = map(int, input().split())
    if A >= H and B >= W :
        ret += 1
print(ret)

Submission status: Accepted

Solution code:
n,h,w = map(int,input().split())
cnt=0
for _ in range(n):
    a,b = map(int,input().split())
    if a>=h and b>=w:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
def slove():
    import sys
    input = sys.stdin.readline
    n, h, w = list(map(int, input().rstrip('\n').split()))
    cnt = 0
    for i in range(n):
        a, b = list(map(int, input().rstrip('\n').split()))
        cnt += min(a // h, b // w)
    print(cnt)


if __name__ == '__main__':
    slove()

Submission status: Accepted

Solution code:
N,H,W = [int(x) for x in input().split()]
AB = [[int(x) for x in input().split()]for _ in range(N)]
cnt = 0
for a,b in AB:
    if(a>=H and b>=W):
        cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
#%%

n, h, w = map(int, input().split())
a = [0] * n
b = [0] * n
ans = 0

for i in range(n):
    a[i], b[i] = map(int, input().split())
    if a[i] >= h and b[i] >= w:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
n,h,w = map(int, input().split())
ans = 0
for i in range(n):
    a,b = map(int, input().split())
    if a>=h and b>=w:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
N, H, W = tuple(map(int, input().split()))
ans = 0
for i in range(N):
    a, b = tuple(map(int, input().split()))
    if H <= a and W <= b:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,H,W =map(int,input().split())
count=0

for i in range(N):

    A,B=map(int,input().split())

    if A>=H and B>=W:
        count+=1

        
print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for _ in range(N):
    h, w = map(int, input().split())
    if h >= H and w >= W:
      ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,H,W=map(int,input().split())

ans=0
for i in range(N):
  A,B=map(int,input().split())
  if A>=H and B>=W:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
def solve():
  n,h,w = (int(i) for i in input().split())
  ct = 0
  for i in range(n):
    a,b = (int(i) for i in input().split())
    if a>=h and b >= w:
      ct += 1
  print(ct)
solve()

Submission status: Accepted

Solution code:
# caddi2018bB - AtCoder Alloy
def main():
    N, H, W, *AB = map(int, open(0).read().split())
    ans = sum(a >= H and b >= W for a, b in zip(*[iter(AB)] * 2))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
r = 0
for i in range(N):
  A, B = map(int, input().split())
  if A >= H and B >= W:
    r += 1
print(r)

Submission status: Accepted

Solution code:
def main():
    N, H, W = map(int, input().split())
    ans = 0
    for _ in range(N):
        a, b = map(int, input().split())
        if a >= H and b >= W:
            ans += 1
    return ans

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
ans=0
for i in range(n):
    a,b=map(int,input().split())
    if a>=h and b>=w:ans+=1
print(ans)

Submission status: Accepted

Solution code:
N,H,W = map(int,input().split())
AB = [list(map(int,input().split())) for _ in [0]*N]
print(sum(a>=H and b>=W for a,b in AB))

Submission status: Accepted

Solution code:
n,h,w=map(int, input().split())

count=0
for _ in range(n):
    a,b=map(int, input().split())
    if a>=h and b>=w:
        count+=1
        
print(count)

Submission status: Accepted

Solution code:
n,h,w,*t=map(int,open(0).read().split());print(sum(a>=h and b>=w for a,b in zip(t[::2],t[1::2])))

Submission status: Accepted

Solution code:
n,h,w = map(int, input().split())
count = 0
for _ in range(n):
    a,b = map(int, input().split())
    if a>=h and b>=w:
        count += 1
print(count)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
c = 0
for i in range(N):
  H_, W_ = map(int, input().split())
  if H_ >= H and W_ >= W:
    c += 1
print(c)

Submission status: Accepted

Solution code:
N, H, W = map(int, input().split())
ans = 0
for i in range(N):
    A, B = map(int, input().split())
    if H <= A and W <= B:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
a=[0]*n
b=[0]*n
ans=0
for i in range(n):
    a[i],b[i]=map(int,input().split())
    if a[i]>=h and b[i]>=w:
        ans+=1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = [ int(v) for v in input().split() ]
ans = 0
for i in range(n):
  a, b = [ int(v) for v in input().split() ]
  if a >= h and b >= w:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
AB = [list(map(int, input().split())) for _ in range(n)]
print(len(list(filter(lambda x: x[0] >= h and x[1] >= w, AB))))