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

input = sys.stdin.readline


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


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 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())
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())
ab=[list(map(int,input().split()))for _ in range(N)]
print(sum((a>=H)*(b>=W)for a,b in ab))

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:
a,b,c=map(int,input().split())
cnt = 0
for i in range(a):
  x,y = map(int,input().split())
  if x >= b and y >= c:
    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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N, H, W = MAP()
AB = [LIST() for _ in range(N)]

print(sum(y>=H and x>=W for y, x in AB))

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

Submission status: Accepted

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

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    N,H,W=MI()
    ans=0
    for i in range(N):
        a,b=MI()
        if a>=H and b>=W:
            ans+=1
            
    print(ans)

main()

Submission status: Accepted

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 and i[1] >= 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 H <= a and W <= b:
        res += 1
print(res)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for num in range(n):
    cut=int(a[num][0]/h)
    cutw=int(a[num][1]/w)
    if cut==0 or cutw==0:
        cut=0
        cutw=0
    if cutw<cut:
        cut=cutw
    ans+=cut
    
print(ans)

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())))
#print(ab)

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())
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:
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.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__":
    setrecursionlimit(10000)
    main()

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 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())
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:
#!/usr/bin/env python3

import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union
# import time
# import math
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import Fraction               # Fraction(a, b) => a / b ∈ Q. note: Fraction(0.1) do not returns Fraciton(1, 10). Fraction('0.1') returns Fraction(1, 10)



def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79e+308
    # inf = 2 ** 63 - 1             # (for fast JIT compile in PyPy) 9.22e+18
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def isp():   return input().split()
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n, h, w = mi()
    cnt = 0
    for _ in range(n):
        a, b = mi()
        if a >= h and b >= w:
            cnt += 1
    print(cnt)


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:
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())
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][1] >= w:
        p += 1

print(p)

Submission status: Accepted

Solution code:
def resolve():
    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 A[i] >= H and B[i] >= W:
            ans += 1
    print(ans)
resolve()

Submission status: Accepted

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

count = 0
for ab in AB:
    a = ab[0]
    b = ab[1]
    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
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

N, H, W = mapint()
cnt = 0
for _ in range(N):
    a, b = mapint()
    if a>=H and b>=W:
        cnt += 1
    else:
        continue
print(cnt)

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 a,b in ab:
    if h <= a and w <= b:
        cnt += 1
print(cnt)

Submission status: Accepted

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

cnt = 0
for v in lst:
    if v[0] >= H and v[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 i in range(n)],0
for i in a:
    b+=(i[0]>=h and i[1]>=w)
print(b)

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
readline = sys.stdin.readline

N,H,W = map(int,readline().split())
ans = 0
for i in range(N):
  a,b = map(int,readline().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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees#, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10**9 + 7
#from decimal import *

N, H, W = MAP()

ans = 0
for _ in range(N):
	A, B = MAP()
	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 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):
  s,t=map(int,input().split())
  ans+=(s>=h and t>=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:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()

#####Shorten#####
def DD(arg): return defaultdict(arg)


#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr

#####MakeDivisors######
def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors

#####MakePrimes######
def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum

#####GCD#####
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

#####IntLog#####
def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count

#############
# Main Code #
#############
N,H,W = IL()
ans = 0
for _ in range(N):
  a,b = IL()
  if a>=H and b>=W:
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 0
for row in sizeList:
    if( row[0] >= h and row[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) ]

c = 0
for a, b in a_b:
    if h <= a and w <= b:
        c+=1
print(c)

Submission status: Accepted

Solution code:
n,h,w=list(map(int,input().split()))
cnt=0
for i in range(n):
  a,b=list(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())
li = [list(map(int,input().split())) for i in range(n)]
ans = 0

for l in li:
    if l[0] >= h and l[1] >= 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 caddi18b_b():
    N, H, W = map(int, input().split())
    P = [tuple(map(int, input().split())) for _ in range(N)]

    ans = 0
    for a, b in P:
        if H <= a and W <= b: ans += 1
    print(ans)

caddi18b_b()

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 = []
for _ in range(n):
  ab.append(input().split())
  ab[-1][0] = int(ab[-1][0])
  ab[-1][1] = int(ab[-1][1])
  if ab[-1][0] < h or ab[-1][1] < w:
    ab.pop()
print(len(ab))

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 = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 7)
input = sys.stdin.readline

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())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


def input():
    return sys.stdin.readline().strip()


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

#入力
# s = list(input()[0:-1])
# n = int(input())
N,H,W = map(int, input().split())
# a = list(map(int,input().split()))
# b = list(map(int,input().split()))
# w = [int(input()) for i in range(n)]

ab=[]
for i in range(N):
    a,b = map(int, input().split())
    ab.append((a,b))
def main():
    ans = 0 
    for a,b in ab:
        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())
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=[list(map(int,input().split())) for _ in range(N)]
ans=0
for i in range(N):
    if H<=a[i][0] and W<=a[i][1] :
        ans+=1
    else :
        ans+=0
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:
from sys import stdin
import math
import re
import queue

input = stdin.readline

MOD = 1000000007
INF = 122337203685477580

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

if __name__ == '__main__':
    solve()

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 = list(map(int,input().split()))
ABL = [list(map(int,input().split())) for _ in range(N)]
count = 0
for AB in ABL:
    if AB[0] >= H and AB[1] >= W:
        count += 1
print(count)

Submission status: Accepted

Solution code:
from sys import stdin
N, H, W = [int(_) for _ in stdin.readline().rstrip().split()]
AB = [list(map(int, stdin.readline().rstrip().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:
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_)

ans = 0
for i in range(N):
    if A[i] >= H and B[i] >= 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:
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:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    n,h,w=map(int,input().split())
    cnt=0
    A, B = [0] * n, [0] * n
    for i in range(n):
        a,b=map(int,input().split())
        if a>=h and b>=w:
            cnt+=1
    print(cnt)

    
    

    
resolve()

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def resolve():
    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)
resolve()

Submission status: Accepted

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

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

c = 0

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

Submission status: Accepted

Solution code:
# CADDi 2018 for Beginners: B – AtCoder Alloy
N, H, W = [int(s) for s in input().split()]
R = [[int(s) for s in input().split()] for _ in range(N)]

count = 0

for i in range(N):
    if R[i][0] >= H and R[i][1] >= W:
        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 a >= h and b >= w:
        ans += 1

print(ans)

Submission status: Accepted

Solution code:
n, h, w = map(int, input().split())
ab=[map(int,input().split()) for _ in range(n)]
a, b = [list(_) for _ in zip(*ab)]
ans=0
for i in range(n):
    if a[i] >= h and b[i] >= 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
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    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)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import math
import bisect
import queue

N,H,W = map(int,stdin.readline().strip().split())

ans = 0

for i in range(N):
    A, B = map(int, stdin.readline().strip().split())
    ans += min(A // H, B // W)

stdout.writelines(str(ans) + '\n')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def i(): return map(int, input().split())
n, h, w = i()
c = 0
for _ in range(n):
  a, b = i()
  c += (a >= h)*(b >= w)
print(c)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    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)

if __name__=='__main__':
    main()

Submission status: Accepted

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

n, h, w = map(int,input().split())
A = [list(map(int,input().split())) for i in range(n)]

ans = 0
for i in range(n):
    if A[i][0] >= h and A[i][1] >= 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())
    if a >= h and b >= w:
        cnt += 1
print(cnt)

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