ZhenlongDai/ACPR huggingface dataset:
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
N=int(input())
D=list(map(int,input().split()))
M=int(input())
T=list(map(int,input().split()))

d=Counter(D)
for i in range(M):
    if T[i] in d:
        d[T[i]]-=1
    else:
        print('NO')
        exit()
print('YES')

Failing test case input:
15
1 4 2 3 4 3 4 7 8 6 8 2 0 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
from collections import Counter
N=int(input())
D=list(map(int,input().split()))
M=int(input())
T=list(map(int,input().split()))

d=Counter(D)
for i in range(M):
    if T[i] not in d or d[T[i]]==0:
        print('NO')
        exit()
    d[T[i]]-=1
print('YES')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
D = list(map(int,input().split()))
m = int(input())
T = list(map(int,input().split()))
set_d = set(D)

ans = 'YES'
for t in T:
  if t in set_d:
    pass
  else:
    ans = 'NO'
    
print(ans)    

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 0 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
n = int(input())
D = sorted(list(map(int,input().split())))
m = int(input())
T = sorted(list(map(int,input().split())))

ans = 'YES'
di = -1
for t in T:
  while True:
    di += 1
    if di >= n:
      ans = 'NO'
      break    
    if D[di] == t:
      break
        
print(ans)
Problem: p03578
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
class EndLoop(Exception):
    pass


def solve():
    while 1:
        try:
            N = int(input())
            D = list(map(int, input().split(" ")))
            M = int(input())
            T = list(map(int, input().split(" ")))
            if N < M:
                print("NO")
                break

            i = 0
            while 1:
                if i == M - 1:
                    break
                elif T[i] in D:
                    D.remove(T[i])
                else:
                    print("NO")
                    raise EndLoop
                i += 1
                    
            print("YES")
            break
        except:
            break


solve()

Failing test case input:
7
100 200 500 700 1200 1600 2000
6
100 200 500 700 1600 1600

Expected output:
NO

Actual output:
YES


Fixed submission (verdict: Accepted):
def solve():
    while 1:
        try:
            N = int(input())
            D = list(map(int, input().split(" ")))
            M = int(input())
            T = list(map(int, input().split(" ")))
            D_dict = {}
            T_dict = {}
            for d in D:
                if d not in D_dict:
                    D_dict[d] = 1
                else:
                    D_dict[d] += 1

            for t in T:
                if t not in T_dict:
                    T_dict[t] = 1
                else:
                    T_dict[t] += 1

            for key, val in T_dict.items():
                if key not in D_dict:
                    print("NO")
                    raise EndLoop
                else:
                    if val > D_dict[key]:
                        print("NO")
                        raise EndLoop

            print("YES")
            break
        except:
            break


solve()

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
d = input().split()
m = int(input())
t = input().split()
dic = {}

for a in range(n):
  if d[a] not in dic:
    dic[d[a]] = 1
  else:
    dic[d[a]] += 1

con = 0

for b in range(m):
  if t[b] not in dic or dic[t[b]] == 0:
    print("No")
    break
  elif t[b] in dic:
    dic[t[b]] -= 1
    con += 1

if con == m:
  print("YES")

Failing test case input:
7
010 64 531 700 341 6869 2004
2
100 200 500 365 499 435

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
n = int(input())
d = input().split()
m = int(input())
t = input().split()
dic = {}

for a in range(n):
  if d[a] not in dic:
    dic[d[a]] = 1
  else:
    dic[d[a]] += 1

con = 0

for b in range(m):
  if t[b] not in dic or dic[t[b]] == 0:
    print("NO")
    break
  elif t[b] in dic:
    dic[t[b]] -= 1
    con += 1

if con == m:
  print("YES")
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter

n = int(input())
dl = list(map(int, input().split()))
m = int(input())
tl = list(map(int, input().split()))

dc = Counter(dl)
tc = Counter(tl)

for k in tc:
    if dc[k]<tc[k]:
        print("No")
        exit()
print("YES")

Failing test case input:
7
010 104 531 700 89 6869 2004
4
000 125 1240 103 507 331

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter

n = int(input())
dl = list(map(int, input().split()))
m = int(input())
tl = list(map(int, input().split()))

dc = Counter(dl)
tc = Counter(tl)

for k in tc:
    if dc[k]<tc[k]:
        print("NO")
        exit()
print("YES")

Problem: p03578
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
d=sorted(list(map(int,input().split())))
d.append(-1)
m=int(input())
t=sorted(list(map(int,input().split())))
x=0
f=0
for i in range(m):
    while d[x]!=t[i]:
        x+=1
        if x==n:
            print("No")
            exit()
    x+=1
print("Yes")


Failing test case input:
1
18
10
100 000 100 100 100

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
n=int(input())
d=sorted(list(map(int,input().split())))
d.append(-1)
m=int(input())
t=sorted(list(map(int,input().split())))
x=0
f=0
for i in range(m):
    while d[x]!=t[i]:
        x+=1
        if x==n:
            print("NO")
            exit()
    x+=1
print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

dic = {}
for d in D:
    if d in dic.keys():
        dic[d] += 1
    else:
        dic[d] = 1

for t in T:
    if t in dic.keys():
        if dic[t] == 0:
            print('No')
            exit()
        dic[t] -= 1
    else:
        print('No')
        exit()

print('Yes')


Failing test case input:
15
1 4 2 3 3 3 1 7 8 8 8 2 0 2 7
9
7 5 1 4 1 2 0 8 3

Expected output:
NO


Actual output:
No


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

dic = {}
for d in D:
    if d in dic.keys():
        dic[d] += 1
    else:
        dic[d] = 1

for t in T:
    if t in dic.keys():
        if dic[t] == 0:
            print('NO')
            exit()
        dic[t] -= 1
    else:
        print('NO')
        exit()

print('YES')
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
D=list(map(int,input().split()))
M=int(input())
T=list(map(int,input().split()))
d,t={},{}
for key in D:
    if key in d:
        d[key]+=1
    else:
        d[key]=1
for key in T:
    if key in t:
        t[key]+=1
    else:
        t[key]=1
flag=True
for key in list(set(T)):
    if key in d and t[key]>d[key]:
        flag=False
print("YES" if flag else "NO")

Failing test case input:
15
1 4 2 3 3 3 1 7 8 8 8 2 0 2 7
9
7 5 1 4 1 2 0 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
N=int(input())
D=list(map(int,input().split()))
M=int(input())
T=list(map(int,input().split()))
d,t={},{}
for key in D:
    if key in d:
        d[key]+=1
    else:
        d[key]=1
for key in T:
    if key in t:
        t[key]+=1
    else:
        t[key]=1
flag=True
for key in list(set(T)):
    if key not in d or t[key]>d[key]:
        flag=False
print("YES" if flag else "NO")

Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
from collections import Counter

n=int(input())
nl=sorted(list(map(int,input().split())))
m=int(input())
ml=sorted(list(map(int,input().split())))

cnl=Counter(nl)
cml=Counter(ml)

ans="Yes"

for i in cml.keys():
  if i  not in cnl.keys():
    ans="No"
  else:
    if cml[i] > cnl[i]:
      ans="No"
      break
      
print(ans)

Failing test case input:
15
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
9
7 4 3 2 1 2 3 4 5

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter

n=int(input())
nl=sorted(list(map(int,input().split())))
m=int(input())
ml=sorted(list(map(int,input().split())))

cnl=Counter(nl)
cml=Counter(ml)

ans="YES"

for i in cml.keys():
  if i  not in cnl.keys():
    ans="NO"
  else:
    if cml[i] > cnl[i]:
      ans="NO"
      break
      
print(ans)

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict

N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

dic = defaultdict(int)
for d in D:
    dic[d] += 1

for t in T:
    if dic[t]:
        dic[t] -= 1
    else:
        print ('No')
        exit()

print ('Yes')


Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 2 7
9
7 4 1 4 1 2 3 8 5

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import defaultdict

N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

dic = defaultdict(int)
for d in D:
    dic[d] += 1

for t in T:
    if dic[t]:
        dic[t] -= 1
    else:
        print ('NO')
        exit()

print ('YES')
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def main():
  from collections import Counter
  n = int(input())
  D = list(map(int,input().split()))
  m = int(input())
  T = list(map(int,input().split()))
  
  d = dict(Counter(D))
  ans = "YES"
  for t in T:
    try:
      if d[t] - 1 > 0:
        d[t] -= 1
      else:
        ans = "NO"
    except:
      ans = "NO"

  print(ans)

main()

Failing test case input:
15
1 4 2 3 3 3 1 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 0 8 3

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
def main():
  from collections import Counter
  n = int(input())
  D = list(map(int,input().split()))
  m = int(input())
  T = list(map(int,input().split()))
  
  d = dict(Counter(D))
  ans = "YES"
  for t in T:
    try:
      if d[t] - 1 >= 0:
        d[t] -= 1
      else:
        ans = "NO"
    except:
      ans = "NO"

  print(ans)

main()

Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):



from collections import Counter

N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

D_count = Counter(D)
T_count = Counter(T)

for t_key, t_val in T_count.items():
    if(t_key in D_count):
        if(t_val > D_count[t_key]):
            print("NO") 
            break
    else:
        print("NO")
        break

print("YES")

Failing test case input:
15
2 0 2 3 6 4 1 5 8 11 8 2 0 3 5
9
7 5 1 4 2 2 0 8 3

Expected output:
NO


Actual output:
NO
YES


Fixed submission (verdict: Accepted):



from collections import Counter

N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

D_count = Counter(D)
T_count = Counter(T)

for t_key, t_val in T_count.items():
    if(t_key in D_count):
        if(t_val > D_count[t_key]):
            print("NO") 
            exit()
    else:
        print("NO")
        exit()

print("YES")

Problem: p03578
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
from collections import Counter
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

Dc = Counter(D)
Tc = Counter(T)

if (N < M):
    print('No')
    exit()

for i, c in Tc.items():
    if (Dc[i] < c):
        print('No')
        exit()
    else:
        continue

print('Yes')


Failing test case input:
7
010 104 531 700 341 6869 2004
2
000 125 1240 103 499 331

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

Dc = Counter(D)
Tc = Counter(T)

if (N < M):
    print('NO')
    exit()

for i, c in Tc.items():
    if (Dc[i] < c):
        print('NO')
        exit()
    else:
        continue

print('YES')
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

dicD = {}
dicT = {}

for d in D:
    if d not in dicD:
        dicD[d] = 0
    dicD[d] += 1

for t in T:
    if t not in dicT:
        dicT[t] = 0
    dicT[t] += 1

for t in dicT:
    if (t not in dicD) or (dicT[t] > dicD[t]):
        print("NO") 
else:
    print("YES")

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 0 2 7
9
7 4 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
NO
YES


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

dicD = {}
dicT = {}

for d in D:
    if d not in dicD:
        dicD[d] = 0
    dicD[d] += 1

for t in T:
    if t not in dicT:
        dicT[t] = 0
    dicT[t] += 1

for t in dicT:
    if t not in dicD:
        print("NO")
        break
    elif dicT[t] > dicD[t]:
        print("NO")
        break
else:
    print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
d = list(map(int, input().split()))
m = int(input())
t = list(map(int, input().split()))

for i in t:
  if i not in d:
    print("NO")
    exit()

print("YES")

Failing test case input:
15
1 4 2 3 3 3 4 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
n = int(input())

ht = {}

for i in input().split():
  ht[i] = ht.get(i, 0) + 1

m = int(input())

for i in input().split():
  if i not in ht or ht[i] == 0:
    print("NO")
    exit()
  else:
    ht[i] -= 1

print("YES")

Problem: p03578
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
from collections import *
n=int(input())
d=list(map(int,input().split()))
d.sort()
d=deque(d)
m=int(input())
t=list(map(int,input().split()))
t.sort()
t=deque(t)
dd=d.popleft()
tt=t.popleft()
while d and t:
    if tt==dd:
        if len(t)==0:
            print("YES")
            exit()
        if len(d)==0:
            print("NO")
            exit()
        tt=t.popleft()
        dd=d.popleft()
    elif tt!=dd:
        if len(d)==0:
            print("NO")
            exit()
        dd=d.popleft()

Failing test case input:
15
2 0 2 3 6 4 1 5 8 11 8 2 0 3 5
9
7 5 1 4 2 2 0 8 3

Expected output:
NO


Actual output:

Fixed submission (verdict: Accepted):
n=int(input())
d=list(map(int,input().split()))
d.sort()
m=int(input())
t=list(map(int,input().split()))
t.sort()
dd=d.pop()
tt=t.pop()
while d or t:
    if tt==dd:
        if t:
            tt=t.pop()
        else:
            print("YES")
            exit()
        if d:
            dd=d.pop()
        else:
            print("NO")
            exit()
        
    elif tt!=dd:
        if len(d)==0:
            print("NO")
            exit()
        dd=d.pop()
if dd==tt:
    print("YES")
else:
    print("NO")
Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
import collections
n = int(input())
d_list = list(map(int, input().split()))
m = int(input())
t_list = list(map(int, input().split()))

if m > n:
    print("No")
    exit()

d_c = collections.Counter(d_list)
t_c = collections.Counter(t_list)

for i in t_c:
    if t_c[i] <= d_c[t_c[i]]:
        continue
    else:
        print("NO")
        exit()

print("YES")

Failing test case input:
1
35
7
110 100 110 110 100

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import collections
n = int(input())
d_list = list(map(int, input().split()))
m = int(input())
t_list = list(map(int, input().split()))

if m > n:
    print("NO")
    exit()

d_c = collections.Counter(d_list)
t_c = collections.Counter(t_list)

for i in t_c:
    if t_c[i] <= d_c[i]:
        continue
    else:
        print("NO")
        exit()

print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
DS = input().split()
D = {}
for i in range(N):
    if DS[i] not in D:
        D[DS[i]] = 0
    D[DS[i]] += 1

M = int(input())
T = input().split()
flg = True
for i in range(M):
    if T[i] in D:
        D[T[i]] -= 1
        if D[T[i]] < 0:
            print('No')
            flg = False
            break
    else:
        print('No')
        flg = False
        break
if flg:
    print('Yes')


Failing test case input:
15
1 4 2 3 3 3 4 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 0 8 3

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
N = int(input())
DS = input().split()
D = {}
for i in range(N):
    if DS[i] not in D:
        D[DS[i]] = 0
    D[DS[i]] += 1

M = int(input())
T = input().split()
flg = True
for i in range(M):
    if T[i] in D:
        D[T[i]] -= 1
        if D[T[i]] < 0:
            print('NO')
            flg = False
            break
    else:
        print('NO')
        flg = False
        break
if flg:
    print('YES')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import defaultdict

N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

dic = defaultdict(int)
for d in D:
    dic[d] += 1

for t in T:
    if dic[t]:
        dic[t] -= 1
    else:
        print ('No')
        exit()

print ('Yes')

Failing test case input:
7
010 104 531 700 195 6869 2004
2
000 125 1240 103 507 331

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import defaultdict

N = int(input())
D = list(map(int, input().split()))
M = int(input())
T = list(map(int, input().split()))

dic = defaultdict(int)
for d in D:
    dic[d] += 1

for t in T:
    if dic[t]:
        dic[t] -= 1
    else:
        print ('NO')
        exit()

print ('YES')
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
n = int(input())
d = {}
for i in input().split():
    if i in d:
        d[i] += 1
    else:
        d[i] = 1

m = int(input())
for i in input().split():
    if i in d and d[i] > 0:
        d[i] -= 1
    else:
        print("No")
        sys.exit()
print("Yes")

Failing test case input:
1
35
7
010 100 010 110 101

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import sys
n = int(input())
d = {}
for i in input().split():
    if i in d:
        d[i] += 1
    else:
        d[i] = 1

m = int(input())
for i in input().split():
    if i in d and d[i] > 0:
        d[i] -= 1
    else:
        print("NO")
        sys.exit()
print("YES")

Problem: p03578
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
import collections

def main():
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))

    cD = dict(collections.Counter(D))
    cT = dict(collections.Counter(T))

    for k, v in cT.items():
        if k not in cD:
            print("No")
            exit()
        else:
            if v > cD[k]:
                print("No")
                exit()

    print("Yes")


if __name__ == "__main__":
    main()

Failing test case input:
7
010 104 531 700 341 6869 2004
2
000 125 1240 103 499 331

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
import collections

def main():
    N = int(input())
    D = list(map(int, input().split()))
    M = int(input())
    T = list(map(int, input().split()))

    cD = dict(collections.Counter(D))
    cT = dict(collections.Counter(T))

    for k, v in cT.items():
        if k not in cD:
            print("NO")
            exit()
        else:
            if v > cD[k]:
                print("NO")
                exit()

    print("YES")


if __name__ == "__main__":
    main()

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

x.sort()
y.sort()
num=0
for k in range(len(y)) :
    for i in range(num, len(x)) :
       if i == k :
           del x[i]
           num = i
           break
    if i+1 == len(x) :
        print('NO')
        exit()
print('YES')

Failing test case input:
15
1 4 2 3 3 4 1 7 8 8 8 2 0 2 7
9
7 5 1 4 1 2 0 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):

q=input()
x=[int(i) for i in input().split()]
cnt=input()
y=[int(i) for i in input().split()]

if max(x) >= max(y):
    MAX=max(x)
else:
    MAX=max(y)

dic = {}

for k in x :
    if k in dic.keys() :
        dic[k] += 1
    else :
        dic[k] = 1
    
for i in y :
    if i in dic.keys() :
        dic[i] -= 1
        if dic[i] == -1 :
            print('NO')
            exit()
    else :
        print('NO')
        exit()
print('YES')
Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
a=list(map(int,input().split()))
m=int(input())
b=list(map(int,input().split()))
b.sort()
c=0
for i in range(m):
    t=b[i]
    f=b.count(b[i])
    if f<a.count(t):
        i+=f
    else:
        c=1
        break
print("YES"if c!=1else"NO")

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 5 7
9
7 4 1 4 1 2 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
from collections import Counter
n=int(input())
a=list(map(int,input().split()))
a=Counter(a)
m=int(input())
b=list(map(int,input().split()))
b=Counter(b)
for d,e in b.items():
    if a[d]<e:
        print("NO")
        exit()
print("YES")

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
d = [int(i) for i in input().split()]
m = int(input())
t = [int(i) for i in input().split()]
x = [0]*n
import sys
for i in t:
    if not i in d:
        print('NO')
        sys.exit()
    x[d.index(i)] += 1
print('YES') if max(x) == 1 else print('NO')

Failing test case input:
15
1 2 2 3 4 3 4 7 8 6 8 3 1 5 7
9
7 4 1 4 1 2 3 8 5

Expected output:
YES


Actual output:
NO


Fixed submission (verdict: Accepted):
n = int(input())
d = [int(i) for i in input().split()]
m = int(input())
t = [int(i) for i in input().split()]
import sys
from collections import Counter
d = Counter(d)
for i in t:
    if not i in d:
        print('NO')
        sys.exit()
    d[i] -= 1
print('YES') if min(d.values()) >= 0 else print('NO')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
D = list(map(int, input().split()))
M=int(input())
T = list(map(int, input().split()))


List = {}
for i in D:
    if List.get(i,None)==None:
        List[i]=1
    else:
        List[i]+=1


for i in T:
    if List.get(i,None)==None:
        print("NO")
        exit()
    else:
        List[i]=-1
        

print("YES")

Failing test case input:
15
1 4 2 3 3 3 4 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
YES


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


List = {}
for i in D:
    if List.get(i,None)==None:
        List[i]=1
    else:
        List[i]+=1


for i in T:
    if List.get(i,None)==None:
        print("NO")
        exit()
    else:
        if(List[i]==1):
            del List[i]
        else:
            List[i]-=1
        

print("YES")
Problem: p03578
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
from collections import Counter
import sys

N = int(input())
D = list(input().split())

M = int(input())
T = list(input().split())

D_count = Counter(D)
T_count = Counter(T)

for k in T_count:
    try:
        if D_count[k] < T_count[k]:
            print('NO')
            sys.exit()
    except:
        print('NO')
        sys.exit()

print('Yes')


Failing test case input:
1
35
7
010 100 110 110 101

Expected output:
NO


Actual output:
NO
NO


Fixed submission (verdict: Accepted):
from collections import Counter
import sys

N = int(input())
D = list(input().split())

M = int(input())
T = list(input().split())

D_count = Counter(D)
T_count = Counter(T)

for k in T_count:
    if D_count[k] < T_count[k]:
        print('NO')
        sys.exit()

print('YES')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
from collections import Counter
N = int(input())
D = Counter([int(c) for c in input().split()])
M = int(input())
T = Counter([int(c) for c in input().split()])
for t in T.items():
  if D[t[0]] < t[1]:
    print('No')
    sys.exit()
print('Yes')

Failing test case input:
7
100 200 500 700 1200 1600 2000
6
100 200 500 700 1600 1600

Expected output:
NO

Actual output:
No


Fixed submission (verdict: Accepted):
import sys
from collections import Counter
N = int(input())
D = Counter([int(c) for c in input().split()])
M = int(input())
T = Counter([int(c) for c in input().split()])
for t in T.items():
  if D[t[0]] < t[1]:
    print('NO')
    sys.exit()
print('YES')

Problem: p03578
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
from collections import Counter
n = int(input())
d = [int(i) for i in input().split()]
m = int(input())
t = [int(i) for i in input().split()]
dc,tc,flag = Counter(d),Counter(t),True
for i in tc.most_common():
	if i[0] not in d:
		flag = False
		break
	elif i[1]>dc[i[0]]:
		flag = False
		break
if flag: print("Yes")
else: print("No")

Failing test case input:
1
9
2
100 100 110 111 100

Expected output:
NO


Actual output:
No


Fixed submission (verdict: Accepted):
from collections import Counter
from bisect import bisect
n = int(input())
d = [int(i) for i in input().split()]
m = int(input())
t = [int(i) for i in input().split()]
d,tc,flag = sorted(d),Counter(t),True
for i in tc.most_common():
	if bisect(d,i[0])-bisect(d,i[0]-1)<i[1]:
		flag = False
		break
if flag: print("YES")
else: print("NO")
Problem: p03578
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
d_list = list(map(int, input().split()))
m = int(input())
t_list = list(map(int, input().split()))

for i in range(m):
    if t_list[i] in d_list:
        t_list[i] = 0
    else:
        print("NO")
        exit()

print("YES")

Failing test case input:
15
1 4 2 3 3 3 4 7 8 6 8 2 0 2 7
9
7 7 1 4 1 2 3 8 3

Expected output:
NO


Actual output:
YES


Fixed submission (verdict: Accepted):
import collections
n = int(input())
d_list = list(map(int, input().split()))
m = int(input())
t_list = list(map(int, input().split()))

if m > n:
    print("NO")
    exit()

d_c = collections.Counter(d_list)
t_c = collections.Counter(t_list)

for i in t_c:
    if t_c[i] <= d_c[i]:
        continue
    else:
        print("NO")
        exit()

print("YES")
Problem: p03606
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
n=int(input())
a=-n
for i in range(n):
  a-=eval(input().replace(" ","-"))
print(a)

Failing test case input:
1
24 30

Expected output:
7

Actual output:
5


Fixed submission (verdict: Accepted):
n=int(input())
a=n
for i in range(n):
  a-=eval(input().replace(" ","-"))
print(a)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0
for i in range(N):
    l, r = map(int, input().split())
    ans += l - r + 1
print(ans)


Failing test case input:
2
72 0
2 0

Expected output:
-72


Actual output:
76


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
for i in range(N):
    l, r = map(int, input().split())
    ans += r - l + 1
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
L = []
R = []
for _ in range(n):
    l, r = map(int, input().split())
    L.append(l)
    R.append(r)

ans = 0
for i in range(n):
    ans += R[i] - L[i]

print(ans) 

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

Expected output:
24


Actual output:
22


Fixed submission (verdict: Accepted):
n = int(input())
L = []
R = []
for _ in range(n):
    l, r = map(int, input().split())
    L.append(l)
    R.append(r)

ans = 0
for i in range(n):
    ans += R[i] - L[i] + 1

print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
m=0
for i in range(N):
    r,l=(int(x) for x in input().split())
    m+=(r-l+1)

print(m)


Failing test case input:
2
-6 1
-14 -2

Expected output:
21


Actual output:
-17


Fixed submission (verdict: Accepted):
N=int(input())
m=0
for i in range(N):
    l,r=(int(x) for x in input().split())
    m+=(r-l+1)

print(m)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
a = [0]*10**5
for i in range(N):
    l,r = map(int,input().split())
    a[l-1:r+1] = [1]*(r-l+1)
print(sum(a))


Failing test case input:
2
72 0
2 -1

Expected output:
-73


Actual output:
0


Fixed submission (verdict: Accepted):
N = int(input())
a = 0
for i in range(N):
    l,r = map(int,input().split())
    a += r-l+1
print(a)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
m=0
for i in range(N):
    r,l=(int(x) for x in input().split())
    m+=(r-l)

print(m)


Failing test case input:
2
6 10
0 3

Expected output:
9


Actual output:
-7


Fixed submission (verdict: Accepted):
N=int(input())
m=0
for i in range(N):
    l,r=(int(x) for x in input().split())
    m+=(r-l+1)

print(m)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
r = 0
for _ in range(n):
    l, r = map(int, input().split())
    r += l-r+1
print(r)

Failing test case input:
2
6 12
0 3

Expected output:
11


Actual output:
1


Fixed submission (verdict: Accepted):
n = int(input())
result = 0
for _ in range(n):
    l, r = map(int, input().split())
    result += r-l+1
print(result)
Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans=0
for i in range(N):
    l,n= map(int, input().split())
    ans=n-l+1
print(ans)


Failing test case input:
2
-3 1
-14 0

Expected output:
20


Actual output:
15


Fixed submission (verdict: Accepted):
N = int(input())
ans=0
for i in range(N):
    l,n= map(int, input().split())
    ans=ans+n-l+1
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0
for i in range(N):
  A, B = map(int, input().split())
  ans = B - A +1
  
print(ans)

Failing test case input:
2
-6 1
-14 -1

Expected output:
22


Actual output:
14


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
for i in range(N):
  A, B = map(int, input().split())
  ans += B - A +1
  
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

val = 0
for num in range(0,N):
    row = input().split()
    val = val + int(row[1]) - int(row[0])

val = val - N
print(val)

Failing test case input:
2
72 0
2 0

Expected output:
-72


Actual output:
-76


Fixed submission (verdict: Accepted):
N = int(input())

val = 0
for num in range(0,N):
    row = input().split()
    val = val + int(row[1]) - int(row[0])

val = val + N
print(val)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
x = 0
for i in range(n):
  a, b = map(int, input().split())
  x += a - b +1
print(x)

Failing test case input:
2
-3 1
-14 0

Expected output:
20


Actual output:
-16


Fixed submission (verdict: Accepted):
n = int(input())
x = 0
for i in range(n):
  a, b = map(int, input().split())
  x += b-a +1
print(x)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())

ans=0

for i in range(N):
  l,r=map(int,input().split())
  ans+=l-r+1

print(ans)

Failing test case input:
1
-3 -29

Expected output:
-25


Actual output:
27


Fixed submission (verdict: Accepted):
N=int(input())

ans=0

for i in range(N):
  l,r=map(int,input().split())
  
  ans+=r-l+1

print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
T = int(input())
a, b = map(int, input().split())
A = 0
for i in range(0,T):
    A = abs(a -b)
print(A + T)



Failing test case input:
1
-1 -25

Expected output:
-23


Actual output:
25


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
for i in range(n):
    l, r = map(int, input().split())
    ans += r - l + 1
print(ans)

Problem: p03606
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
ans=0
for _ in range(int(input())):
  ans+=eval("-"+input().replace(" ","+"))-1
print(ans)

Failing test case input:
2
193 -1
1 0

Expected output:
-193


Actual output:
-197


Fixed submission (verdict: Accepted):
ans=0
for _ in range(int(input())):
  ans+=eval("-"+input().replace(" ","+"))+1
print(ans)
Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
box = []
for i in range(n):
    box = list(map(int, input().split()))

cnt = 0
for i in range(n):
    cnt += int(box[-1]) - int(box[0]) + 1

print(cnt)

Failing test case input:
2
67 0
1 0

Expected output:
-66


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
box = [list(map(int, input().split())) for i in range(n)]
cnt = 0

for i in range(n):
    cnt += box[i][-1] - box[i][0] + 1

print(cnt)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
ans = 0
for i in range(n):
    l,r = iim()
    ans += l-r+1
print(ans)

Failing test case input:
2
67 0
2 0

Expected output:
-67


Actual output:
71


Fixed submission (verdict: Accepted):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
ans = 0
for i in range(n):
    l,r = iim()
    ans += r-l+1
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
seats = [list(map(int, input().split())) for _ in range(n)]

nop = [s[-1] - s[0] + 1 for s in seats]
r = sum(nop)

print(seats)
print(nop)
print(r)


Failing test case input:
2
72 -1
0 -9

Expected output:
-80


Actual output:
[[72, -1], [0, -9]]
[-72, -8]
-80


Fixed submission (verdict: Accepted):
n = int(input())
seats = [list(map(int, input().split())) for _ in range(n)]

nop = [s[-1] - s[0] + 1 for s in seats]
r = sum(nop)

print(r)

Problem: p03606
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
res = 0
for i in range(n):
  l, r = map(int, input().split())
  res = r - l + 1
print(res)

Failing test case input:
2
3 10
0 1

Expected output:
10


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
res = 0
for i in range(n):
  l, r = map(int, input().split())
  res += r - l + 1
print(res)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
lr = [[int(i) for i in input().split()] for j in range(n)]
ans = 0
for i in range(n):
    ans += lr[i][1] - lr[i][0]
print(ans)

Failing test case input:
2
193 0
0 2

Expected output:
-189


Actual output:
-191


Fixed submission (verdict: Accepted):
n = int(input())
lr = [[int(i) for i in input().split()] for j in range(n)]
ans = 0
for i in range(n):
    ans += lr[i][1] - lr[i][0]+1
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
result = 0
for _ in range(n):
    l, r = map(int, input().split())
    result += l-r+1
print(result)

Failing test case input:
1
2 -14

Expected output:
-15


Actual output:
17


Fixed submission (verdict: Accepted):
n = int(input())
result = 0
for _ in range(n):
    l, r = map(int, input().split())
    result += r-l+1
print(result)
Problem: p03606
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
n = int(input())
p = 0
for i in range(n):
  l, r = map(int, input().split())
  p += r-l+1
 
print(n)


Failing test case input:
2
72 -1
0 -9

Expected output:
-80


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
p = 0
for i in range(n):
  l, r = map(int, input().split())
  p += r-l+1
 
print(p)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n =int(input())
ans =0
for i in range(n):
    a, b =map(int, input().split())
    ans +=b-a
    
print(ans)

Failing test case input:
1
-4 -58

Expected output:
-53


Actual output:
-54


Fixed submission (verdict: Accepted):
n =int(input())
ans =0
for i in range(n):
    a, b =map(int, input().split())
    ans +=b-a+1
    
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
list_score = [ list(map(int,input().split(" "))) for i in range(n)]
ans = 0
for i,j in list_score:
    ans = j-i+1
print(ans)

Failing test case input:
2
3 3
0 1

Expected output:
3


Actual output:
2


Fixed submission (verdict: Accepted):
n = int(input())
list_score = [ list(map(int,input().split(" "))) for i in range(n)]
ans = 0
for i,j in list_score:
    ans += j-i+1
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
sum = 0
for i in range(n):
    l, r = map(int, input().split())
    sum = r-l+1
print(sum)


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

Expected output:
24


Actual output:
18


Fixed submission (verdict: Accepted):
n = int(input())
sum = 0
for i in range(n):
    l, r = map(int, input().split())
    sum += r-l+1
print(sum)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
s = 0
for i in range(N):
  l, r = map(int, input().split())
  s = s + 1 + (l-r)
print(s)

Failing test case input:
2
47 0
2 0

Expected output:
-47


Actual output:
51


Fixed submission (verdict: Accepted):
N = int(input())
s = 0
for i in range(N):
  l, r = map(int, input().split())
  s = s + 1 + (r-l)
print(s)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())

answer = 0
for i in range(n):
  a, b = map(int, input().split())
  if a == b:
    answer += 1
  else:
    answer += b - a
  
print(answer)

Failing test case input:
2
276 -1
0 7

Expected output:
-268


Actual output:
-270


Fixed submission (verdict: Accepted):
n = int(input())

answer = 0
for i in range(n):
  a, b = map(int, input().split())
  answer += (b + 1) - a
  
print(answer)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans = 0
for _ in range(N):
    l, r = map(int,input().split())
    ans = r - l + 1
print(ans)

Failing test case input:
2
331 -1
0 3

Expected output:
-327


Actual output:
4


Fixed submission (verdict: Accepted):
N = int(input())
ans = 0
for _ in range(N):
    l, r = map(int,input().split())
    ans += r - l + 1
print(ans)
Problem: p03606
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
N=int(input())
ans=0
for _ in range(N):
  l,r=map(int,input().split())
  ans+=(r-l+1)

Failing test case input:
2
-10 4
-4 -4

Expected output:
16


Actual output:

Fixed submission (verdict: Accepted):
N=int(input())
ans=0
for _ in range(N):
  l,r=map(int,input().split())
  ans+=(r-l+1)
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

value = int(input())
seat_list = []
people = 0
while True:
	try:
		seat = input()
		seat_list.append(seat.split(" "))
	except EOFError:
		break

def aaa(seat_list, people):
		people = seat_list[len(seat_list)-1] - seat_list[0]

print(people)


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

Expected output:
24


Actual output:
0


Fixed submission (verdict: Accepted):
value = int(input())
people = 0
while True:
	try:
		seat = input()
		if seat:
			string_seat = seat.split()
			seat_list = []
			seat_list = [int(x) for x in (string_seat)]
			people += seat_list[len(seat_list)-1] - seat_list[0]+1
	except EOFError:
		break









print(people)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())

count = 0

for i in range(N):
    l, r = map(int, input().split())
    count = count + (r-l)

print(count)


Failing test case input:
1
3 34

Expected output:
32


Actual output:
31


Fixed submission (verdict: Accepted):
N = int(input())

count = 0

for i in range(N):
    l, r = map(int, input().split())
    count = count + (r-l) + 1

print(count)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
total = 0
for i in range(N):
  l, r = map(int, input().split())
  total += l - r + 1
print(total)

Failing test case input:
1
-3 -29

Expected output:
-25


Actual output:
27


Fixed submission (verdict: Accepted):
N = int(input())
total = 0
for i in range(N):
  l, r = map(int, input().split())
  total += r - l + 1
print(total)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n=int(input())
s=0
for i in range(n):
    l=list(map(int,input().split()))
    s+=len(l)
print(s)

Failing test case input:
2
40 0
0 2

Expected output:
-36


Actual output:
4


Fixed submission (verdict: Accepted):
n=int(input())
s=0
for i in range(n):
    l,r=map(int,input().split())
    s+=r-l+1
print(s)
Problem: p03606
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def read_input():
    n = int(input())

    sheets = []
    for i in range(n):
        l, r = map(int, input().split())
        sheets.append((l, r))

    return n, sheets

def submit():
    n, sheets = read_input()

    watcher = 0
    for sheet in sheets:
        watcher += sheet[1] - sheet[0] + 1

    print(watcher)


if __name__ == '__main__':
    submit

Failing test case input:
2
72 0
2 -1

Expected output:
-73


Actual output:

Fixed submission (verdict: Accepted):
def read_input():
    n = int(input())

    sheets = []
    for i in range(n):
        l, r = map(int, input().split())
        sheets.append((l, r))

    return n, sheets

def submit():
    n, sheets = read_input()

    watcher = 0
    for sheet in sheets:
        watcher += sheet[1] - sheet[0] + 1

    print(watcher)


if __name__ == '__main__':
    submit()

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
ans=0
for i in range(N):
    l,n= map(int, input().split())
    ans=l-n+1
print(ans)

Failing test case input:
2
276 -1
0 7

Expected output:
-268


Actual output:
-6


Fixed submission (verdict: Accepted):
N = int(input())
ans=0
for i in range(N):
    l,n= map(int, input().split())
    ans=ans+n-l+1
print(ans)

Problem: p03606
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
n=int(input())
ans=100000
for i in range(n):
  l,r=map(int,input().split())
  ans-=r-l+1
print(ans)

Failing test case input:
2
-2 0
-2 0

Expected output:
6


Actual output:
99994


Fixed submission (verdict: Accepted):
n=int(input())
ans=0
for i in range(n):
  l,r=map(int,input().split())
  ans+=r-l+1
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
seat = 100000
for _ in range(N):
    l,r = map(int,input().split())
    seat -= r - l + 1
print(seat)

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

Expected output:
15


Actual output:
99985


Fixed submission (verdict: Accepted):
N = int(input())
seat = 0
for _ in range(N):
    l,r = map(int,input().split())
    seat += r - l + 1
print(seat)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int()
seats = [list(map(int,input().split())) for _ in range(n)]

nop = [s[-1] - s[0] + 1 for s in seats]
r = sum(nop)
print(r)

Failing test case input:
2
27 -4
-7 0

Expected output:
-22


Actual output:
0


Fixed submission (verdict: Accepted):
n = int(input())
seats = [list(map(int, input().split())) for _ in range(n)]

nop = [s[-1] - s[0] + 1 for s in seats]
r = sum(nop)

print(r)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
s = 0
for i in range(n):
  l, r = map(int, input().split())
  s += r-l
print(s)

Failing test case input:
2
-6 1
-14 -2

Expected output:
21


Actual output:
19


Fixed submission (verdict: Accepted):
n = int(input())
s = 0
for i in range(n):
  l, r = map(int, input().split())
  s += r-l+1
print(s)
Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
n = int(input())
ans = 0
for i in range(n):
  a,b = map(int,input().split())
  ans += b-a-1
  
print(ans)  

Failing test case input:
2
78 -2
0 4

Expected output:
-74


Actual output:
-78


Fixed submission (verdict: Accepted):
n = int(input())
ans = 0
for i in range(n):
  a,b = map(int,input().split())
  ans += b-a+1
  
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int( input() )
S = [ list( map( int, input().split() ) ) ]

ans = 0
for i in S:
    ans += i[1] - i[0] + 1

print( ans )

Failing test case input:
2
-6 1
-14 -2

Expected output:
21


Actual output:
8


Fixed submission (verdict: Accepted):
N = int( input() )
S = [ list(map( int, input().split() )) for _ in range(N) ]

ans = 0
for i in S:
    ans += i[1] - i[0] + 1

print( ans )

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
l=0
for i in range(N):
    r,l=(int(x) for x in input().split())
    l+=(r-l)

print(l)


Failing test case input:
2
-2 0
-2 0

Expected output:
6


Actual output:
-2


Fixed submission (verdict: Accepted):
N=int(input())
m=0
for i in range(N):
    l,r=(int(x) for x in input().split())
    m+=(r-l+1)

print(m)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N = int(input())
l = []
r = []
for i in range(N):
    temp_l, temp_r = input().split()
    l.append(int(temp_l))
    r.append(int(temp_r))
ans = 0
for i in range(N):
    ans += l[i] - r[i] + 1
print(ans)

Failing test case input:
1
-1 -25

Expected output:
-23


Actual output:
25


Fixed submission (verdict: Accepted):
N = int(input())
l = []
r = []
for i in range(N):
    temp_l, temp_r = input().split()
    l.append(int(temp_l))
    r.append(int(temp_r))
ans = 0
for i in range(N):
    ans += r[i] - l[i] + 1
print(ans)

Problem: p03606
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N=int(input())
ans=0
for i in range(N):
    l,r=map(int,input().split())
    ans+=l-r+1
print(ans)


Failing test case input:
2
78 -2
0 4

Expected output:
-74


Actual output:
78


Fixed submission (verdict: Accepted):
N=int(input())
ans=0
for i in range(N):
    l,r=map(int,input().split())
    ans=ans+r-l+1
print(ans)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
X=0
for i in range(N):
  l,n=map(int,input().split())
  X+=l-n+1
print(X)

Failing test case input:
1
-2 -12

Expected output:
-9


Actual output:
11


Fixed submission (verdict: Accepted):
N=int(input())
X=0
for i in range(N):
  l,n=map(int,input().split())
  X+=n-l+1
print(X)

Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N= int(input())
n=[[]]
ans=0
ans1=0
ans2=0

for i in range(N):

    n.append(input().split())

for j in range(1,N+1):
    
    ans+=int(n[j][1])-int(n[j][0])

print(ans)



Failing test case input:
1
-2 -33

Expected output:
-30


Actual output:
-31


Fixed submission (verdict: Accepted):
N= int(input())
n=[[]]
ans=0

for i in range(N):
    n.append(input().split())

for j in range(1,N+1):
    
    ans+=int(n[j][1])-int(n[j][0])
    ans+=1

print(ans)
Problem: p03606
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
N=int(input())
l=0
for i in range(N):
    r,l=(int(x) for x in input().split())
    l+=(r-l)

print(100000-l)


Failing test case input:
2
193 -1
1 0

Expected output:
-193


Actual output:
99999


Fixed submission (verdict: Accepted):
N=int(input())
m=0
for i in range(N):
    l,r=(int(x) for x in input().split())
    m+=(r-l+1)

print(m)

Problem: p03606
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
N=int(input())
ans=0
for i in range(N):
    l,r=map(int, input().split())
    ans+=l-r+1
print(ans)

Failing test case input:
2
3 3
0 1

Expected output:
3


Actual output:
1


Fixed submission (verdict: Accepted):
N=int(input())
ans=0
for i in range(N):
    l,r=map(int, input().split())
    ans+=r-l+1
print(ans)