Problem:


Score : 66 points

Problem Statement

  Summer vacation ended at last and the second semester has begun.
  You, a Kyoto University student, came to university and heard a rumor that somebody will barricade the entrance of your classroom.
  The barricade will be built just before the start of the A-th class and removed by Kyoto University students just before the start of the B-th class.
  All the classes conducted when the barricade is blocking the entrance will be cancelled and you will not be able to attend them.
  Today you take N classes and class i is conducted in the t_i-th period.
  You take at most one class in each period.
  Find the number of classes you can attend.

Constraints

1 \leq N \leq 1000

1 \leq A < B \leq 10^9 

1 \leq t_i \leq 10^9

All t_i values are distinct.

Input

N, A and B are given on the first line and t_i is given on the (i+1)-th line. 

N A B
t1
:
tN

Output

Print the number of classes you can attend. 

Sample Input 1

5 5 9
4
3
6
9
1

Sample Output 1

4

You can not only attend the third class. 

Sample Input 2

5 4 9
5
6
7
8
9

Sample Output 2

1

You can only attend the fifth class. 

Sample Input 3

4 3 6
9
6
8
1

Sample Output 3

4

You can attend all the classes. 

Sample Input 4

2 1 2
1
2

Sample Output 4

1

You can not attend the first class, but can attend the second. 



Sample input:
5 5 9
4
3
6
9
1


Sample output:
4

Submission status: Wrong Answer

Solution code:
n, a, b = [ int(v) for v in input().split() ]
ans_list = []
for i in range(n):
    v = int(input())
    if a <= v < b:
        ans_list.append(v)
print(len(ans_list))

Submission status: Wrong Answer

Solution code:
n, a, b = [ int(v) for v in input().split() ]
ans_list = []
for i in range(n):
  v = int(input())
  if a <= v < b:
    ans_list.append(v)
print(len(ans_list))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, input().split())
kazu = 0
for cl in range(n):
  jugyo = int(input())
  if a >= jugyo or jugyo >= b:
    kazu += 1
print(kazu)

Submission status: Wrong Answer

Solution code:
N, A, B = list(map(int, input().split()))
t = [int(input()) for x in range(N)]

ans = 0

for i in range(N):
  if t[i] < A or t[i] > B:
    continue
  else:
    ans += 1
    
    
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if __name__ == "__main__":
    N,A,B = map(int, input().split())
    T = list(map(int, input().split()))
    res = 0
    for x in T:
        if (A <= x and x < B):
            continue
        res += 1
    print (res)

Submission status: Wrong Answer

Solution code:
import itertools

def getTi():
    return int(input())

N,A,B = map(int, input().split())
t = [getTi() for i in range(N)]
t.sort()
td = list(itertools.dropwhile(lambda x:A<=x and x<B, t))

print(len(td))

Submission status: Wrong Answer

Solution code:
n, a, b = map(int, raw_input().split())
res = n
for i in xrange(n):
 t = input()
 if t >= a and t < b:
  res -= 1

Submission status: Time Limit Exceeded

Solution code:
n, a, b = map(int, input().split())

s_t = set()
for i in range(n):
    s_t.add(int(input()))

print(len(s_t.difference(set(range(a, b)))))

Submission status: Time Limit Exceeded

Solution code:
n,a,b=map(int,input().split())
t=[]
for i in range(n):
    t.append(int(input()))
t=set(t)
ans=len(t)
for i in range(a,b):
    if i in t:
        ans-=1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n, a ,b = map(int, raw_input().split())
c = 0
for i in xrange(n):
    t = input()
    if not t in range(a,b):
        c += 1
print c

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-10-07
#

# Usage
#
"""
def read():
    """Read like as below.
    N A B
    t_1
    t_n
    """
    line_1 = input().split(" ")
    num_of_class = int(line_1[0])
    blocked_class = line_1[1:2]
    blocked_class = range(int(line_1[1]), int(line_1[2]))

    following_class = {int(input()) for _ in range(num_of_class)}

    return following_class, blocked_class


def check_available_class(following_class, blocked_class):
    """Check how many class you can attend.
    >>> check_available_class([4,3,6,9,1], [5,6,7,8])
    4
    >>> check_available_class([5,6,7,8,9], [4,5,6,7,8])
    1
    """
    return len(set(following_class).difference(blocked_class))


if __name__ == "__main__":
    f, b = read()
    print(check_available_class(f,b))

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-10-07
#

# Usage
#
"""
from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import

def read():
    """Read like as below.
    N A B
    t_1
    t_n
    """
    line_1 = input().split(" ")
    num_of_class = int(line_1[0])
    blocked_class = line_1[1:2]
    blocked_class = range(int(line_1[1]), int(line_1[2]))

    following_class = [int(input()) for _ in range(num_of_class)]

    return following_class, blocked_class


def check_available_class(following_class, blocked_class):
    """Check how many class you can attend.
    >>> check_available_class([4,3,6,9,1], [5,6,7,8])
    4
    >>> check_available_class([5,6,7,8,9], [4,5,6,7,8])
    1
    """
    return len(set(following_class).difference(set(blocked_class)))


if __name__ == "__main__":
    f, b = read()
    print(check_available_class(f,b))

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-10-07
#

# Usage
#
"""
from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import

def read():
    """Read like as below.
    N A B
    t_1
    t_n
    """
    line_1 = input().split(" ")
    num_of_class = int(line_1[0])
    blocked_class = line_1[1:2]
    blocked_class = range(int(line_1[1]), int(line_1[2]))

    following_class = [int(input()) for _ in range(num_of_class)]

    return following_class, blocked_class


def check_available_class(following_class, blocked_class):
    """Check how many class you can attend.
    >>> check_available_class([4,3,6,9,1], [5,6,7,8])
    4
    >>> check_available_class([5,6,7,8,9], [4,5,6,7,8])
    1
    """
    print(len(set(following_class) - set(blocked_class)))


if __name__ == "__main__":
    f, b = read()
    check_available_class(f,b)

Submission status: Time Limit Exceeded

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-10-07
#

# Usage
#
"""
from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import

def read():
    """Read like as below.
    N A B
    t_1
    t_n
    """
    line_1 = input().split(" ")
    num_of_class = int(line_1[0])
    blocked_class = line_1[1:2]
    blocked_class = range(int(line_1[1]), int(line_1[2]))

    following_class = [int(input()) for _ in range(num_of_class)]

    return following_class, blocked_class


def check_available_class(following_class, blocked_class):
    """Check how many class you can attend.
    >>> check_available_class([4,3,6,9,1], [5,6,7,8])
    4
    >>> check_available_class([5,6,7,8,9], [4,5,6,7,8])
    1
    """
    return len(set(following_class) - set(blocked_class))


if __name__ == "__main__":
    import doctest
    doctest.testmod()

    f, b = read()
    print(check_available_class(f,b))

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())
t = [int(input()) for _ in range(N)]
print(N-len(list(filter(lambda x: x in range(A,B),t))))

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
cnt = 0
for _ in range(N):
    t = int(input())
    if t < A:
        cnt += 1
    elif t >= B:
        cnt += 1

print(cnt)

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, gcd
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 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 
#mod = 998244353
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10

N, A, B = MAP()

ans = 0
for _ in range(N):
	t = INT()
	if t < A or B <= t:
		ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
r = 0
for i in range(N):
  t = int(input())
  if not A <= t < B:
    r += 1
print(r)

Submission status: Accepted

Solution code:
import bisect
N, A, B = map(int, input().split())
T = sorted([int(input()) for _ in range(N)])


l = bisect.bisect_left(T, A)
r = bisect.bisect_left(T, B)

print(N-(r-l))

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
s=set()
for i in range(n):
  p=int(input())
  if p<a or b<=p:
    s.add(p)
    
print(len(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())
cnt=0
for i in range(N):
    n=int(input())
    if n<A or B<=n:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
cnt=0
for i in range(n):
  t=int(input())
  if a<=t<b:cnt+=1
print(n-cnt)

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())

s_t = set()
for i in range(n):
    s_t.add(int(input()))
answer = 0
for s in s_t:
    if a <= s < b:
        pass
    else:
        answer += 1
print(answer)

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
ans = 0
for _ in range(n):
  t = int(input())
  if a <= t < b:
    continue
  ans += 1
print(ans)

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
T = [int(input()) for _ in range(n)]
ans = sum([i < a for i in T]) + sum([i >= b for i in T])
print(ans)

Submission status: Accepted

Solution code:
def main():
    n,a,b=map(int,input().split())
    t=[int(input()) for _ in [0]*n]
    for i in t:
        if a<=i<b:
            n-=1
    print(n)


main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys
from bisect import bisect_left

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N, s, t = MAP()
A = LIST(N)

A.sort()
l = bisect_left(A, s)
r = bisect_left(A, t)

print(N - (r-l))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect
n,a,b=map(int,input().split())
t=set([])
for i in range(n):
    t.add(int(input()))
t=list(t)
t.sort()
ai=bisect.bisect_left(t,a)
bi=bisect.bisect_left(t,b)
print(len(t)-(bi-ai))

Submission status: Accepted

Solution code:
n,a,b = map(int, input().split())
l = [int(input()) for _ in range(n)]
print(n-sum(map(lambda x:a<=x<b,l)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())

count = 0
for _ in range(N):
    t = int(input())
    if t < A or t >= B:
        count += 1

print(count)

Submission status: Accepted

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

N,A,B = map(int,input().split())
T = [int(input()) for _ in range(N)]

answer = sum(0 if A<=x<B else 1 for x in T)
print(answer)

Submission status: Accepted

Solution code:
n, a, b = [ int(v) for v in input().split() ]
ans_list = []
for i in range(n):
    v = int(input())
    if not a <= v < b:
        ans_list.append(v)
print(len(ans_list))

Submission status: Accepted

Solution code:
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("Yes")
    elif q == 0:print("No")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
"""
#decomment when needed
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
"""
n,s,e = ips()
a = []
for i in range(n):
    a.append(ip())
p = 0
a.sort()
while s > a[p]:
    p+=1
start = p
while a[p] < e:
    p+=1
    if p==n:break
end = p
print(n - end + start)

Submission status: Accepted

Solution code:
from bisect import bisect_left
n, a, b = map(int, input().split())
t = [int(input())for _ in range(n)]
t.sort()
idx1 = bisect_left(t, a)
idx2 = bisect_left(t, b)
print(n + idx1 - idx2)

Submission status: Accepted

Solution code:



def main():
    n, a, b = map(int, input().split())
    data = [int(input()) for i in range(n)]
    ans = 0
    for i in range(n):
        if data[i] < a or data[i] >= b:
            ans += 1
    print(ans)



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
print(N-sum([A<=int(input())<B for _ in range(N)]))

Submission status: Accepted

Solution code:
line = input().split()
N, A, B = int(line[0]), int(line[1]), int(line[2])
minus = 0
for i in range(N):
	if A <= int(input()) < B:
		minus += 1
print(N - minus)

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
for i in range(n):n-=[0,1][a<=int(input())<b]
print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split());print(len([i for i in[int(input())for i in range(n)]if i<a or b<=i]))

Submission status: Accepted

Solution code:
n,a,b = (int(i) for i in input().split())
ct = 0
for i in range(n):
  tp = int(input())
  if a<=tp<b: ct+= 1
print(n-ct)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, A, B = list(map(int, input().split()))
t = [int(input()) for x in range(N)]

ans = 0

for i in range(N):
  if t[i] < A or t[i] >= B:
    continue
  else:
    ans += 1
    
    
print(N - ans)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    n, a, b = map(int, input().split())
    count = 0

    for i in range(n):
        ti = int(input())

        if a <= ti < b:
            pass
        else:
            count += 1

    print(count)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,a,b,*s=map(int,open(0).read().split());print(n-sum(a<=t<b for t in s))

Submission status: Accepted

Solution code:
n,a,b,*s=map(int,open(0).read().split());print(sum(t<a or b<=t for t in s))

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split());c=0
for _ in range(n):t=int(input());c+=t<a or b<=t
print(c)

Submission status: Accepted

Solution code:
def r(t,a,b):return t<a or b<=t
n,a,b=map(int,input().split());print(sum(r(int(input()),a,b)for _ in[0]*n))

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
c=0
for _ in range(n):
  t=int(input())
  if t<a or b<=t:
    c+=1
print(c)

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
ans = 0
for i in range(N):
    t = int(input())
    ans += not A <= t < B

print(ans)

Submission status: Accepted

Solution code:
n,a,b = map(int,input().split())
res = 0
for i in range(n):
    t = int(input())
    if not a<=t<b:
        res += 1
print(res)

Submission status: Accepted

Solution code:
n,s,e=map(int,input().split())
print(sum(0 if s<=int(input())<e else 1 for i in range(n)))

Submission status: Accepted

Solution code:
N,A,B=map(int,input().split())
t=[int(input()) for i in range(N)]
ans=0
for i in range(N):
  if A<=t[i]<B:
    continue
  else:
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
from bisect import bisect_left
n,a,b = (int(i) for i in input().split())
x = [int(input()) for i in range(n)]
x.sort()
print(n-(bisect_left(x,b)-bisect_left(x,a)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()

    
    array_result.append(data.split(" "))

    flg = 1

    try:


        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result





arr_data = getinputdata()

n = int(arr_data[0][0])
a = int(arr_data[0][1])
b = int(arr_data[0][2])

#print(n,a,b)

arr=[]

for i in range(1,1+n):
    
    arr.append(int(arr_data[i][0]))
    
#print(arr)

print(len(list(filter(lambda x : not (a <= x <b), arr))))

#print(arr2)

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
N, A, B = map(int, input().split())
t = []
for tmp in range(N):
    t.append(int(input()))
print(len([tmp for tmp in t if tmp < A or B <= tmp]))

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
ans = 0

for _ in range(N):
    t = int(input())
    if (B <= t) or (t < A):
        ans += 1
        
print(ans)

Submission status: Accepted

Solution code:
n,a,b=[int(x) for x in input().split()]
ans=0
for i in [0]*n:
    t=int(input())
    if a<=t<b:
        continue
    ans+=1
print(ans)

Submission status: Accepted

Solution code:
N, A, B = list(map(int, input().split(' ')))
c = 0
for i in range(N):
    k = int(input())
    if (k in range(A,B)) == False:
        c += 1
print(c)

Submission status: Accepted

Solution code:
import sys
ar = [int(x.strip()) for x in sys.stdin.read().split()]
n, a, b = ar[0], ar[1], ar[2]
t = ar[3:]
print sum([1 if x < a or x >= b else 0 for x in t])

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    N,A,B = map(int, input().split())
    T = []
    for x in range(N):
        x = int(input())
        T.append(x)
    res = 0
    for x in T:
        if (A <= x and x < B):
            continue
        res += 1
    print (res)

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())

ans = 0
for i in range(n):
    t = int(input())
    if (a <= t and t < b):
        continue
    else:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N,A,B = map(int, input().split())
t = [(A <= int(input()) < B) for i in range(N)]
print(t.count(False))

Submission status: Accepted

Solution code:
def main():
    n, a, b = [int(x) for x in input().split()]
    res = 0
    for _ in range(n):
        if can_attend(int(input()), a, b):
            res += 1
    print(res)


def can_attend(class_time, a, b):
    if a <= class_time < b:
        return False
    return True


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
temp=[int(i) for i in input().split()]
N=temp[0]
A=temp[1]
B=temp[2]
ans=0
t=[int(input()) for i in range(N)]
for i in t:
	if i<A or B<=i:
		ans+=1
print(ans)

Submission status: Accepted

Solution code:
import bisect
n,a,b=map(int,input().split())
t=[]
for i in range(n):
    t.append(int(input()))
t=list(sorted(t))
i=bisect.bisect_left(t, a)
j=bisect.bisect_left(t, b)
print(i+(n-j))

Submission status: Accepted

Solution code:
n, a, b = map(int, raw_input().split())
res = n
for i in xrange(n):
 t = input()
 if t >= a and t < b:
  res -= 1
print res

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())
T = [int(input()) for _ in range(N)]
ans = 0
for t in T:
    if not (A <= t < B):
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
n,a,b=map(int,raw_input().split())
print-sum(a<=input()<b for i in[0]*n)+n

Submission status: Accepted

Solution code:
n, a ,b = map(int, raw_input().split())
c = 0
for i in xrange(n):
    t = input()
    if not a <= t < b:
        c += 1
print c

Submission status: Accepted

Solution code:
N, A, B = map(int, raw_input().split())
t_list = list()
for i in range(N):
    t_list.append(int(raw_input()))
 
res = len(t_list) - len([t for t in t_list if t >= A and t < B])
 
print res

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
m = 0
for i in range(n):
    t = int(input())
    if t < a or b <= t:
        m += 1
print(m)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# !/usr/bin/env python
# vim: set fileencoding=utf-8 :

"""
#
# Author:   Noname
# URL:      https://github.com/pettan0818
# License:  MIT License
# Created:  2016-10-07
#

# Usage
#
"""

def read():
    """Read like as below.
    N A B
    t_1
    t_n
    """
    line_1 = input().split(" ")
    num_of_class = int(line_1[0])
    blocked_class = line_1[1:2]
    blocked_class = range(int(line_1[1]), int(line_1[2]))

    following_class = {int(input()) for _ in range(num_of_class)}

    return following_class, blocked_class


def check_available_class(following_class, blocked_class):
    """Check how many class you can attend.
    >>> check_available_class([4,3,6,9,1], [5,6,7,8])
    4
    >>> check_available_class([5,6,7,8,9], [4,5,6,7,8])
    1
    """
    # return len(set(following_class).difference(blocked_class))
    attendable = [i for i in following_class if not i in blocked_class]
    return len(attendable)

if __name__ == "__main__":
    import doctest
    doctest.testmod()
    f, b = read()
    print(check_available_class(f,b))

Submission status: Accepted

Solution code:
n,a,b=map(int,raw_input().split())
count=0
for i in range(n):
	z=int(raw_input())
	if z/a>=1 and z/b<1:
		count+=1
print n-count

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
print(len({x for x in (int(input()) for _ in range(n)) if not a <= x < b}))

Submission status: Accepted

Solution code:
def read():
    return int(input())

def reads(sep=None):
    return list(map(int, input().split(sep)))

def main():
    n, a, b = reads()
    t = [read() for _ in range(n)]
    print(n - len([x for x in t if a<=x<b]))

main()

Submission status: Accepted

Solution code:
N,A,B = map(int, raw_input().split())
count = 0
for _ in xrange(N):
  t = int(raw_input())
  if t < A or B <= t:
    count += 1
print count

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
sum=0
for i in range(n):
    t=int(input())
    if t<a or b<=t:
        sum+=1
print(sum)

Submission status: Accepted

Solution code:
N, A, B=map(int, raw_input().split())
print sum(not(A<=int(raw_input())<B) for _ in range(N))

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**10
mod = 10**9 + 7

def f():
    n,a,b = list(map(int, input().split()))
    r = 0
    for _ in range(n):
        t = int(input())
        if t < a or t >= b:
            r += 1
    return r

print(f())

Submission status: Accepted

Solution code:
n,a,b=map(int,input().split())
t=[int(input()) for i in range(n)]
cnt=0
for i in range(n):
    if t[i]<a or t[i]>=b:
        cnt+=1
print(cnt)

Submission status: Accepted

Solution code:
n, a, b = [int(x) for x in input().split()]
t = []
ans = 0
for i in range(n):
    t.append(int(input()))
for period in t:
    if period >= a and period < b:
        continue
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,A,B = (int(i) for i in input().split())

a = [int(input()) for i in range(N)]

j=0

for i in range(N):
    if a[i]<A:
        j += 1
    elif a[i]>=B:
        j += 1

print(j)

Submission status: Accepted

Solution code:
N,A,B = raw_input().split(" ")
A = int(A)
B = int(B)
t = []
for i in range(int(N)):
    t.append(int(raw_input()))
count = 0
for i in range(int(N)):
    if t[i]<A or t[i]>=B:  count += 1
print count

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
i = 0
j = 0
while i < n:
    t = int(input())
    if (t < a or t >= b):
        j += 1
    i += 1
print(str(j))

Submission status: Accepted

Solution code:
N, A, B = [int(x) for x in input().split()]
t = [int(input()) for i in range(N)]

SUM = len([x for x in t if (x < A) or (x >= B)])

print(SUM)

Submission status: Accepted

Solution code:
n, a, b = map(lambda x: int(x), input().split())
t = []
for i in range(n):
        temp = int(input())
        if temp < a or temp >= b:
                t.append(temp)
print(len(t))

Submission status: Accepted

Solution code:
N, A, B = map(int, raw_input().split())
#t_li = []
cnt = 0
for i in range(N):
    if A <= int(raw_input()) < B:
        cnt +=1
#    t_li.append(raw_input())

print N-cnt

Submission status: Accepted

Solution code:
string = input().split()

ints = []

for c in string:
    ints.append(int(c))
    
N, A, B = ints[0], ints[1], ints[2]

classes = []

while len(classes) < N:
    i = input()
    if i in ('\n', ''):
        break
    classes.append(int(i))
    

soln = []
for c in classes:
    if c >= A and c < B:
        soln.append(c)

print(len(classes) - len(soln))

Submission status: Accepted

Solution code:
n, a, b = map(int, raw_input().split())
c = 0
for _ in xrange(n):
    if not (a <= int(raw_input()) < b):
        c += 1
print c

Submission status: Accepted

Solution code:
N, A, B = map(int, input().split())

count = 0
for i in range(N):
    tmp = int(input())
    if tmp < A or B <= tmp:
        count += 1

print(count)

Submission status: Accepted

Solution code:
N, A, B = map(int, raw_input().split())
t_list = list()
for i in range(N):
    t_list.append(int(raw_input()))

res = len(t_list) - len([t for t in t_list if t >= A and t < B])

print res

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys,copy,math,heapq,itertools as it,fractions,re,bisect,collections as coll

N, A, B = map(int, raw_input().split())
t = [int(raw_input()) for i in xrange(N)]

ans = N
for ti in t:
    if A <= ti < B: ans -= 1
print ans

Submission status: Accepted

Solution code:
N,A,B = map(int,raw_input().split())
t = [int(raw_input()) for i in xrange(N)]
t.sort()
for ti in t:
	if A <= ti < B:
		N -= 1
print N

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())
ts = map(int, (input() for _ in range(n)))
print(sum(1 for t in ts if t<a or t>=b))

Submission status: Accepted

Solution code:
n,a,b=map(int,raw_input().split())
t=[int(raw_input()) for _ in xrange(n)]
cnt=0
for i in xrange(n):
    if a<=t[i]<b:
        continue
    cnt+=1
print(cnt)

Submission status: Runtime Error

Solution code:
import bisect
n,a,b=map(int,input().split())
t=set([])
for i in range(n):
    t.add(int(input()))
t=list(t)
t.sort()
ai=bisect.bisect_left(t,a)
bi=bisect.bisect_left(t,b)
print(ans-(bi-ai))

Submission status: Runtime Error

Solution code:
n,a,b = map(int, input().split())
l = [int(input()) for _ in range(n)]
print(len(filter(lambda x:a<=x<b,l)))

Submission status: Runtime Error

Solution code:
n, a, b = map(int, input().split())
2.kazu = 0
3.for cl in range(n):
4.  jugyo = int(input())
5.  if a > jugyo or jugyo >= b:
6.    kazu += 1
7.print(kazu)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
a=int(input())
b=int(input())
cnt=0
for i in range(n):
        t=int(input())
        if t<a || b<=t:
                cnt=cnt+1
print cnt

Submission status: Runtime Error

Solution code:
n=int(input())
a=int(input())
b=int(input())
cnt=0
for i in range(n):
        t=int(input())
        if t<a or b<=t:
                cnt+=1
print cnt

Submission status: Runtime Error

Solution code:
n=int(input())
a=int(input())
b=int(input())
cnt=0
for i in range(n):
        t=int(input())
        if t<a or b<=t:
                cnt++
print cnt

Submission status: Runtime Error

Solution code:
n=int(input())
a=int(input())
b=int(input())
cnt=0
for i in range(n):
        t=int(input())
        if t<a || b<=t:
                cnt++
print cnt