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: Wrong Answer

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 or b >=w:
        c+=1
print(c)

Submission status: Wrong Answer

Solution code:
N, H, W = map(int, input().split())
area = H * W
count = 0
for i in range (0, N):
    Ha, Wa = map(int, input().split())
    a_area = Ha * Wa
    if a_area == area and Ha != H and Wa != W:
        continue
    elif a_area >= area:
        count += 1
    else:
        continue
print(count)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n, h, w = rm()
cnt = 0
for _ in range(n):
    a, b = rm()
    if a <= h and b <= w:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
from operator import itemgetter
from itertools import *
from bisect import *
from collections import *
from heapq import *
from fractions import Fraction
import sys

sys.setrecursionlimit(10 ** 6)

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

n,h,w=MI()
ans=0
for _ in range(n):
    a,b=MI()
    if a<=h and b<=w:ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N, H, W =I()
board = []
for i in range(N):
    a = l()
    board.append(a)

for i in board:
    if i[0]>=H+1 and i[1] >= W+1:
        count += 1
    elif i[0] == H or i[1] == W:
        count += 1


print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,h,w = map(int,input().split())
a = [list(map(int,input().split())) for i in range(n)]
p = 0

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

print(p)

Submission status: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:
n,h,w=map(int,input().split())
ans=0
for _ in range(n):
  y,x=map(int,input().split())
  ans+=(y//h)*(x//w)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
from math import floor
N, H, W = map(int, input().split())
ans = 0

for i in range(N):
  A, B = map(int, input().split())
  ans += (A//H) * (B//W)
  
print(ans)

Submission status: Wrong Answer

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 w<=b:
        ans+=1
print(ans)

Submission status: Wrong Answer

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 w>=b:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n_boards, target_x, target_y = [int(i) for i in input().split(" ")]
boards = 0
for i in range(n_boards):
  x, y =[int(k) for k in input().split(" ")]
  if x <= target_x and y <= target_y:
    boards += 1
print(boards)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
c = 0
N, H, W = map(int, input().split())
x = []
y = []
for i in range(N):
	x1,y1=[int(i) for i in input().split()]
	x.append(x1)
	y.append(y1)
for b in range(0, N-1):
	if  x[b]>= H and y[b] >= W:
		c = c + 1
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,h,w = map(int,input().split())
i = 0
k = 0
answer = 0
a = [""] * n
b = [""] * n
while i < n:
    a[i],b[i] = map(int,input().split())
    i += 1

o = h * w

while k < n:
    s = int(a[k]) * int(b[k])
    if o == s:
        answer += 1
    k += 1
print(answer)

Submission status: Wrong Answer

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

ans=0

for i in range(N):
  w,h=[int(x) for x in input().split()]
  if h<=H and w<= W:
    ans+=1

print(ans)

Submission status: Wrong Answer

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

ans=0

for i in range(N):
  h,w=[int(x) for x in input().split()]
  if h<=H and w<= W:
    ans+=1

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
lines = [list(map(int, line.strip().split(' '))) for line in sys.stdin]
print(sum([1 for h,w in lines[1:] if h <= lines[0][1] and w <= lines[0][2]]))

Submission status: Wrong Answer

Solution code:
from numpy import array
n,h,w = [int(x) for x in input().split()]
c = 0
for _ in range(n):
  d = array([h,w]) - array([int(x) for x in input().split()])
  d = d >= 0
  c += 1 if False in d else 0
print(c)

Submission status: Wrong Answer

Solution code:
from sys import stdin
N,k1,k2=[int(x) for x in stdin.readline().rstrip().split()]
a = []
for i in range(N):
    a.append([int(x) for x in stdin.readline().rstrip().split()])
cnt=0
for i in a:
    tmp1=i[0]-k1
    tmp2=i[1]-k2
    if tmp1>0 and tmp2>0:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

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

cnt=0
a=[]
b=[]

for i in range(n):
  c,d=map(int,input().split())
  a.append(c)
  b.append(d)
print(a,b)
for i in range(n):
  e=int(a[i]/h)
  f=int(b[i]/w)
print(cnt)

Submission status: Wrong Answer

Solution code:
n = input()
c = 0
for i in range(len(n)):
    if n[i] == '2':
        c += 1
print(c)

Submission status: Wrong Answer

Solution code:
from numpy import array
n,h,w = [int(x) for x in input().split()]
c = 0
for _ in range(n):
  b = [int(x) for x in input().split()]
  d = array([h,w]) - array(b)
  c += 0 if False in d else 1
print(c)

Submission status: Wrong Answer

Solution code:
from numpy import array
n,h,w = [int(x) for x in input().split()]
c = 0
for _ in range(n):
  d = array([h,w]) - array([int(x) for x in input().split()])
  c += 0 if False in d else 1
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(N):
  if A[i][0] <= H and A[i][1] <= W:
    print(i+1)

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())
cnt=0
for i in range(n):
  hh,ww=map(int,input().split())
  if hh>=h and ww>=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 H <= A and W <= B:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
l=[list(map(int,input().split())) for _ in range(n)]
# print(l)
cnt=0
for a,b in l:
    cnt+=min(a//h,b//w)
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:
    if a >= H and b >= W:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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())
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())
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,m = map(int,input().split())
answer = 0
a = 0
b = 0
for i in range(n):
  a,b = map(int,input().split())
  if(a-h>=0 and b-m>=0):
    answer +=1
print(answer)

Submission status: Accepted

Solution code:
from sys import stdin
rs = lambda : stdin.readline().strip()
ri = lambda : int(rs())
ril = lambda : list(map(int, rs().split()))

def main():
    N, H, W = ril()
    ans = 0
    for i in range(N):
        a, b = ril()
        if H <= a and W <= b:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
n, h, w = M()
ans = 0
for _ in range(n):
    a, b = M()
    if a >= h and b >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from collections import defaultdict
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil,pi,factorial
    from operator import itemgetter
    def I(): return int(input())
    def MI(): return map(int, input().split())
    def LI(): return list(map(int, input().split()))
    def LI2(): return [int(input()) for i in range(n)]
    def MXI(): return [[LI()]for i in range(n)]
    def SI(): return input().rstrip()
    def printns(x): print('\n'.join(x))
    def printni(x): print('\n'.join(list(map(str,x))))
    inf = 10**17
    mod = 10**9 + 7
#main code here!
    n,h,w=MI()
    count=0
    for i in range(n):
        x,y=MI()
        if h<=x and w<=y:
            count+=1
    print(count)
        
        
        
        
    
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
num,h_target,m_target = map(int,input().split())
#cnt_2_in_str = lambda x: 1 if x == '2' else 0

h_list,m_list = [],[]
for i in range(0,num):
    h,m = map(int,input().split())
    h_list.append(h)
    m_list.append(m)

cnt = 0
for i in range(0,num):
    if h_list[i] >= h_target and m_list[i] >= m_target:
        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:
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    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())
ab = [list(map(int, input().split())) for _ in range(n)]
num = 0
for i,j in ab:
    if h <= i and w <= j:
        num += 1
print(num)

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())
a = [0] * n
b = [0] * n
for i in range(n):
    a[i], b[i] = map(int, input().split())

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

print(count)

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 h <= a and w <= b:
        cnt += 1
    else:
        continue
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())
count=0
for i in range(n):
    a,b=list(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())

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:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N, H, W = map(int, readline().split())

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

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    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)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys, math
from functools import lru_cache
import numpy as np
import heapq
from collections import defaultdict
sys.setrecursionlimit(10**9)
MOD = 10**9+7

def input():
    return sys.stdin.readline()[:-1]

def mi():
    return map(int, input().split())

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


def main():
    N, H, W = mi()
    A, B = i2(N)
    
    cnt = 0
    for a, b in zip(A, B):
        if a >= H and b >= W:
            cnt += 1
    print(cnt)

if __name__ == '__main__':
    main()

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 or B<W:
        continue
    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())
ab = [list(map(int, input().split())) for i in range(n)]
ans = 0
for i in ab:
    if i[0] >= h and i[1] >= 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 h<=a and w<=b:
    ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, x, y = map(int, input().split())
l = [list(map(int, input().split())) for i in range(n)]
ans = 0
for i in range(n):
    if l[i][0] >= x and l[i][1] >= y:
        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):
    x,y = map(int,input().split())

    if x >= h and y >= w:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,h,w=map(int,input().split())
print(n-sum(a<h or b<w for a,b in [list(map(int,input().split())) for i in range(n)]))

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
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rf = lambda: map(float, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n, h, w = rm()
cnt = 0
for _ in range(n):
    a, b = rm()
    if a >= h and b >= w:
        cnt += 1
print(cnt)

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())))
a=0
for i in range(N):
    if AB[i][0]>=H and AB[i][1]>=W:
        a+=1
print(a)

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:
#CADDi 2018 for Beginners b
n,h,w=map(int,input().split())
ans=0
for i in range(n):
    tate,yoko=map(int,input().split())
    if tate>=h and yoko>=w:
        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:
ans=0
N,A,B=map(int,input().split())
for i in range(N):
  A1,B2=map(int,input().split())
  if A<=A1 and B<=B2:
    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(' '))
    while (0 <= a - h and 0 <= b - w):
        a -= h
        b -= w
        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())
g = []
for i in range(n):
    a, b = map(int, input().split())
    g.append([a, b])
ans = 0
for ai, bi in g:
    if ai >= h and bi >= w:
        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())

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 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())
    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:
import collections


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
import sys
from time import time, sleep
from random import random
from bisect import bisect, bisect_left
def inpl(): return list(map(int, input().split()))
N, H, W = inpl()
cnt = 0
for _ in range(N):
    a, b = inpl()
    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:
import sys

def solve():
    input = sys.stdin.readline
    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)
    return 0

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 H<=A and W<=B:
    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:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    N, H, W = LI()
    AB = [LI() for _ in range(N)]

    ans = len([(A, B) for A, B in AB if A >= H and B >= W])
    print(ans)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7


def main():
    N, H, W = map(int, readline().split())
    ans = 0
    for _ in range(N):
        A, B = map(int, readline().split())
        if H<=A and W<=B:
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    n, h, w = map(int, input().split())
    ans = 0
    for _ in range(n):
        a, b = map(int, input().split())
        ans += a >= h and b >= w
    print(ans)
resolve()

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())
sizes = [tuple(map(int, input().split())) for _ in range(n)]

ans = 0
for size in sizes:
    if size[0] >= h and size[1] >= w:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from operator import itemgetter
from itertools import *
from bisect import *
from collections import *
from heapq import *
from fractions import Fraction
import sys

sys.setrecursionlimit(10 ** 6)

def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def SI(): return sys.stdin.readline()[:-1]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]
int1 = lambda x: int(x) - 1
def MI1(): return map(int1, sys.stdin.readline().split())
def LI1(): return list(map(int1, sys.stdin.readline().split()))
p2D = lambda x: print(*x, sep="\n")
dij = [(1, 0), (0, 1), (-1, 0), (0, -1)]

n,h,w=MI()
ans=0
for _ in range(n):
    a,b=MI()
    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 h <= a and w <= b:
    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 = [int(i) for i in input().split()]
cnt = 0
for _ in range(n):
  a, b = [int(i) for i in input().split()]
  if h <= a and w <= b:
    cnt += 1
print(cnt)

Submission status: Accepted

Solution code:
# coding: utf-8
N, h, w = map(int,input().split())
#N = int(input())
#l = list(map(int,input().split()))
#s = list(map(str,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 = list(map(int, input().split(" ")))
possibility=0
for i in range(n):
    a,b = list(map(int, input().split(" ")))
    if a>=h and b>=w: possibility +=1
print(possibility)

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:
        if 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())
cnt = 0
for i in range(n):
  a,b = map(int,input().split())
  if a >= h and b >= w:
    cnt+= 1
print(cnt)