Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a,b = map(int, raw_input().split())
print a/b a%b "%.6f" % (a/float(b))

Fixed submission:
a, b = map(int, raw_input().split())
print "%d %d %f" % ((a/b), (a%b), (float(a)/b))

Buggy python submission (verdict: Runtime Error):
a,b = map(int, raw_input().split())
print "%d/%d %d%%d %.5f" % (a,b, a,b, a/float(b))

Fixed submission:
a, b = map(int, raw_input().split())
print "%d %d %f" % ((a/b), (a%b), (float(a)/b))
Buggy python submission (verdict: Runtime Error):
while True:
    ax,op,bx = raw_input().split()
    ax = int(a)
    bx = int(b)
    if op == '?':
        break
    elif op == '+':
        print(ax + bx)
    elif op == '-':
        print(ax - bx)
    elif op == '*':
        print(ax * bx)
    elif op == '/':
        print(ax / bx)

Fixed submission:
while True:
 a,op,b=raw_input().split()
 if op == "?":break
 if op == "+":print int(a) + int(b)
 if op == "-":print int(a) - int(b)
 if op == "*":print int(a) * int(b)
 if op == "/":print int(a) / int(b)
Buggy python submission (verdict: Runtime Error):
while True:
  H,W=map(int,raw_input().split())
  if H==W==0:
      print (('#'*W +'\n')*H)

Fixed submission:
while True:
  H,W=map(int,raw_input().split())
  if H==W==0:
    break
  elif H!=0 or W!=0:
    print (('#'*W +'\n')*H)
Buggy python submission (verdict: Runtime Error):
while True:
  H,W=map(int,raw_input().split())
  if H==W==0:
    break
  elif H!=0 or W!=0:
    print (('#'*W + '\n')+('#' + '.'*(W-2) + '#' + '\n')*(H-2) + ('#'*W + '\n')

Fixed submission:
while True:
  H,W=map(int,raw_input().split())
  if H==W==0:
    break
  elif H!=0 or W!=0:
    print (('#'*W +'\n')+('#' + '.'*(W-2) + '#' + '\n')*(H-2) + ('#'*W + '\n'))
Buggy python submission (verdict: Runtime Error):
while 1:
  H,W=map(int,raw_input().split())
  if H==W==0:
    break
  elif H!=0 or W!=0:
    for i in range(0,H):
      if i%2 == 0:
         if W%2 == 1:
            print '#.'*(W/2)+'#'
          elif W%2 == 0:
            print '#.'*(W/2)
         else:
           if W%2 == 1:
             print '.#'*(W/2)+'.'
           elif W%2 == 0:
             print '.#'*(W/2)
    print ''

Fixed submission:
while True:
   H,W=map(int,raw_input().split())
   if H==W==0:
       break
   elif H!=0 or W!=0:
     for i in range(0,H):
       if i%2 == 0:
         if W%2 == 1:
           print '#.'*(W/2)+'#'
         elif W%2 == 0:
           print '#.'*(W/2)
       else:
         if W%2 == 1:
           print '.#'*(W/2)+'.'
         elif W%2 == 0:
           print '.#'*(W/2)
     print ''
Buggy python submission (verdict: Runtime Error):
n = input()
S = ['S 1','S 2','S 3','S 4','S 5','S 6','S 7','S 8','S 9','S 10','S 11','S 12','S 13']
H = ['H 1','H 2','H 3','H 4','H 5','H 6','H 7','H 8','H 9','H 10','H 11','H 12','H 13'] 
C = ['C 1','C 2','C 3','C 4','C 5','C 6','C 7','C 8','C 9','C 10','C 11','C 12','C 13']
D = ['D 1','D 2','D 3','D 4','D 5','D 6','D 7','D 8','D 9','D 10','D 11','D 12','D 13']
cards [S,H,C,D]

for i in range(n):
  x = raw_input()
  if 'S' in x:
    cards[0].remove(x)
  if 'H' in x:
    cards[1].remove(x)
  if 'C' in x:
    cards[2].remove(x)
  if 'D' in x:
    cards[3].remove(x)

for j in range(4):
  for i in cards[j]:
    print i

Fixed submission:
n = input()
S = ['S 1','S 2','S 3','S 4','S 5','S 6','S 7','S 8','S 9','S 10','S 11','S 12','S 13']
H = ['H 1','H 2','H 3','H 4','H 5','H 6','H 7','H 8','H 9','H 10','H 11','H 12','H 13'] 
C = ['C 1','C 2','C 3','C 4','C 5','C 6','C 7','C 8','C 9','C 10','C 11','C 12','C 13']
D = ['D 1','D 2','D 3','D 4','D 5','D 6','D 7','D 8','D 9','D 10','D 11','D 12','D 13']
cards=[S,H,C,D]

for i in range(n):
  exist = raw_input()
  if 'S' in exist:
    cards[0].remove(exist)
  if 'H' in exist:
    cards[1].remove(exist)
  if 'C' in exist:
    cards[2].remove(exist)
  if 'D' in exist:
    cards[3].remove(exist)

for j in range(4):
  for i in cards[j]:
    print i
Buggy python submission (verdict: Runtime Error):
n,m = map(int,raw_input().split())
 
for i in range(n):
  a = []
  a.append(map(int, raw_input().split()))
for i in range(m):
  b = []
  b.append(input())
for i in range(n):
  ans = 0
  for j in range(m):
    ans += a[i][j]*b[j]
  print ans

Fixed submission:
n,m = map(int,raw_input().split())
a = []
b = []

for i in range(n):
  a.append(map(int, raw_input().split()))
for i in range(m):
  b.append(input())
for i in range(n):
  ans = 0
  for j in range(m):
    ans += a[i][j]*b[j]
  print ans

Buggy python submission (verdict: Runtime Error):
n,m = map(int,raw_input().split())
 
for i in range(n):
  a = []
  a.append(map(int, raw_input().split()))
for i in range(m):
  b = []
  b.append(input())
for i in range(n):
  ans = 0
  for j in range(m):
    ans += a[i][j]*b[j]
  print ans

Fixed submission:
n,m = map(int,raw_input().split())
a = []
b = []

for i in range(n):
  a.append(map(int, raw_input().split()))
for i in range(m):
  b.append(input())
for i in range(n):
  ans = 0
  for j in range(m):
    ans += a[i][j]*b[j]
  print ans

Buggy python submission (verdict: Runtime Error):
n,m = map(int,raw_input().split())
  a = []
  b = []
for i in range(n):
  a.append(map(int, raw_input().split()))
for i in range(m):
  b.append(input())
for i in range(n):
  ans = 0
  for j in range(m):
    ans += a[i][j]*b[j]
  print ans

Fixed submission:
n,m = map(int,raw_input().split())
a = []
b = []

for i in range(n):
  a.append(map(int, raw_input().split()))
for i in range(m):
  b.append(input())
for i in range(n):
  ans = 0
  for j in range(m):
    ans += a[i][j]*b[j]
  print ans

Buggy python submission (verdict: Runtime Error):
n,m = map(int,raw_input().split())
for i in range(n):
  a = []
  a.append(map(int, raw_input().split()))
for i in range(m):
  b = []
  b.append(input())
for i in range(n):
  ans = 0
  for j in range(m):
    ans += a[i][j]*b[j]
print ans

Fixed submission:
n,m = map(int,raw_input().split())
a = []
b = []

for i in range(n):
  a.append(map(int, raw_input().split()))
for i in range(m):
  b.append(input())
for i in range(n):
  ans = 0
  for j in range(m):
    ans += a[i][j]*b[j]
  print ans
Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <vector>

int main() {
    vector<vector<int>> vec(100, vector<int>(100, 0));
    cin >> vec.at(100).at(99);
    cout << vec.at(100).at(100) << endl;
}


Fixed submission:
y = int(input())
print(y*y*y)

Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <vector>
using namespace std;

int main() {
    vector<vector<int>> vec(100, vector<int>(100, 0));
    cin >> vec.at(100).at(99);
    cout << vec.at(100).at(100) << endl;
}


Fixed submission:
y = int(input())
print(y*y*y)

Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <vector>
using namespace std;

int main() {
    vector<vector<int>> vec(100, vector<int>(100, 0));
    cin >> vec.at(99).at(99);
    cout << vec.at(100).at(100) << endl;
}


Fixed submission:
y = int(input())
print(y*y*y)

Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    vector<vector<int>> vec(100, vector<int>(100, 0));
    cin >> vec.at(99).at(99);
    long long num = vec.at(99).at(99);
    cout << pow(num, 3) << endl;
}


Fixed submission:
y = int(input())
print(y*y*y)

Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    vector<vector<int>> vec(100, vector<int>(100, 0));
    cin >> vec.at(99).at(99);
    num = vec.at(99).at(99);
    cout << num * num * num << endl;
}


Fixed submission:
y = int(input())
print(y*y*y)

Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    vector<vector<int>> vec(100, vector<int>(100, 0));
    cin >> vec.at(99).at(99);
    int num = vec.at(99).at(99);
    cout << (int) pow(num, 3) << endl;
}


Fixed submission:
y = int(input())
print(y*y*y)
Buggy python submission (verdict: Runtime Error):
a, b = map(float, input().split())
if a > b:
    print(str(a) + ' > ' + str(b))
elif a < b:
    print(str(a) + ' < ' + str(b))
elif a == b:
    print(str(a) + ' == ' + str(b))


Fixed submission:
a, b = map(int, input().split())
if a > b:
    print('a > b')
elif a < b:
    print('a < b')
elif a == b:
    print('a == b')
Buggy python submission (verdict: Time Limit Exceeded):
def solve(pos, tot, A):
    if tot == 0: return True
    if pos > len(A) - 1: return False

    return solve(pos+1, tot - A[pos], A) or \
           solve(pos+1, tot, A)

n = raw_input()
b = map(int, raw_input().split())
n = raw_input()
t = map(int, raw_input().split())

for tt in t:
    print 'yes' if True == solve(0, tt, b) else 'no'

Fixed submission:
def solve(pos, tot, A):
    if tot == 0: return True
    if pos > len(A) - 1: return False

    return solve(pos+1, tot - A[pos], A) or \
           solve(pos+1, tot, A)

n = raw_input()
b = map(int, raw_input().split())
n = raw_input()
t = map(int, raw_input().split())

max = sum(b) + 1
for tt in t:
    print 'yes' if tt < max and True == solve(0, tt, b) else 'no'
Buggy python submission (verdict: Runtime Error):
def main():

    n = int(input())
    adj = [[0 for i in range(n)] for j in range(n)]

    for i in range(n):
	tmp = list(map(int, input().split()))
	u = tmp[0]
	u = u -1
	k = tmp[1]
	v = tmp[2:]
	for j in range(k):
            adj[u][v[j]-1] = 1

    for i in range(n):
	print(" ".join(list(map(str, adj[i]))))

    for i in adj:
	print(*i)


if __name__ == "__main__":
    main()

Fixed submission:
def main():

    n = int(input())
    adj = [[0 for i in range(n)] for j in range(n)]

    for i in range(n):
        tmp = list(map(int, input().split()))
        u = tmp[0]
        u = u -1
        k = tmp[1]
        v = tmp[2:]
        for j in range(k):
            adj[u][v[j]-1] = 1

    for i in adj:
        print(*i)


if __name__ == "__main__":
    main()

Buggy python submission (verdict: Runtime Error):
def main():

    n = int(input())
    adj = [[0 for i in range(n)] for j in range(n)]

    for i in range(n):
	tmp = list(map(int, input().split()))
	u = tmp[0]
	u = u -1
	k = tmp[1]
	v = tmp[2:]
	for j in range(k):
            adj[u][v[j]-1] = 1

    for i in range(n):
	print(" ".join(list(map(str, adj[i]))))

    for i in adj:
	print(*i)


if __name__ == "__main__":
    main()

Fixed submission:
def main():

    n = int(input())
    adj = [[0 for i in range(n)] for j in range(n)]

    for i in range(n):
        tmp = list(map(int, input().split()))
        u = tmp[0]
        u = u -1
        k = tmp[1]
        v = tmp[2:]
        for j in range(k):
            adj[u][v[j]-1] = 1

    for i in adj:
        print(*i)


if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
import sys

a, b = list(map(int, sys.stdin.readline(),split()))

print(a*b, 2*a+2*b)

Fixed submission:
import sys

a, b = list(map(int, sys.stdin.readline().split()))

print(a*b, 2*a+2*b)
Buggy python submission (verdict: Runtime Error):
x = raw_input()
print x ** 3

Fixed submission:
x = int(raw_input())                                                            
print x**3
Buggy python submission (verdict: Runtime Error):
if __name__ == '__main__'
    N = input()
    N = int(N)
    array = list(map(int,  input().split()))
    cnt = 0
    for i in range(N):
    # print(' '.join(map(str, array)))
        for j in range(N-1, i, -1):
            if array[j] < array[j-1]:
                array[j], array[j-1] = array[j-1], array[j]
                cnt += 1
    print(' '.join(map(str, array)))
    print("%d" % (cnt))


Fixed submission:
def bubble_sort(A):
    global N
    flag = True
    i = 0 
    cnt = 0
    while flag:
        flag = False
        for j in range(N-1, i, -1):
            if A[j] < A[j-1]:
                A[j],A[j-1] = A[j-1],A[j]
                cnt += 1
                flag = True
        i += 1
    return cnt

N = int(input())
A = list(map(int, input().split()))
cnt = bubble_sort(A)
print(' '.join(list(map(str, A))))
print(cnt)
Buggy python submission (verdict: Runtime Error):

def check(lis):
    if lis[0] > lis[1]:
        return lis[::-1]
    else:
        return lis


while True:
    l = list(map(int, input().spilt()))
    if sum(l) == 0:
        break
    print(*check(l))



Fixed submission:

def check(lis):
    if lis[0] > lis[1]:
        return lis[::-1]
    else:
        return lis


while True:
    l = list(map(int, input().split()))
    if sum(l) == 0:
        break
    print(*check(l))
Buggy python submission (verdict: Runtime Error):
while True:
    h, w = map(int, input().split())
    if w+h == 0:
        break
    line = ""
    for idx, y in enumerate(h):
        if idx == 0 or idx == h-1:
            line = "#"*w
        else:
            line = "#"+"."*(w-2)+"#"
        print(line)
    print()



Fixed submission:
while True:
    h, w = map(int, input().split())
    if w+h == 0:
        break
    line = ""
    for y in range(h):
        if y == 0 or y == h-1:
            line = "#"*w
        else:
            line = "#"+"."*(w-2)+"#"
        print(line)
    print()
Buggy python submission (verdict: Runtime Error):
from string import ascii_lowercase
table = dict(zip(ascii_lowercase, [0 for _ in range(len(ascii_lowercase))]))
for s in input().split():
    for c in s:
        table[c.lower()] += 1
for k, v in table.items():
    print("{} : {}".format(k, v))



Fixed submission:
from string import ascii_lowercase
import sys
table = dict(zip(ascii_lowercase, [0 for _ in range(len(ascii_lowercase))]))

for s in sys.stdin:
    for c in s:
        if c.lower() in table:
            table[c.lower()] += 1
for k, v in table.items():
    print("{} : {}".format(k, v))

Buggy python submission (verdict: Runtime Error):
from string import ascii_lowercase
table = dict(zip(ascii_lowercase, [0 for _ in range(len(ascii_lowercase))]))
for s in input().split():
    for c in s:
        table[c.lower()] += 1
for k, v in table.items():
    print("{} : {}".format(k, v))



Fixed submission:
from string import ascii_lowercase
import sys
table = dict(zip(ascii_lowercase, [0 for _ in range(len(ascii_lowercase))]))

for s in sys.stdin:
    for c in s:
        if c.lower() in table:
            table[c.lower()] += 1
for k, v in table.items():
    print("{} : {}".format(k, v))
Buggy python submission (verdict: Runtime Error):
import sys
 
def dfs(i, t, l, a, b):
   t += 1
   a[i] = t
   for j in l[i]:
      if not a[j-1]:
         t = dfs(j-1, t, l, a, b)
   t += 1
   b[i] = t
   return t
 
 
n = input()
l=[]
for i in range(n):
   x = int(s) for s in sys.stdin.readline().split()[2:]
   l.append(x)
a = [0] * n
b = [0] * n
t = 0
for i in xrange(n):
   if not a[i]:
      tm = dfs(i, t, l, a, b)
 
for i in xrange(n):
   print i+1, a[i], b[i] 

Fixed submission:
import sys
  
def dfs(i, t, l, a, b):
   t += 1
   a[i] = t
   for j in l[i]:
      if not a[j-1]:
         t = dfs(j-1, t, l, a, b)
   t += 1
   b[i] = t
   return t
  
  
n = input()
l=[]
for i in range(n):
   l.append([int(s) for s in sys.stdin.readline().split()[2:]])
a = [0] * n
b = [0] * n
t = 0
for i in xrange(n):
   if not a[i]:
      t = dfs(i, t, l, a, b)
  
for i in xrange(n):
   print i+1, a[i], b[i]
Buggy python submission (verdict: Runtime Error):
n = raw_input()
x = 0
y = 0
a = raw_input()
for 1 in n-1:
   c = raw_imput()
   if a < c:
      a = c
   else:
      y = a - c
   if y > x:
      x = y
print x

Fixed submission:
n = int( raw_input() )

min = 10 ** 10
ans = -10 ** 10


for i in xrange(n):
  x = int( raw_input() )
  if x - min > ans:
    ans = x - min
  if x < min:
    min = x

print ans
Buggy python submission (verdict: Runtime Error):
n = import()

print n*n*n

Fixed submission:
x = raw_input()
x = int(x)
x = x ** 3
print x

Buggy python submission (verdict: Runtime Error):
n = import()
a = n * n * n
print a

Fixed submission:
x = raw_input()
x = int(x)
x = x ** 3
print x

Buggy python submission (verdict: Runtime Error):
import n
a = n*n*n
print a

Fixed submission:
x = raw_input()
x = int(x)
x = x ** 3
print x

Buggy python submission (verdict: Runtime Error):
import (n)
a = n*n*n
print a

Fixed submission:
x = raw_input()
x = int(x)
x = x ** 3
print x

Buggy python submission (verdict: Runtime Error):
x = row_imput()
x = int(x)
print x ** 3

Fixed submission:
x = raw_input()
x = int(x)
x = x ** 3
print x

Buggy python submission (verdict: Runtime Error):
x = row_imput()
x = int(x)
print x ** 3

Fixed submission:
x = raw_input()
x = int(x)
x = x ** 3
print x

Buggy python submission (verdict: Runtime Error):
x = raw_imput()
x = int(x)
print x ** 3

Fixed submission:
x = raw_input()
x = int(x)
x = x ** 3
print x
Buggy python submission (verdict: Runtime Error):
l = map( int , raw_input().split())

print l[0] * l[1] ' ' l[0] * 2 + l[1] * 2

Fixed submission:
l = map( int , raw_input().split())

s = l[0] * l[1]
r = ( l[0] + l[1] ) * 2

print s , r

Buggy python submission (verdict: Runtime Error):
l = map( int , raw_input().split())

s = l[0] * l[1]
r = l[0] * 2 + l[1] * 2

print s '' r

Fixed submission:
l = map( int , raw_input().split())

s = l[0] * l[1]
r = ( l[0] + l[1] ) * 2

print s , r

Buggy python submission (verdict: Runtime Error):
l = map( int , raw_input().split())

s = l[0] * l[1]
r = l[0] * 2 + l[1] * 2

print s r

Fixed submission:
l = map( int , raw_input().split())

s = l[0] * l[1]
r = ( l[0] + l[1] ) * 2

print s , r

Buggy python submission (verdict: Runtime Error):
l = map( int , raw_input().split())

s = l[0] * l[1]
r = ( l[0] + l[1] ) * 2

print s+' '+r

Fixed submission:
l = map( int , raw_input().split())

s = l[0] * l[1]
r = ( l[0] + l[1] ) * 2

print s , r

Buggy python submission (verdict: Runtime Error):
l = map( int , raw_input().split())

s = l[0] * l[1]
r = l[0] + l[0] + l[1] + l[1]

print s + ' ' + r

Fixed submission:
l = map( int , raw_input().split())

s = l[0] * l[1]
r = ( l[0] + l[1] ) * 2

print s , r
Buggy python submission (verdict: Runtime Error):
sa = raw_input()
sa = int(sa)

s = sa % 60
ma = sa / 60
m = ma % 60
h = ma / 60

print (%d:%d:%d) % (h,m,s)

Fixed submission:
sa = raw_input()
sa = int(sa)

s = sa % 60
ma = sa / 60
m = ma % 60
h = ma / 60

print ('%d:%d:%d') % (h,m,s)
Buggy python submission (verdict: Runtime Error):
l = map( int, raw_input().split() )

if l[0] < l[1]:
   print 'a < b'
else if l[0] > l[1]:
   print 'a < b'
else:
   print 'a == b'

Fixed submission:
l = map( int, raw_input().split() )

if l[0] < l[1]:
    print 'a < b'
elif l[0] > l[1]:
    print 'a > b'
else:
    print 'a == b'
Buggy python submission (verdict: Runtime Error):
r = int(raw_input())
pi = 3.14159265358

s = r * r * pi
l = 2 * r * pi

print s,r

Fixed submission:
import math
r = float(raw_input())

s = r * r * math.pi
l = 2 * r * math.pi

print '%f %f' %(s,l)

Buggy python submission (verdict: Runtime Error):
r = int(raw_input())
pi = 3.14159265358

s = r * r * pi
l = 2 * r * pi

print s,l

Fixed submission:
import math
r = float(raw_input())

s = r * r * math.pi
l = 2 * r * math.pi

print '%f %f' %(s,l)

Buggy python submission (verdict: Runtime Error):
r = int(raw_input())
pi = 3.14159265358

s = r * r * pi
l = 2 * r * pi

print s,l

Fixed submission:
import math
r = float(raw_input())

s = r * r * math.pi
l = 2 * r * math.pi

print '%f %f' %(s,l)
Buggy python submission (verdict: Runtime Error):
s[1] = "a"
while s[1] != "?":
    s = raw_input().split()
    if s[1] == "?":
        break
    a = int(s[0])
    b = int(s[2])
    if s[1] == "+":
        print a + b
    if s[1] =="-":
        print a - b
    if s[1] == "*":
        print a * b
    if s[1] == "/":
        print a / b

Fixed submission:
while True:
    s = raw_input().split()
    a = int(s[0])
    b = int(s[2])
    if s[1] == "?":
        break
    elif s[1] == '+':
        print a + b
    elif s[1] == '-':
        print a - b
    elif s[1] == '*':
        print a * b
    elif s[1] == '/':
        print a / b

Buggy python submission (verdict: Runtime Error):
s[1] = "a"
while s[1] != "?":
    s = raw_input().split()
    if s[1] == "?":
        break
    a = int(s[0])
    b = int(s[2])
    if s[1] == "+":
        print a + b
    if s[1] =="-":
        print a - b
    if s[1] == "*":
        print a * b
    if s[1] == "/":
        print a / b

Fixed submission:
while True:
    s = raw_input().split()
    a = int(s[0])
    b = int(s[2])
    if s[1] == "?":
        break
    elif s[1] == '+':
        print a + b
    elif s[1] == '-':
        print a - b
    elif s[1] == '*':
        print a * b
    elif s[1] == '/':
        print a / b
Buggy python submission (verdict: Runtime Error):
n,m = map(int,raw_input().split())
a = [[0 for i in range (m)]for j in range(n)]
b = [0 for i in range(m)]
c = [0 for i in range(m)]

for i in range(n):
    x = map(int,raw_input().split())
    for j in range(m):
        a[i][j] = x[j]
for i in range(m):
    b[i] = int(raw_input())

for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]
    print c[i]

Fixed submission:
n,m = map(int,raw_input().split())
a = [[0 for i in range (m)]for j in range(n)]
b = [0 for i in range(m)]
c = [0 for i in range(n)]

for i in range(n):
    x = map(int,raw_input().split())
    for j in range(m):
        a[i][j] = x[j]
for i in range(m):
    b[i] = int(raw_input())

for i in range(n):
    for j in range(m):
        c[i] += a[i][j] * b[j]
    print c[i]
Buggy python submission (verdict: Runtime Error):


n = int(raw_input())
d = [100 for i in range(n)]
G = [0 for i in range(n)]
v = [[0 for i in range(n)] for j in range(n)]
  
def Bread(s):
    for e in range(n):
        if v[s][e] == 1:
            if d[e] > d[s] + 1:
                d[e] = d[s]+1
                Bread(e)
  
for i in range(n):
    G = map(int, raw_input().split())
 
    for j in range(G[1]):
        v[G[0]-1][G[j+2]-1] = 1
 
d[0] = 0
  
for i in range(n):
    Bread(i)
 
for i in range(n):
    if d[i] == 100:
        d[i] = -1
 
for i in range(n):
    print i+1, d[i]
 

 
Compile Error Logs: 

You are not authorized to see the message. 
 
 
Status 
Judge: 8/8  Python  CPU: 00.04 sec  Memory: 6492 KB  Length: 531 B  2016-02-02 22:02  2016-02-02 22:02  
Results for testcases 
Case # Verdict CPU Time Memory In Out Case Name 
 Case #1: : Accepted  00.01 sec 6476 KB 40 B 26 B 1.in 
 Case #2: : Accepted  00.00 sec 6280 KB 20 B 12 B 2.in 
 Case #3: : Accepted  00.00 sec 6472 KB 75 B 41 B 3.in 
 Case #4: : Accepted  00.00 sec 6304 KB 62 B 20 B 4.in 
 Case #5: : Accepted  00.00 sec 6320 KB 158 B 96 B 5.in 
 Case #6: : Accepted  00.00 sec 6364 KB 355 B 152 B 6.in 
 Case #7:  

Fixed submission:
n = int(raw_input())
d = [100 for i in range(n)]
G = [0 for i in range(n)]
v = [[0 for i in range(n)] for j in range(n)]
  
def Bread(s):
    for e in range(n):
        if v[s][e] == 1:
            if d[e] > d[s] + 1:
                d[e] = d[s]+1
                Bread(e)
  
for i in range(n):
    G = map(int, raw_input().split())
 
    for j in range(G[1]):
        v[G[0]-1][G[j+2]-1] = 1
 
d[0] = 0
  
for i in range(n):
    Bread(i)
 
for i in range(n):
    if d[i] == 100:
        d[i] = -1
 
for i in range(n):
    print i+1, d[i]
Buggy python submission (verdict: Runtime Error):
n = input()
max = -1 * 10**9
min = input()
 
 
for i in range(n-1):
  tmp = input()
  max = max(maxi, tmp - min)
  min = min(mini, tmp)
 
print max

Fixed submission:
n = input()
maxi = -1 * 10**9
mini = input()
 
 
for i in range(n-1):
  tmp = input()
  maxi = max(maxi, tmp - mini)
  mini = min(mini, tmp)
 
print maxi
Buggy python submission (verdict: Runtime Error):
x = raw_input()
x = int(x)
print x = x^3

Fixed submission:
x = raw_input()
x = int(x)
x = x * x * x
print x

Buggy python submission (verdict: Runtime Error):
x = raw_input()
x = int(x)
print x = x * x * x

Fixed submission:
x = raw_input()
x = int(x)
x = x * x * x
print x