Problem:

Official House

You manage 4 buildings, each of which has 3 floors, each of which consists of 10 rooms. Write a program which reads a sequence of tenant/leaver notices, and reports the number of tenants for each room.

  For each notice, you are given four integers b, f, r and v which represent that v persons entered to room r of fth floor at building b. If v is negative, it means that &minus;v persons left.

Assume that initially no person lives in the building. 

Input

  In the first line, the number of notices n is given. In the following n lines, a set of four integers b, f, r and v which represents ith notice is given in a line. 

Output

For each building, print the information of 1st, 2nd and 3rd floor in this order. For each floor information, print the number of tenants of 1st, 2nd, .. and 10th room in this order. Print a single space character before the number of tenants. Print "####################" (20 '#') between buildings.

Constraints

No incorrect building, floor and room numbers are given.

0 ≤ the number of tenants during the management ≤ 9

Sample Input

3
1 1 3 8
3 2 2 7
4 3 8 1

Sample Output

 0 0 8 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 7 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0



Sample input:
3
1 1 3 8
3 2 2 7
4 3 8 1


Sample output:
 0 0 8 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 7 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
####################
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 0 0 0
 0 0 0 0 0 0 0 1 0 0

Submission status: Wrong Answer

Solution code:
data = [
        [[0 for k in range(10)] for j in range(3)] for i in range(4)
        ]

count = int(input())

for x in range(count):
   (b,f,r,v) = [int(i) for i in input().split()]
   data[b - 1][f - 1][r - 1] += v

for b in range(4):
    for f in range(3):
        print(' ',end='')
        for r in range(10):
            if r == 9:
                print(data[b][f][r], end='')
            else:
                print(data[b][f][r], '', end='')
        print()

    if b == count:
        break
    for x in range(20):
        print('#',end='')
    print()

Submission status: Wrong Answer

Solution code:
floor = [
        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
        ]
s = '##########'
n = int(input())
for c in range(n):
    (t,f,r,i) = [int(x) for x in input().split()]
    floor[t-1][f-1][r-1] = i

for z in range(4):
    for i in range(len(floor[z])):
        print(end=' ')
        for v in floor[z][i]:
            print(v, end=' ')
        print()
    if not z == 3:
        print(s)

Submission status: Wrong Answer

Solution code:
floor = [
        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
        ]
s = '####################'

n = int(input())
for c in range(n):
    (t,f,r,i) = [int(x) for x in input().split()]
    floor[t-1][f-1][r-1] = i

for z in range(4):
    for i in range(len(floor[z])):
        for v in floor[z][i]:
            print(end=' ')
            print(v, end='')
        print()
    if not z == 3:
        print(s)

Submission status: Wrong Answer

Solution code:
floor = [
        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
        ]
s = '####################'

n = int(input())
for c in range(n):
    (b,f,r,v) = [int(x) for x in input().split()]
    if 1 > b > 5 and 1 > f > 4 and 1 > r > 10 and 0 > v > 9:
        break
    floor[b-1][f-1][r-1] = v

for z in range(4):
    for i in range(len(floor[z])):
        for v in floor[z][i]:
            print(end=' ')
            print(v, end='')
        print()
    if not z == 3:
        print(s)

Submission status: Wrong Answer

Solution code:
floor = [
        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]],

        [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
         [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]]
        ]
s = '####################'

n = int(input())
for c in range(n):
    (b,f,r,v) = [int(x) for x in input().split()]
    if 1 > b > 5 and 1 > f > 4 and 1 > r > 10:
        break
    floor[b-1][f-1][r-1] =+ v

for z in range(4):
    for i in range(len(floor[z])):
        for v in floor[z][i]:
            print(end=' ')
            print(v, end='')
        print()
    if not z == 3:
        print(s)

Submission status: Wrong Answer

Solution code:
import sys

n = input()

x = {}

for i in range(1,5):
    for j in range(1,4):
        for k in range(1,11):
            x[(i,j,k)] = 0

for i in range(n):
    b, f, r, v = map(int, raw_input().split())
    x[(b,f,r)] += v

for i in range(1,5):
    for j in range(1,4):
        for k in range(1,11):
            sys.stdout.write(' ')
            sys.stdout.write(str(x[(i,j,k)]))
        print
    if(j != 5):
        for l in range(20):
            sys.stdout.write('#')
    print
exit(0)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)]for f in range(3)]for b in range(4)]

for b in range(4):
    for f in range(3):
        for r in range(10):
            print(' {0}'.format(data[b][f][r]),end='')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)]for f in range(3)]for b in range(4)]

for b in range(4):
    for f in range(3):
        for r in range(10):
            print(' {0}'.format(data[b][f][r]),end=' ')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)]for f in range(3)]for b in range(4)]

n = int(input())
for nc in range(n):
    (b,f,r,v) = [int(i) for i in input().split()]
    data[b-1][f-1][r-1] += v




for b in range(4):
    for f in range(3):
        for r in range(10):
            print(' {0}'.format(data[b][f][r]),end='')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)] for  f in range(3)] for b in range(4)]

n = int(input())
for c in range(n):
  (b, f, r, v) = [int(i) for i in input().split()]
  data[b-1][f-1][r-1] +=  v


for b in range(4):
  for f in range(3):
    for r in range(10):
      print(' {0}'.format(data[b][f][r]), end='')
    print()
  print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)]for f in range(3)]for b in range(4)]

n = int(input())
for nc in range(n):
    (b,f,r,v) = [int(i) for i in input().split()]
    data[b-1][f-1][r-1] += v




for b in range(4):
    for f in range(3):
        for r in range(10):
            print(' {0}'.format(data[b][f][r]),end=' ')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)] for f in range(3)] for b in range(4)]

n = int(input())
for nc in range(n):
    (b, f, r, v) = [int(i) for i in input().split()]
    data[b - 1][f - 1][r - 1] += v



for b in range(4):
    for f in range(3):
        for r in range(10):
            print(' {0}'.format(data[b][f][r]), end='')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)] for  f in range(3)] for b in range(4)]

n = int(input())
for nc in range(n):
  (b, f, r, v) = [int(i) for i in input().split()]
  data[b - 1][f - 1][r - 1] +=  v


for b in range(4):
  for f in range(3):
    for r in range(10):
      print(' {0}'.format(data[b][f][r]), end='')
    print()
  print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)]for f in range(3)]for b in range(4)]

n = int(input())
for nc in range(n):
    (b,f,r,v) = [int(i) for i in input().split()]
    data[b - 1][f - 1][r - 1] += v




for b in range(4):
    for f in range(3):
        for r in range(10):
            print(' {0}'.format(data[b][f][r]),end='')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
import sys

official_house = {}
for b in range(1, 5):
    for f in range(1, 4):
        for r in range(1, 11):
            official_house[(b, f, r)] = 0

n = int(sys.stdin.readline())
for line in sys.stdin:
    (b, f, r, v) = [int(i) for i in line.split()]
    official_house[(b, f, r)] += v

for b in range(1, 5):
    for f in range(1, 4):
        for r in range(1, 11):
            print(" %d" % official_house[(b, f, r)], end="")
        print()
    print("####################")

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)] for f in range(3)] for b in range(4)]

n = int(input())
for nc in range(n):
    (b,f,r,v) = [int(i) for i in input().split()]
    data[b - 1][f - 1][r - 1] += v



for b in range(4):
    for f in range(3):
        for r in range(10):
            print('{0}'.format(data[b][f][r]), end='')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
l=[0]*120
s="#"*20
for i in range(input()):b,f,r,v=map(int,raw_input().split());l[b*30+f*10+r-41]+=v
print "",
for i in range(120):
 print l[i],;j=i+1
 if j%30==0:print "\n"+s,
 if j%10==0:print;print "",

#print p

#for i in range(4):
#    for j in range(-3,0):print ' '+' '.join(map(str,l[i][j]))
#    if i<3:print s
#print a
#a[1]=2

#l=[[[0 for i in range(10)]for j in range(3)]for k in range(4)]
#s='#'*20
#n=input()
#for i in range(n):b,f,r,v=map(int,raw_input().split());l[b-1][f-1][r-1]+=v
#for i in range(4):
#    for j in range(-3,0):print ' '+' '.join(map(str,l[i][j]))
#    if i<3:print s

Submission status: Wrong Answer

Solution code:
l=[0]*120
s="#"*20
for i in range(input()):b,f,r,v=map(int,raw_input().split());l[b*30+f*10+r-41]+=v
print "",
for i in range(120):
 print l[i],;j=i+1
 if j!=120:break
 if j%30==0:print "\n"+s,
 if j%10==0:print;print "",

Submission status: Wrong Answer

Solution code:
l=[0]*120
s="#"*20
for i in range(input()):b,f,r,v=map(int,raw_input().split());l[b*30+f*10+r-41]+=v
print "",
for i in range(120):
 print l[i],;j=i+1
 if j==120:break
 if j%30==0:print s
 if j%10==0:print;print "",

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
data={}
for i in range(1,5):
	for j in range(1,4):
		for k in range(1,11):
			data[(i,j,k)]=0
			

for i in range(1,n+1):
	b,r,f,v=map(int,input().split())
	data[(b,r,f)]+=v

for i in range(1,5):
	for j in range(1,4):
		for k in range(1,11):
			sys.stdout.write(str(data[(i,j,k)])+' ')
		print('')
	print('#'*20)

Submission status: Wrong Answer

Solution code:
import sys
n=int(input())
data={}
for i in range(1,5):
	for j in range(1,4):
		for k in range(1,11):
			data[(i,j,k)]=0
			

for i in range(1,n+1):
	b,r,f,v=map(int,input().split())
	data[(b,r,f)]+=v

for i in range(1,5):
	for j in range(1,4):
		for k in range(1,11):
			sys.stdout.write(' '+str(data[(i,j,k)]))
		print('')
	print('#'*20)

Submission status: Wrong Answer

Solution code:
rooms = [[[0] * 10 for b in range(3)] for a in range(4)]
n = int(input())
for _ in range(n):
    b, f, r, v = map(int, input().split())
    rooms[b - 1][f - 1][r - 1] += v

for i in range(4):
    for j in range(3):
        print(' ' + ' '.join(map(str, rooms[i][j])))
    if i < 4:
        print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)] for f in range(3)] for b in range(4)]
n = int(input())
for _ in range(n):
    (b, f, r, v) = [int(i) for i in input().split()]
    data[b - 1][f - 1][r - 1] += v

for b in range(4):
    for f in range(3):
        for r in range(10):
            print('', data[b][f][r], end='')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)] for f in range(3)] for b in range(4)]
 
count = int(input())
 
for c in range(count):
    (b, f, r, v) = [int(x) for x in input().split()]
    data[b - 1][f - 1][r - 1] += v
 
for b in range(4):
    for f in range(3):
        for r in range(10):
            print('',data[b][f][r], end='')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)] for f in range(3)] for b in range(4)]

n = int(input())

for _ in range(n):
    (b, f, r, v) = [int(i) for i in input().split()]


for b in range(4):
    for f in range(3):
        for r in range(10):
            print('', data[b][f][r], end='')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [ [ [ 0 for r in range(10)] for f in range(3)] for b in range(4)]

n = int( input())
for _ in range( n):
    (b, f, r, v) = [int(i) for i in input().split()]
    data[b-1][f-1][r-1] += v

for b in range(4):
    for f in range(3):
        for r in range(10):
            print( '', data[b][f][r], end='')
        print()
    if b < 4:
        print( '#' * 20)

Submission status: Wrong Answer

Solution code:
data = [[[0 for r in range(10)] for f in range(3)] for b in range(4)]

n = int(input())

for _ in range(n):
    (b, f, r, v) = [int(i) for i in input().split()]


#????????????
for b in range(4):
    for f in range(3):
        for r in range(10):
            print('', data[b][f][r], end='')
        print()
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
data = [ [ [ 0 for r in range(10)] for f in range(3)] for b in range(4)]

n = int( input())
for _ in range( n):
    (b, f, r, v) = [int(i) for i in input().split()]
    data[b-1][f-1][r-1] += v

for b in range(4):
    for f in range(3):
        for r in range(10):
            print( '', data[b][f][r], end='')
        print()
    if b < 4:
        print( '#' * 20)
    else:
        print()

Submission status: Wrong Answer

Solution code:
data = [
        [
            [
                0 for r in range(10)
            ] for f in range(3)
        ] for b in range(4)
]

n = int(input())

for _ in range(n):
    (b, f, r, v) = [int(i) for i in input().split()]
    data[b - 1][f - 1][r - 1] = v


for b in range(4):
    for f in range(3):
        for r in range(10):
            print('', data[b][f][r], end='')
        print()
    if b < 3:
        print('#' * 20)

Submission status: Wrong Answer

Solution code:
n = int(raw_input())

residence = []

for i in xrange(4):
  floor = []
  for j in xrange(3):
    room = []
    for k in xrange(10):
      room.append(0)
    floor.append(room)
  residence.append(floor)

i = 0
while i < n:
  line = map(int, raw_input().split(" "))
  residence[line[0] - 1][line[1] - 1][line[2] - 1] += line[3]
  # print "residence[%d][%d][%d] = %d" % (line[0] - 1, line[1] - 1, line[2] - 1, line[3])
  # print residence
  i += 1

secion_line = "####################"
for i in xrange(4):
  for j in xrange(3):
    output_line = ""
    for k in xrange(10):
      output_line += " " + str(residence[i][j][k])
    print output_line.strip()
  print secion_line

Submission status: Wrong Answer

Solution code:
n = int(raw_input())

residence = []

for i in xrange(4):
  floor = []
  for j in xrange(3):
    room = []
    for k in xrange(10):
      room.append(0)
    floor.append(room)
  residence.append(floor)

i = 0
while i < n:
  line = map(int, raw_input().split(" "))
  residence[line[0] - 1][line[1] - 1][line[2] - 1] += line[3]
  # print "residence[%d][%d][%d] = %d" % (line[0] - 1, line[1] - 1, line[2] - 1, line[3])
  # print residence
  i += 1

secion_line = "####################"
for i in xrange(4):
  for j in xrange(3):
    output_line = ""
    for k in xrange(10):
      output_line += " " + str(residence[i][j][k])
    print output_line
  print secion_line

Submission status: Wrong Answer

Solution code:
n = int(input())
data = [list(map(int,input().split())) for i in range(n)]
room = [[[0 for k in range(10)] for j in range(3)] for i in range(4)]
for a in data:
    room[a[0]-1][a[1]-1][a[2]-1]=a[3]

for x,i in enumerate(room):
    for j in i:
            print(''," ".join(map(str,j)))
    if x <= 2 : print('#'*20)

Submission status: Wrong Answer

Solution code:
build = range(1, 5)
floor = range(1, 4)
dic = {}
for b in build:
    dic[b] = {}
    for f in floor:
        dic[b][f] = [0]*10

n = input()
for i in range(n):
    info = map(int, raw_input().split())
    dic[info[0]][info[1]][info[2]-1] += info[3]

for b in build:
    for f in floor:
        print ' '.join(map(str, dic[b][f]))
    print "#"*20

Submission status: Wrong Answer

Solution code:
import sys

n = input()
a_uni = [[[0 for i in range(10)]for i in range(3)]for i in range(4)]
for i in range(n):
	b,f,r,v = map(int,raw_input().split())
	a_uni[b-1][f-1][r-1] += v
for i in range(4):
	for j in range(3):
		for k in range(10):
			if k==9:
				print(a_uni[i][j][k])
			else :
				sys.stdout.write(str(a_uni[i][j][k]))
				sys.stdout.write(' ')
	print '####################'

Submission status: Wrong Answer

Solution code:
def showrooms(building,floor,rooms):
    for x in xrange(0,floor):
        for y in xrange(0,rooms):
            if y==0:
                print "",
                print building[x][y],
            elif y ==rooms-1:
                print building[x][y]
            else:
                print building[x][y],
FLOOR = 3
ROOMS = 10
n = input()
building1 = [[0 for i in range(ROOMS)] for j in range(FLOOR)]
building2 = [[0 for i in range(ROOMS)] for j in range(FLOOR)]
building3 = [[0 for i in range(ROOMS)] for j in range(FLOOR)]
building4 = [[0 for i in range(ROOMS)] for j in range(FLOOR)]
# for x in xrange(0,n):
for x in xrange(0,n):
    b,f,r,v = map(int,raw_input().split())
    f=f-1
    r=r-1
    if b==1:
        building1[f][r] = v
    elif b==2:
        building2[f][r] = v
    elif b==3:
        building3[f][r] = v
    elif b==4:
        building4[f][r] = v
    else:
        print "your input is invalid format."
        break
showrooms(building1,FLOOR,ROOMS)
print "####################"
showrooms(building2,FLOOR,ROOMS)
print "####################"
showrooms(building3,FLOOR,ROOMS)
print "####################"
showrooms(building4,FLOOR,ROOMS)

Submission status: Wrong Answer

Solution code:
n=input()
L1=[[0,0,0,0,0,0,0,0,0,0],
   [0,0,0,0,0,0,0,0,0,0],
   [0,0,0,0,0,0,0,0,0,0]]
L2=[[0,0,0,0,0,0,0,0,0,0],
   [0,0,0,0,0,0,0,0,0,0],
   [0,0,0,0,0,0,0,0,0,0]]   
L3=[[0,0,0,0,0,0,0,0,0,0],
   [0,0,0,0,0,0,0,0,0,0],
   [0,0,0,0,0,0,0,0,0,0]]
L4=[[0,0,0,0,0,0,0,0,0,0],
   [0,0,0,0,0,0,0,0,0,0],
   [0,0,0,0,0,0,0,0,0,0]]
Mantion=[L1,L2,L3,L4]
for i in range(n):
  b,f,r,v=map(int, raw_input().split())
  Mantion[b-1][f-1][r-1]+=v

for j in range(3):
  L1_str=map(str, L1[j])
  print " ".join(L1_str)
print "#"*20
for j in range(3):
  L2_str=map(str, L2[j])
  print " ".join(L2_str)
print "#"*20
for j in range(3):
  L3_str=map(str, L3[j])
  print " ".join(L3_str)
print "#"*20
for j in range(3):
  L4_str=map(str, L4[j])
  print " ".join(L4_str)
print "#"*20

Submission status: Wrong Answer

Solution code:
l = [[[0 for z in range(10)] for y in range(3)] for x in range(4)]
n = int(input())
while n > 0:
  b,f,r,v = map(int,input().split())
  l[b-1][f-1][r-1] += v
  n -= 1
for b in l:
  for f in b:
    r_l = [str(r) for r in f]
    print(' '+' '.join(r_l))
  print('#'*20)

Submission status: Wrong Answer

Solution code:
# coding:utf-8

class FLOOR:
    def __init__(self):
        self.room = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

class BUILD:
    def __init__(self):
        self.floor = [FLOOR(), FLOOR(), FLOOR()]

# 3??????10??¨?±????4?£?
all_rooms = [BUILD(), BUILD(), BUILD(), BUILD()]

# ??\???
n = int(input())
for i in range(n):
    b, f, r, v = map(int, input().split())
    all_rooms[b-1].floor[f-1].room[r-1] += v

for b in range(4):
    for f in range(3):
        display = []
        for r in range(10):
            display.append(str(all_rooms[b].floor[f].room[r]))
        print(' '.join(display))
    print('#'*20)

Submission status: Wrong Answer

Solution code:
def print_list(lst) :
	a = ' '.join(list(map(str, lst)))
	print(a)

n = int(input())
lst = [[[0 for w in range(10)] for q in range(3)] for e in range(4)]
for _ in range(n):
	b,f,r,v = list(map(int, input().split()))
	lst[b-1][f-1][r-1] = v 
for i in range(4):
	print("#"*20)
	for j in range(3):
		print_list(lst[i][j])

Submission status: Wrong Answer

Solution code:
def print_list(lst) :
	a = ' '.join(list(map(str, lst)))
	print(a)

n = int(input())
lst = [[[0 for w in range(10)] for q in range(3)] for e in range(4)]
for _ in range(n):
	b,f,r,v = list(map(int, input().split()))
	lst[b-1][f-1][r-1] = v 
for i in range(4):
	if (i != 0):
		print("#" * 20)
		for j in range(3):
			print_list(lst[i][j])

Submission status: Wrong Answer

Solution code:
def print_list(lst) :
	a = ' '.join(list(map(str, lst)))
	print(" " + a)

n = int(input())
lst = [[[0 for w in range(10)] for q in range(3)] for e in range(4)]
for _ in range(n):
	b,f,r,v = list(map(int, input().split()))
	lst[b-1][f-1][r-1] = v 
for i in range(4):
	if (i != 0):
		print("#" * 20)
	for j in range(3):
		print_list(lst[i][j])

Submission status: Wrong Answer

Solution code:
num = int(input())

info = list()
buildings = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

for i in range(num):
    info = input().split()
    buildings[int(info[0])-1][int(info[1])-1][int(info[2])-1] = int(info[3])

for i, b in enumerate(buildings):
    for f in b:
        print(' '.join(map(str, f)))
    if not i == (len(buildings) - 1):
        print('#'*19)

Submission status: Wrong Answer

Solution code:
num = int(input())

info = list()
buildings = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

for i in range(num):
    info = input().split()
    buildings[int(info[0])-1][int(info[1])-1][int(info[2])-1] = int(info[3])

for i, b in enumerate(buildings):
    for f in b:
        print(' ', end='')
        print(' '.join(map(str, f)))
    if not i == (len(buildings) - 1):
        print('#'*20)

Submission status: Wrong Answer

Solution code:
house = [[[0] * 10 for _ in range(3)] for __ in range(4)]

n = int(input())

while n:
    b, f, r, v = map(int, input().split())
    house[b - 1][f - 1][r - 1] += v
    n -= 1

for b in house:
    for f in b:
        print(*f)
    print('#' * 20)

Submission status: Wrong Answer

Solution code:
import sys
n = input()
a = [[[0]*10 for i in range(3)] for i in range(4)]
for i in xrange(n):
	b = map(int, raw_input().split())
	a[b[0]-1][b[1]-1][b[2]-1] += b[3]

for i in range(4):
	for j in range(3):
		for k in range(10):
			sys.stdout.write(' %d' % a[i][j][k])
		print ""
	print "#"*20

Submission status: Wrong Answer

Solution code:
import sys
n = input()
a = [[[0]*10 for i in range(3)] for i in range(4)]
for i in xrange(n):
	b = map(int, raw_input().split())
	a[b[0]-1][b[1]-1][b[2]-1] += b[3]

for i in range(4):
	for j in range(3):
		for k in range(10):
			sys.stdout.write(' %d' % a[i][j][k])
		print ""
	print "#"*20
print ""

Submission status: Wrong Answer

Solution code:
import sys
n = input()
a = [[[0]*10 for i in range(3)] for i in range(4)]
for i in xrange(n):
	b = map(int, raw_input().split())
	a[b[0]-1][b[1]-1][b[2]-1] += b[3]

for i in range(4):
	for j in range(3):
		for k in range(10):
			sys.stdout.write(' %s' % a[i][j][k])
		print ""
	print "#"*20
print ""

Submission status: Wrong Answer

Solution code:
import sys
n = input()
a = [[[0]*10 for i in range(3)] for i in range(4)]
for i in xrange(n):
	b = map(int, raw_input().split())
	a[b[0]-1][b[1]-1][b[2]-1] += b[3]

for i in range(4):
	for j in range(3):
		for k in range(10):
			sys.stdout.write(' %s' % a[i][j][k])
		print ""
	print "#"*20

Submission status: Wrong Answer

Solution code:
bilding = [[[0 for x in range(10)] for x in range(3)]for x in range(4)] 
n = int(input())
for k in range(n):
    b, f, r, v = map(int, raw_input().split())
    bilding[b-1][f-1][r-1] += v
for b in range(4):
    for f in range(3):
        print(" "+" ".join(map(str, bilding[b][f])))
    if b <= 3:
        print("#"*20)

Submission status: Wrong Answer

Solution code:
n = int(raw_input())

Mem = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]

for i in range(n):
    C = map(int, raw_input().split())
    Mem[C[0]-1][C[1]-1][C[2]-1] += C[3]

for i in range(4):
    for j in range(3):
        for k in range(10):
            print Mem[i][j][k],
        print ''
    print '#'*20

Submission status: Wrong Answer

Solution code:
l=[[[0 for i in range(10)]for j in range(3)]for k in range(4)]
s='#'*20
n=input()
for i in range(n):b,f,r,v=map(int,raw_input().split());l[b-1][f-1][r-1]+=v
for i in range(4):
    for j in range(-3,0):print ' '+' '.join(map(str,l[i][j]))
    if i<3:print

Submission status: Wrong Answer

Solution code:
data = [None] * 4
for i in xrange(4):
    data[i] = [None] * 3
    for j in xrange(3):
        data[i][j] = [0] * 10

n = input()
for i in xrange(n):
    line = map(int, raw_input().split())
    data[line[0] - 1][line[1] - 1][line[2] - 1] += line[3]

for i in xrange(4):
    for j in xrange(3):
        s = ""
        for k in xrange(9):
            s += str(data[i][j][k])
            s += ' '
        s += str(data[i][j][9])
        print s
    if i < 3:
        print '#' * 19

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Here your code !

n = input()

A = []
for i in range(n):
    A.append(raw_input().split())

buil1 = [[0 for i in range(10)] for j in range(3)]
buil2 = [[0 for i in range(10)] for j in range(3)]
buil3 = [[0 for i in range(10)] for j in range(3)]
buil4 = [[0 for i in range(10)] for j in range(3)]

b = []
f = []
r = []
v = []

for i in range(n):
    b.append(int(A[i][0]))
    f.append(int(A[i][1]))
    r.append(int(A[i][2]))
    v.append(int(A[i][3]))
for i in range(n) :   
    if b[i] == 1:
         buil1[f[i]-1][r[i]-1] += v[i]
    elif b[i] == 2:
         buil2[f[i]-1][r[i]-1] += v[i]
    elif b[i] == 3:
         buil3[f[i]-1][r[i]-1] += v[i]
    elif b[i] == 4:
         buil4[f[i]-1][r[i]-1] += v[i]

                    
                        
for i in range(3):
    print"",
    for j in range(10):
        if j == 9 :
            print buil1[i][j]
        else :
            print buil1[i][j],
    
    
print"#"*20
for i in range(3):
    print"",
    for j in range(10):
        if j == 9 :
            print buil1[i][j]
        else :
            print buil1[i][j],
    
print"#"*20    
for i in range(3):
    print"",
    for j in range(10):
        if j == 9 :
            print buil1[i][j]
        else :
            print buil1[i][j],
    
print"#"*20    
for i in range(3):
    print"",
    for j in range(10):
        if j == 9 :
            print buil1[i][j]
        else :
            print buil1[i][j],

Submission status: Wrong Answer

Solution code:
import sys
n = input()
d = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]
for i in range(n):
  b, f, r, v = map(int, raw_input().split())
  d[b-1][f-1][r-1] += v
for i in range(4):
  for j in range(3):
    for k in range(10):
      sys.stdout.write(' %d' % d[i][j][k])
    if k==9:
      sys.stdout.write('\n')
  if j==2:
    sys.stdout.write('############\n')

Submission status: Wrong Answer

Solution code:
import sys
n = input()
d = [[[0 for i in range(10)] for j in range(3)] for k in range(4)]
for i in range(n):
  b, f, r, v = map(int, raw_input().split())
  d[b-1][f-1][r-1] += v
for i in range(4):
  for j in range(3):
    for k in range(10):
      sys.stdout.write(' %d' % d[i][j][k])
    if k==9:
      sys.stdout.write('\n')
  if j==2:
    sys.stdout.write('####################\n')

Submission status: Wrong Answer

Solution code:
house = [[[0 for i in range(10)]for j in range(3)]for k in range(4)]
n = int(raw_input())
for i in range(n):
  a = raw_input().split()
  house[int(a[0])-1][int(a[1])-1][int(a[2])-1] += int(a[3])
for i in range(4):
  if i != 0:
    print "#"*20
  for j in range(3):
    line = ""
    for k in range(10):
      line += " " + str(house[i][j][k])
      print line

Submission status: Wrong Answer

Solution code:
bilt1 = [0] * 30
bilt2 = [0] * 30
bilt3 = [0] * 30
bilt4 = [0] * 30

sha = "#" * 20
count = 0;

x = input()
for i in range(x):
    b,f,r,v =map(int, raw_input().split())
    if b == 1:
        bilt1[((f - 1) * 10) + (r - 1)] = v
    elif b == 2:
        bilt2[((f - 1) * 10) + (r - 1)] = v
    elif b == 3:
        bilt3[((f - 1) * 10) + (r - 1)] = v
    else:
        bilt4[((f - 1) * 10) + (r - 1)] = v

for i in range(3):
    print " " + str(bilt1[i * 10]),
    for j in range(9):
        print bilt1[(i * 10) + (j + 1)],
    print ""
print sha

for i in range(3):
    print " " + str(bilt1[i * 10]),
    for j in range(9):
        print bilt2[(i * 10) + (j + 1)],
    print ""
print sha

for i in range(3):
    print " " + str(bilt1[i * 10]),
    for j in range(9):
        print bilt3[(i * 10) + (j + 1)],
    print ""
print sha

for i in range(3):
    print " " + str(bilt1[i * 10]),
    for j in range(9):
        print bilt4[(i * 10) + (j + 1)],
    print ""
print sha