ZhenlongDai/ACPR huggingface dataset:
Problem: p03062
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
A = list(map(int, input().split()))
cnt = 0
sum_a = 0
min_a = A[0]
for i in range(n):
    if A[i] <= 0:
        cnt += 1
        A[i] = A[i]*(-1)
    sum_a += A[i]
    if min_a > A[i]:
        min_a = A[i]
if cnt % 2 == 0:
    for a in A:
        ans = sum_a
else:
    ans = sum_a - 2*min_a
print(ans)

Failing test case input:
3
-14 5 1

Expected output:
18


Actual output:
48


Fixed submission (verdict: Accepted):
n = int(input())
A = list(map(int, input().split()))
cnt = 0
s = 0
m = 10 ** 9
for ai in A:
    if ai <= 0:
        cnt = cnt + 1
        ai *= (-1)
    s += ai
    if m > ai:
        m = ai
if cnt % 2 == 0:
    for a in A:
        ans = s
else:
    ans = s - 2*m
print(ans)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input=sys.stdin.readline
N=int(input())
num = list(map(int,input().split()))
c=0
ans=0
for i in range(N):
  if num[i]<0:
    c+=1 
ans = list(map(lambda x: abs(x),num))
if c%2==0:
  print(sum(ans))
else:
  print(sum(ans) - min(num,key=lambda x: abs(x))*2)

Failing test case input:
5
3 -1 -4 -1 16

Expected output:
23


Actual output:
27


Fixed submission (verdict: Accepted):
import sys
input=sys.stdin.readline
N=int(input())
num = list(map(int,input().split()))
c=0
ans=0
for i in range(N):
  if num[i]<0:
    c+=1 
ans = list(map(lambda x: abs(x),num))
if c%2==0:
  print(sum(ans))
else:
  print(sum(ans) - min(ans,key=lambda x: abs(x))*2)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
cnt=0
zero=0
ans=0
mn=1000000001
for x in a:
  mn=min(mn,abs(x))
  if x<0:
    cnt+=1
    ans-=x
  else:
    ans+=x
  print(ans)
cnt%=2
if cnt==0:
  print(ans)
else:
  print(ans-mn*2)
  
  
  
  
  


Failing test case input:
5
3 0 -5 -1 8

Expected output:
17


Actual output:
3
3
8
9
17
17


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))
cnt=0
zero=0
ans=0
mn=1000000001
for x in a:
  mn=min(mn,abs(x))
  if x<0:
    cnt+=1
    ans-=x
  else:
    ans+=x
  
cnt%=2
if cnt==0:
  print(ans)
else:
  print(ans-mn*2)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))
for i in range(N-1):
  if A[i] + A[i+1] < 0:
    A[i] = -A[i]
    A[i+1] = -A[i+1]
print(sum(A))

Failing test case input:
11
-16874157 1000110000 -164217899 1001000010 -856410392 0 1010010010 -239123828 1000000010 -337457434 1010000110

Expected output:
6635203850


Actual output:
5119857214


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))
cnt = 0
for i in range(N):
  if A[i] < 0:
    A[i] = abs(A[i])
    cnt += 1
if cnt %2 == 1:
  print(sum(A)-2*min(A))
else:
  print(sum(A))
Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(x) for x in input().split(' ')]

s = 0
mc = 0
for i in A:
  if i < 0:
    mc += 1
  s += abs(i)

if (mc % 2 == 1):
  mv = min(A[0],A[-1])
  
  s -= mv*2
print(s)

Failing test case input:
11
-1000000000 1000000000 -1000000000 1000000000 -1000000000 0 1000000000 -1000000000 1000000000 -1000000000 1000000000

Expected output:
10000000000

Actual output:
12000000000


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(x) for x in input().split(' ')]

s = 0
mc = 0
mh = 1e10
for i in A:
  if i <= 0:
    mc += 1
  if abs(i) <= mh:
    mh = abs(i)
  s += abs(i)

if (mc % 2 == 1):
  mv = min(A[0],A[-1])
  
  s -= mh*2
print(s)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
i = 10**9
s = 0
z = 0
c = 0
for b in a:
  if b < 0:
    s += 1
  elif b == 0:
    z += 1
    break
  if abs(b) < i:
    i = abs(b)
  c += abs(b)
if z > 0 or s%2 == 0:
  print(c)
else:
  print(c-2*i)

Failing test case input:
3
-2 0 1

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
i = 10**9
s = 0
z = 0
c = 0
for b in a:
  if b < 0:
    s += 1
  elif b == 0:
    z += 1
  if abs(b) < i:
    i = abs(b)
  c += abs(b)
if z > 0 or s%2 == 0:
  print(c)
else:
  print(c-2*i)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int, input().split()))

k = 0
tmp = abs(a[n - 1])

for i in range(n - 1):
    if abs(a[i]) < tmp:
        tmp = abs(a[i])

    if a[i] < 0:
        a[i] *= -1
        a[i + 1] *= -1

    k += a[i]

if a[n - 1] < 0:
    k += abs(a[n - 1])
    k -= tmp
else:
    k += a[n - 1]

print(k)


Failing test case input:
5
10 -4 -8 -11 5

Expected output:
30


Actual output:
34


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int, input().split()))

k = 0
tmp = abs(a[n - 1])

for i in range(n - 1):
    if abs(a[i]) < tmp:
        tmp = abs(a[i])

    if a[i] < 0:
        a[i] *= -1
        a[i + 1] *= -1

    k += a[i]

if a[n - 1] < 0:
    if abs(a[n - 1]) == tmp:
        k += a[n - 1]
    else:
        k += abs(a[n - 1])
        k -= tmp * 2
else:
    k += a[n - 1]

print(k)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
mi = 0
for i in range(n):
  if a[i] < 0:
    mi+=1
  a[i]= abs(a[i])
if mi %2 == 1:
  print(sum(a)-min(a))
else:
  print(sum(a))

Failing test case input:
5
17 -4 -4 -14 5

Expected output:
36


Actual output:
40


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
mi = 0
for i in range(n):
  if a[i] < 0:
    mi+=1
  a[i]= abs(a[i])
if mi %2 == 1:
  print(sum(a)-2*min(a))
else:
  print(sum(a))
Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
aabs = [i if i>=0 else i*(-1) for i in a]
MIN = min(aabs)
ans = 0
mcount = 0

for i in range(n):
  if a[i] < 0:
    mcount += 1
    
if mcount%2 == 0:
  for i in a:
    ans += abs(i)
    print(ans)
else:
  for i in a:
    ans += abs(i)
  print(ans - 2*MIN)
  

Failing test case input:
3
0 1 1

Expected output:
2


Actual output:
0
1
2


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))
aabs = [i if i>=0 else i*(-1) for i in a]
MIN = min(aabs)
ans = 0
mcount = 0

for i in range(n):
  if a[i] < 0:
    mcount += 1
    
if mcount%2 == 0:
  for i in a:
    ans += abs(i)
  print(ans)
else:
  for i in a:
    ans += abs(i)
  print(ans - 2*MIN)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = list(map(int, input().split()))



count = 0








min1 = abs(s[0])

for i in range(N):
  min1 = min(min1, abs(s[i]))
  count += abs(s[i])
  
count = count - 2*min1
print(count)
  

Failing test case input:
3
-2 1 -1

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
N = int(input())
s = list(map(int, input().split()))



count = 0
odd = 0

min1 = abs(s[0])

for i in range(N):
  min1 = min(min1, abs(s[i]))
  count += abs(s[i])
  if abs(s[i]) != s[i]:
    odd += 1

count2 = count - 2*min1

if odd%2 == 1:
  print(count2)
else:
  print(count)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
z = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    elif a[i] == 0:
        z = True
    if i == 1:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k and not(z):
    sum -= m*2
print(sum)

Failing test case input:
5
3 -4 -4 -28 5

Expected output:
38


Actual output:
36


Fixed submission (verdict: Accepted):
n = int(input())
w = input().split(" ")

a = []
m = 0
k = False
for i in range(n):
    a.append(int(w[i]))
    if a[i] < 0:
        a[i] *= -1
        k = not (k)
    if i == 0:
        m = a[i]
    if a[i] < m:
        m = a[i]

sum = sum(a)
if k:
    sum -= m*2
print(sum)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
n-=1
a=list(map(int,input().split()))
cnt=0
ans=0
for i in range(n):
    if cnt>0:
        a[i]=a[i]*(-1)
    if a[i]<0:
        cnt=2
        ans+=a[i]*(-1)
    else:
        ans+=a[i]
    cnt-=1
if cnt>0:
    a[n]=a[n]*(-1)
if a[n]<0:
    ans+=a[n]
else:
    ans+=a[n]
print(ans)

Failing test case input:
5
3 -1 -4 -1 16

Expected output:
23


Actual output:
-7


Fixed submission (verdict: Accepted):
n=int(input())
n-=1
a=list(map(int,input().split()))
cnt=0
ans=0
for i in range(n):
    if cnt>0:
        a[i]=a[i]*(-1)
    if a[i]<0:
        cnt=2
        a[i]=a[i]*(-1)
    else:
        pass
    ans+=a[i]
    cnt-=1
if cnt>0:
    a[n]=a[n]*(-1)
if a[n]<0:
    a[n]=a[n]*(-1)
    m=min(a)
    ans=ans+a[n]-m*2
else:
    ans+=a[n]
print(ans)
Problem: p03062
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

count = 0
min = abs(A[0])
sum = 0
for i in A:
    
    if i<=0:
        count += 1
    
    if min > abs(i):
        min = abs(i)
    
    sum += abs(i)



if count%2 == 0:
    print(sum)
else:
    print(sum-min)


Failing test case input:
5
3 -1 -4 -1 16

Expected output:
23


Actual output:
24


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))

count = 0
min = abs(A[0])
sum = 0
for i in A:
    
    if i<=0:
        count += 1
    
    if min > abs(i):
        min = abs(i)
    
    sum += abs(i)



if count%2 == 0:
    print(sum)
else:
    print(sum-(min*2))

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))

sum=0
min=10**9
minus=0
for i in a:
  if i>=0:
    sum=sum+i
    if min>i:
      min=i
  else:
    minus=minus+1
    sum=sum-i
    if min>-i:
      min=-i
print(sum if minus%2==0 else sum-min)

Failing test case input:
5
2 -1 -4 -1 5

Expected output:
11


Actual output:
12


Fixed submission (verdict: Accepted):
n=int(input())
a=list(map(int,input().split()))

sum=0
min=10**9
minus=0
for i in a:
  if i>=0:
    sum=sum+i
    if min>i:
      min=i
  else:
    minus=minus+1
    sum=sum-i
    if min>-i:
      min=-i
print(sum if minus%2==0 else sum-min*2)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
n_list = [int(i) for i in input().split()] 

minus_count = 0
plus_list = []
for x in n_list:
  if x < 0:
    minus_count += 1
  plus_list.append(abs(x))
    
if x % 2 == 0 or 0 in plus_list: 
  print(sum(plus_list))
else:
  print(sum(plus_list) - 2 * min(plus_list))


Failing test case input:
3
-2 1 -1

Expected output:
4


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
n_list = [int(i) for i in input().split()] 

minus_count = 0
plus_list = []
for x in n_list:
  if x < 0:
    minus_count += 1
  plus_list.append(abs(x))
    
if minus_count % 2 == 0 or 0 in plus_list: 
  print(sum(plus_list))
else:
  print(sum(plus_list) - 2 * min(plus_list))

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
 
count = len([i for i in A if i < 0])
 
if count % 2 == 1: 
  print(sum(A)-2*min(A))
else:
  print(sum(A))

Failing test case input:
5
3 -1 -4 -1 16

Expected output:
23


Actual output:
21


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
 
count = len([i for i in A if i < 0])
A = [abs(i) for i in A]
 
if count % 2 == 1: 
  print(sum(A)-2*min(A))
else:
  print(sum(A))
Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))
B = A.copy()

count = 0
for i in range(N):
    if B[i] < 0:
        count += 1
        B[i] *= -1
  
res = 0
if count%2 == 1:
    B.sort()
    for i in range(1, N):
        res += abs(B[i])

    res += B[0]
else:
    for i in range(N):
        res += abs(B[i])
        
print(res)

            

Failing test case input:
3
-1 1 1

Expected output:
1


Actual output:
3


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int, input().split()))
B = A.copy()

count = 0
for i in range(N):
    if B[i] < 0:
        count += 1
        B[i] *= -1
  
res = 0
if count%2 == 1:
    B.sort()
    for i in range(1, N):
        res += abs(B[i])

    res -= B[0]
else:
    for i in range(N):
        res += abs(B[i])
        
print(res)

Problem: p03062
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import sys

input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))
m = 0
zero = 0
ans = 0
odd = 10**9
for i in A:
    if i < 0:
        m += 1
    if i == 0:
        zero = 1
    ans += abs(i)
    if odd > abs(i):
        odd = abs(i)
if m %2 == 0 or zero:
    print(ans)
else:
    print(ans-odd)

Failing test case input:
5
15 -4 -4 -14 5

Expected output:
34


Actual output:
38


Fixed submission (verdict: Accepted):
import sys

input = sys.stdin.readline
N = int(input())
A = list(map(int, input().split()))
m = 0
zero = 0
ans = 0
odd = 10**9
for i in A:
    if i < 0:
        m += 1
    if i == 0:
        zero = 1
    ans += abs(i)
    if odd > abs(i):
        odd = abs(i)
if m %2 == 0 or zero:
    print(ans)
else:
    print(ans-odd*2)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    N = int(input())
    A = list(map(int, input().split()))
    Ap = [i for i in A if i >= 0]
    An = [i for i in A if i < 0]
    if len(An) % 2 == 0:
      return sum(Ap) - sum(An)
    return sum(Ap) - sum(sorted(An)[1:])
print(main())

Failing test case input:
11
-503952896 1000110000 -393529007 1001001000 -2255404057 0 1010010001 -474477572 1000100011 -415342299 1100000100

Expected output:
9153926943


Actual output:
6898522886


Fixed submission (verdict: Accepted):
def main():
    N = int(input())
    A = list(map(int, input().split()))
    s = sum(abs(a) for a in A)
    if sum(1 for i in A if i < 0) & 1:
        s -= 2 * min(abs(a) for a in A)
    return s

print(main())
Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = list(map(int,input().split()))
neg_num = 0
min_abs_a = -float('inf')
sum_abs_A = 0
include_zero = False
for a in A:
  sum_abs_A += abs(a)
  if a == 0: include_zero = True
  if a < 0 :
    neg_num += 0
    min_abs_a = min(abs(a),min_abs_a)
print(sum_abs_A if neg_num%2==0 or include_zero is True else sum_abs_A + 2*min_abs_a)

Failing test case input:
5
2 -2 -4 -1 7

Expected output:
14


Actual output:
16


Fixed submission (verdict: Accepted):
N = int(input())
A = list(map(int,input().split()))
neg_num = 0
min_abs_a = float('inf')
sum_abs_A = 0
include_zero = False
for a in A:
  sum_abs_A += abs(a)
  min_abs_a = min(abs(a),min_abs_a)
  if a == 0: include_zero = True
  if a < 0 : neg_num += 1
print(sum_abs_A if neg_num%2==0 or include_zero is True else sum_abs_A - 2*min_abs_a)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(i) for i in input().split()]

ans = sum(A)
for i in range(N):
  if A[i] < 0:
    if i != N-1:
      if A[i]+A[i+1] <= 0:
        A[i] = A[i] * -1
        A[i+1] = A[i+1] * -1
        ans = max(ans, sum(A))

print(ans)


Failing test case input:
5
15 -4 -4 -14 5

Expected output:
34


Actual output:
32


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(i) for i in input().split()]

count = 0
for i in range(N):
  if A[i] <0:
    count = count + 1
    A[i] = A[i] * -1

if 0 in A:
  ans = sum(A)
else:
  if count%2 == 0:
    ans = sum(A)
  else:
    ans = sum(A) - 2*min(A)

print(ans)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
n_list = [int(i) for i in input().split()] 

minus_count = 0
plus_list = []
for x in n_list:
  if x < 0:
    minus_count += 1
  plus_list.append(abs(x))
    
if x % 2 == 0: 
  print(sum(plus_list))
else:
  print(sum(plus_list) - 2 * min(plus_list))


Failing test case input:
5
3 -1 -4 -1 16

Expected output:
23


Actual output:
25


Fixed submission (verdict: Accepted):
n = int(input())
n_list = [int(i) for i in input().split()] 

minus_count = 0
plus_list = []
for x in n_list:
  if x < 0:
    minus_count += 1
  plus_list.append(abs(x))
    
if minus_count % 2 == 0 or 0 in plus_list: 
  print(sum(plus_list))
else:
  print(sum(plus_list) - 2 * min(plus_list))

Problem: p03062
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n  = int(input())
a = list(map(int,input().split()))
ans = 0
for i in range(n):
    a[i] = abs(a[i])
    ans += a[i]
if 0 in a:
    print(ans)
else:
    print(ans - 2*min(a))

Failing test case input:
3
-10 5 -4

Expected output:
19

Actual output:
11


Fixed submission (verdict: Accepted):
n  = int(input())
a = list(map(int,input().split()))
ans = 0
mn = 0
for i in range(n):
    if a[i] < 0:
        mn += 1
        a[i] = abs(a[i])
    ans += a[i]
if 0 in a or mn%2 == 0:
    print(ans)
else:
    print(ans - 2*min(a))
Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
ina=list(map(int,input().split()))
a=[]
flg=False
cnt=0

for i in range(n):
  tmp=ina[i]
  a.append(abs(tmp))
  if tmp<0:
    cnt+=1
    if flg==False:
      flg=True
      mi=abs(tmp)
  if flg and mi>abs(tmp):
    mi=abs(tmp)
if cnt%2==0:
  print(sum(a))
else:
  print(sum(a)-mi*2)


Failing test case input:
3
0 0 -10

Expected output:
10


Actual output:
-10


Fixed submission (verdict: Accepted):
n=int(input())
ina=list(map(int,input().split()))
a=[]
cnt=0
mi=9999999999
for i in range(n):
  tmp=ina[i]
  a.append(abs(tmp))
  if tmp<0:
    cnt+=1
  if mi>abs(tmp):
    mi=abs(tmp)
if cnt%2==0:
  print(sum(a))
else:
  print(sum(a)-mi*2)

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
    n = int(input())
    a_s = list(map(int, input().split(' ')))

    count = 0
    ans = 0
    _min = 10**9

    for a in a_s:
        if a <= 0:
            count += 1
        ans += abs(a)
        _min = min(_min, abs(a))
    if count % 2 == 1:
        ans -= _min
    print(ans)



if __name__ == '__main__':
    main()


Failing test case input:
5
17 -4 -4 -14 5

Expected output:
36


Actual output:
40


Fixed submission (verdict: Accepted):
def main():
    n = int(input())
    a_s = list(map(int, input().split(' ')))

    count = 0
    ans = 0
    _min = 10**9

    for a in a_s:
        if a <= 0:
            count += 1
        ans += abs(a)
        _min = min(_min, abs(a))
    if count % 2 == 1:
        ans -= 2*_min
    print(ans)



if __name__ == '__main__':
    main()

Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))

abs_a = [abs(i) for i in a]
a = len([i for i in a if i < 0 or i == 0])
init = [i for i in abs_a if i != 0]
if a%2 == 0:
    print(sum(abs_a))
else:
    abs_a_min = min(init)
    print(sum(abs_a)-abs_a_min*2)


Failing test case input:
3
0 0 -10

Expected output:
10


Actual output:
-10


Fixed submission (verdict: Accepted):
n = int(input())
a = list(map(int,input().split()))

abs_a = [abs(i) for i in a]
hu = [i for i in a if i < 0]
hunokazu = len(hu)
zero = 0 in a

if hunokazu%2 == 0 or zero == True:
    print(sum(abs_a))
else:
    abs_a_min = min(abs_a)
    print(sum(abs_a)-abs_a_min*2)
Problem: p03062
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
A = [int(n) for n in input().split()]

sum = 0
minus = 0
minn = 10 ** 10
for a in A:
    b = abs(a)
    sum += b
    if b < minn:
        minn = b
    if a < 0:
        minus += 1

print(sum)
print(minn)
print(minus)

if minus % 2 == 0:
    print(sum)
else:
    print(sum - 2*minn)


Failing test case input:
11
-16874157 1000110000 -164217899 1001000010 -856410392 0 1010010000 -239123828 1000000010 -337457434 1010000110

Expected output:
6635203840


Actual output:
6635203840
0
5
6635203840


Fixed submission (verdict: Accepted):
N = int(input())
A = [int(n) for n in input().split()]

sum = 0
minus = 0
minn = -1
for a in A:
    b = abs(a)
    sum += b
    if minn == -1 or b < minn:
        minn = b
    if a < 0:
        minus += 1

if minus % 2 == 0:
    print(sum)
else:
    print(sum - 2*minn)
Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if x1 == x2 and x3 == x4:
        print("YES")
    elif x1 == x2 or x3 == x4:
        print("NO")
    elif (y2 - y1) / (x2 - x1) - (y4 - y3) / (x4 - x3) < 1e-10:
        print("YES")
    else:
        print("NO")

Failing test case input:
2
4.321343772389822 1.3364846399828059 3.820512094652794 3.3192116791578963 3.1588326335062655 1.2324772096729046 3.950438914943076 1.7101002656514341
6.90252469233348 3.754775297295594 11.164469367513322 8.677134993106279 15.460510197185764 6.858362845609268 8.533279840915569 13.249466279789214

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if x1 == x2 and x3 == x4:
        print("YES")
    elif x1 == x2 or x3 == x4:
        print("NO")
    elif abs((y2 - y1) / (x2 - x1) - (y4 - y3) / (x4 - x3)) < 1e-10:
        print("YES")
    else:
        print("NO")

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    det = (y1-y2) * (x3-x4) - (x1-x2) * (y3-y4)
    if det<1e-12 :
        print("YES")
    else:
        print("NO")

Failing test case input:
2
4.321343772389822 2.7487836348901857 3.9659646355733096 3.5855296157216676 3.995698923255761 1.690211528935138 3.950438914943076 2.996569483785644
6.90252469233348 3.95151384090038 11.32950612487289 10.201219690170177 15.460510197185764 8.524959669314121 8.656060891457475 13.393839492831313

Expected output:
NO
NO


Actual output:
NO
YES


Fixed submission (verdict: Accepted):
for i in range(int(input())):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    det = abs((y1-y2) * (x3-x4) - (x1-x2) * (y3-y4))
    if det<1e-12 :
        print("YES")
    else:
        print("NO")

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if (c-a)*(h-f) - (d-b)*(g-e):
        print("No")
    else:
        print("Yes")

Failing test case input:
2
2.087608134318849 0.0 1.6749673598267916 1.0732338547743758 1.6152474250143753 0.3458310450303873 2.981637834047748 1.6292131026754104
5.493376924207057 2.612421928593321 10.240036576297397 6.555105854897364 14.793675097927146 5.95543610948743 7.0 12.180352827357845

Expected output:
NO
NO


Actual output:
No
No


Fixed submission (verdict: Accepted):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if abs((c-a)*(h-f) - (g-e)*(d-b)) < 1e-10:
        print("YES")
    else:
        print("NO")
Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for _ in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    dx12, dx34, dy12, dy34 = x1 - x2, x3 - x4, y1 - y2, y3 - y4
    print('YES' if dx12 * dy34 - dy12 * dx34 < 1e-10 else 'NO')

Failing test case input:
2
1.327899999900154 0.0 1.6749673598267916 1.0 1.0 0.3458310450303873 2.981637834047748 1.4628584821212818
4.324753687748982 2.2346086183139713 10.240036576297397 6.555105854897364 14.793675097927146 5.95543610948743 7.0 11.906248286979677

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
n = int(input())
for _ in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    dx12, dx34, dy12, dy34 = x1 - x2, x3 - x4, y1 - y2, y3 - y4
    print('YES' if abs(dx12 * dy34 - dy12 * dx34) < 1e-10 else 'NO')

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if (c-a)*(h-f) - (d-b)*(g-e) < 1e-10:
        print("Yes")
    else:
        print("No")

Failing test case input:
2
2.087608134318849 0.0 2.2117258079089996 1.1556096309520854 1.8600365640423915 0.3458310450303873 2.981637834047748 1.6292131026754104
5.493376924207057 2.612421928593321 10.372447734187602 7.081122407685485 14.793675097927146 6.858362845609268 7.0 12.180352827357845

Expected output:
NO
NO


Actual output:
Yes
No


Fixed submission (verdict: Accepted):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if abs((c-a)*(h-f) - (g-e)*(d-b)) < 1e-10:
        print("YES")
    else:
        print("NO")

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
  if x2 == x1:
    if x4 == x3:
      print("YES")
    else:
      print("NO")
  elif x4 == x3:
    print("NO")
  else:
    print("YES" if (y2 - y1) / (x2 - x1) - (y4 - y3) / (x4 - x3) < 1e-10 else "NO")

Failing test case input:
2
2.926287414400688 0.6174638399148507 2.2117258079089996 2.51039017960215 2.2432914589132955 0.3458310450303873 3.950438914943076 1.6292131026754104
6.90252469233348 3.314602021400227 10.473008708157936 7.081122407685485 15.460510197185764 6.858362845609268 8.418131290589363 13.249466279789214

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) * 10**10 for j in input().split()]
  if x2 == x1:
    if x4 == x3:
      print("YES")
    else:
      print("NO")
  elif x4 == x3:
    print("NO")
  else:
    print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")
Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(int(input())):
  a,b,c,d,e,f,g,h = map(float,input().split())
  if a == c:
    print("YES" if e == g else "NO")
  elif e == g:
    print("NO")
  else:
    print("YES" if (b-d)/(a-c) - (f-h)/(e-g) < 1e-10 else "NO")




Failing test case input:
2
2.926287414400688 0.0 2.2117258079089996 2.51039017960215 2.2432914589132955 0.3458310450303873 3.950438914943076 1.6292131026754104
5.957858300757107 3.314602021400227 10.473008708157936 7.081122407685485 15.460510197185764 6.858362845609268 7.533578119892425 12.180352827357845

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
for i in range(int(input())):
  a,b,c,d,e,f,g,h = map(float,input().split())
  if a == c:
    print("YES" if e == g else "NO")
  elif e == g:
    print("NO")
  else:
    print("YES" if abs((b-d)/(a-c) - (f-h)/(e-g)) < 1e-10 else "NO")

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if abs((c-a)*(h-f) - (d-b)*(g-e)) < 1e-10:
        print("No")
    else:
        print("Yes")

Failing test case input:
2
1.327899999900154 0.0 1.6749673598267916 1.0 1.0 0.3458310450303873 2.981637834047748 1.4628584821212818
4.324753687748982 2.2346086183139713 10.240036576297397 6.555105854897364 14.793675097927146 5.95543610948743 7.0 11.906248286979677

Expected output:
NO
NO


Actual output:
Yes
Yes


Fixed submission (verdict: Accepted):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if abs((c-a)*(h-f) - (g-e)*(d-b)) < 1e-10:
        print("YES")
    else:
        print("NO")

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for _ in range(int(input())):
    ax, ay, bx, by, cx, cy, dx, dy = map(float, input().split())
    print(['NO','YES'][(ay-by)*(dx-cx)-(ax-bx)*(dy-cy)<1e-10])

Failing test case input:
2
4.321343772389822 2.7487836348901857 3.9659646355733096 3.5855296157216676 3.995698923255761 1.690211528935138 3.950438914943076 2.996569483785644
6.90252469233348 3.95151384090038 11.32950612487289 10.201219690170177 15.460510197185764 8.524959669314121 8.656060891457475 13.393839492831313

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
for _ in range(int(input())):
    ax, ay, bx, by, cx, cy, dx, dy = map(float, input().split())
    print(['NO','YES'][abs((ay-by)*(dx-cx)-(ax-bx)*(dy-cy))<1e-10])
Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) for j in input().split()]
  if x2 == x1:
    if x4 == x3:
      print("YES")
    else:
      print("NO")
  elif x4 == x3:
    print("NO")
  else:
    print("YES" if (y2 - y1) / (x2 - x1) - (y4 - y3) / (x4 - x3) < 1e-5 else "NO")

Failing test case input:
2
2.926287414400688 0.6174638399148507 2.2117258079089996 2.51039017960215 2.2432914589132955 0.3458310450303873 3.950438914943076 1.6292131026754104
5.957858300757107 3.314602021400227 10.473008708157936 7.081122407685485 15.460510197185764 6.858362845609268 7.533578119892425 12.180352827357845

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
n = int(input())
for i in range(n):
  x1, y1, x2, y2, x3, y3, x4, y4 = [float(j) * 10**10 for j in input().split()]
  if x2 == x1:
    if x4 == x3:
      print("YES")
    else:
      print("NO")
  elif x4 == x3:
    print("NO")
  else:
    print("YES" if (y2 - y1) / (x2 - x1) == (y4 - y3) / (x4 - x3) else "NO")

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for i in range(int(input())):
    s = list(map(float,input().split()))
    if s[1] - s[3] == 0 or s[5] - s[7] == 0:
        if s[1] - s[3] == s[5] - s[7] == 0:
            print('YES')
        else:
            print('NO')
    elif (s[0] - s[2]) / (s[1] - s[3]) - (s[4] - s[6]) / (s[5] - s[7]) < 1e-10:
        print('YES')
    else:
        print('NO')

Failing test case input:
2
1.327899999900154 0.0 1.6749673598267916 1.0 1.0 0.0 2.0 1.1282473131354158
3.323667925201062 2.0 9.680227793087974 6.222173723926189 14.793675097927146 5.95543610948743 7.0 10.624659660972899

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
for i in range(int(input())):
    s = list(map(float,input().split()))
    if s[1] - s[3] == 0 or s[5] - s[7] == 0:
        if s[1] - s[3] == s[5] - s[7] == 0:
            print('YES')
        else:
            print('NO')
    elif abs((s[0] - s[2]) / (s[1] - s[3]) - (s[4] - s[6]) / (s[5] - s[7])) < 1e-10:
        print('YES')
    else:
        print('NO')

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    if x1 == x2 and y1 == y2 or x3 == x4 and y3 == y4:
        print('YES')
    else:
        print('YES' if abs(x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1) < 1e-10 else 'NO')

Failing test case input:
2
3.62082708467009 0.6174638399148507 3.820512094652794 2.51039017960215 2.2432914589132955 0.3458310450303873 3.950438914943076 1.7101002656514341
6.90252469233348 3.314602021400227 10.473008708157936 7.5479167544328885 15.460510197185764 6.858362845609268 8.533279840915569 13.249466279789214

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print('YES' if abs((x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1)) < 1e-10 else 'NO')
Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
N = int(input())
EPS = 1e-6
for i in range(N):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
    if x2 == x1 and x4 == x3:
        print('YES')
        continue
    elif x2 == x1 or x4 == x3:
        print('NO')
        continue
    f = abs((y2 - y1) / (x2 - x1))
    g = abs((y4 - y3) / (x4 - x3))
    if g - EPS <= f <= g + EPS:
        print('YES')
    else:
        print('NO')

Failing test case input:
2
0.0 0.0 1.0 1.0 1.0 0.0 2.0 1.0
3.0 2.0 9.0 6.0 13.0 5.0 7.0 9.0

Expected output:
YES
NO

Actual output:
YES
YES


Fixed submission (verdict: Accepted):
N = int(input())
EPS = 1e-9
for i in range(N):
    x1,y1,x2,y2,x3,y3,x4,y4 = map(float,input().split())
    if x2 == x1 and x4 == x3:
        print('YES')
        continue
    elif x2 == x1 or x4 == x3:
        print('NO')
        continue
    f = (y2 - y1) / (x2 - x1)
    g = (y4 - y3) / (x4 - x3)
    if g - EPS <= f <= g + EPS:
        print('YES')
    else:
        print('NO')

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if (a-c)*(f-h) - (b-d)*(e-g):
        print("No")
    else:
        print("Yes")

Failing test case input:
2
4.321343772389822 2.7487836348901857 3.9659646355733096 3.5855296157216676 3.995698923255761 1.690211528935138 3.950438914943076 2.414160212045579
6.90252469233348 3.95151384090038 11.32950612487289 10.201219690170177 15.460510197185764 7.567367804196334 8.656060891457475 13.38269597564536

Expected output:
NO
NO


Actual output:
No
No


Fixed submission (verdict: Accepted):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if abs((c-a)*(h-f) - (g-e)*(d-b)) < 1e-10:
        print("YES")
    else:
        print("NO")

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for _ in[0]*int(input()):
 a,b,c,d,e,f,g,h=map(float,input().split())
 print(['NO','YES'][int((a-c)*(f-h))==int((e-g)*(b-d))])


Failing test case input:
2
4.321343772389822 1.405705006654963 3.9659646355733096 3.3192116791578963 3.995698923255761 1.2324772096729046 3.950438914943076 2.414160212045579
6.90252469233348 3.754775297295594 11.164469367513322 10.152887497908853 15.460510197185764 7.404939585613234 8.656060891457475 13.38269597564536

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
for _ in[0]*int(input()):
 a,b,c,d,e,f,g,h=map(float,input().split())
 print(['NO','YES'][abs((a-c)*(f-h)-(e-g)*(b-d))<1e-10])
Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if abs((c-a)*(h-f) - (d-b)*(g-e)) < 1e-10:
        print("Yes")
    else:
        print("No")

Failing test case input:
2
2.087608134318849 0.0 2.2117258079089996 1.7785443411401411 2.2432914589132955 0.3458310450303873 3.950438914943076 1.6292131026754104
5.957858300757107 3.314602021400227 10.473008708157936 7.081122407685485 14.793675097927146 6.858362845609268 7.533578119892425 12.180352827357845

Expected output:
NO
NO


Actual output:
No
No


Fixed submission (verdict: Accepted):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if abs((c-a)*(h-f) - (g-e)*(d-b)) < 1e-10:
        print("YES")
    else:
        print("NO")

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
N = int(input())
for i in range(0, N) :
  x1,y1,x2,y2,x3,y3,x4,y4 = list(map(float, input().split()))
  s = x2 - x1
  t = y2 - y1
  u = x4 - x3
  v = y4 - y3;
  if (s * v - t * u < 1.000000001) :
    print("YES")
  else :
    print("NO")

Failing test case input:
2
1.327899999900154 0.0 1.6749673598267916 1.0 1.0 0.0 2.0 1.1282473131354158
3.323667925201062 2.2346086183139713 10.145237067644967 6.222173723926189 14.793675097927146 5.95543610948743 7.0 10.624659660972899

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
N = int(input())
for i in range(0, N) :
  x1,y1,x2,y2,x3,y3,x4,y4 = list(map(float, input().split()))
  s = x2 - x1
  t = y2 - y1
  u = x4 - x3
  v = y4 - y3;
  if (abs(s * v - t * u) < 1e-10) :
    print("YES")
  else :
    print("NO")

Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print('YES' if abs(x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1) < 1e-10 else 'NO')

Failing test case input:
2
4.321343772389822 2.7487836348901857 3.9659646355733096 3.5855296157216676 3.995698923255761 2.343036747675713 5.497623910691475 2.996569483785644
6.90252469233348 4.851700385561312 11.32950612487289 10.201219690170177 16.025690998126294 8.524959669314121 8.656060891457475 13.393839492831313

Expected output:
NO
NO


Actual output:
YES
NO


Fixed submission (verdict: Accepted):
n = int(input())
for i in range(n):
    x1, y1, x2, y2, x3, y3, x4, y4 = map(float, input().split())
    print('YES' if abs((x2 - x1)*(y4 - y3) - (x4 - x3)*(y2 - y1)) < 1e-10 else 'NO')
Problem: p00021
Buggy submission (Python3, verdict: Wrong Answer):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if (a-c)*(f-h) - (b-d)*(e-g) < 10e-10:
        print("No")
    else:
        print("Yes")

Failing test case input:
2
3.62082708467009 1.3364846399828059 3.820512094652794 3.3192116791578963 3.1588326335062655 1.2324772096729046 3.950438914943076 1.7101002656514341
6.90252469233348 3.754775297295594 11.164469367513322 8.677134993106279 15.460510197185764 6.858362845609268 8.533279840915569 13.249466279789214

Expected output:
NO
NO


Actual output:
No
Yes


Fixed submission (verdict: Accepted):
for _ in range(int(input())):
    a,b,c,d,e,f,g,h=map(float, input().split())
    
    if abs((c-a)*(h-f) - (g-e)*(d-b)) < 1e-10:
        print("YES")
    else:
        print("NO")
Problem: p03193
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)
Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)
Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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))

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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))

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)


Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
3


Fixed submission (verdict: Accepted):
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)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)



Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1
2
2


Fixed submission (verdict: Accepted):
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)
Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)
  

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
n, h, w = [int(i) for i in input().split(" ")]
n_boards = 0
for k in range(n):
    hi, wi = [int(i) for i in input().split(" ")]
    if hi >= h and wi >= w:
        n_boards += 1
print(n_boards)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
0


Fixed submission (verdict: Accepted):
n,H,W=map(int,input().split())
p=0
for i in range(n):
  a,b=map(int,input().split())
  if a>=H and b>=W:
    p+=1
print(p)

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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]]))

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


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

Problem: p03193
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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)

Failing test case input:
3 5 2
10 3
5 2
2 5

Expected output:
2

Actual output:
1


Fixed submission (verdict: Accepted):
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)