TnT/CodeNet4Repair huggingface dataset:
Problem:
Two children are playing tag on a number line. (In the game of tag, the child called "it" tries to catch the other child.) The child who is "it" is now at coordinate A, and he can travel the distance of V per second. The other child is now at coordinate B, and she can travel the distance of W per second.  He can catch her when his coordinate is the same as hers. Determine whether he can catch her within T seconds (including exactly T seconds later). We assume that both children move optimally.

Incorrect submission (verdict: Wrong Answer):
A, V = map(int, input().split())
B, W = map(int, input().split())
T = input()

if (int(A) < int(B) and int(V) < int(W)):
    print("False")

a = int(A) + (int(V) * int(T))
b = int(B) + (int(W) * int(T))
if a >= b:
    print("True")

Fixed, accepted submission:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())

if abs(a-b) <= t* (v-w):
    print('YES')
else:
    print('NO')
Problem:
This contest, _AtCoder Beginner Contest_ , is abbreviated as _ABC_.  When we refer to a specific round of ABC, a three-digit number is appended after ABC. For example, ABC680 is the 680th round of ABC.  What is the abbreviation for the N-th round of ABC? Write a program to output the answer.

Incorrect submission (verdict: Wrong Answer):
K = int(input())
if K % 2 == 0:
  print(2)
  print("{0} {1}".format((K)//2 + 1, K//2 + 1))
else:
  print(2)
  print("{0} {1}".format((K)//2 - 1, (K)//2))

Fixed, accepted submission:
print("ABC" + input())
Problem:
Write a program which computes the greatest common divisor (GCD) and the least common multiple (LCM) of given a and b.

Incorrect submission (verdict: Wrong Answer):
def main():
    a,b=(int(x) for x in input().split())
    a1=a
    b1=b
    while b!=0:
        c=a%b
        a=b
        b=c
    print(a," ",a1*b1/a)

main()


Fixed, accepted submission:
def main():
    while True:
        try:
            a,b=(int(x) for x in input().split())
        except:
            break
        a1=a
        b1=b
        while b!=0:
            c=a%b
            a=b
            b=c
        print(a, a1*b1//a)

main()
Problem:
Snuke is giving cookies to his three goats.  He has two cookie tins. One contains A cookies, and the other contains B cookies. He can thus give A cookies, B cookies or A+B cookies to his goats (he cannot open the tins).  Your task is to determine whether Snuke can give cookies to his three goats so that each of them can have the same number of cookies.

Incorrect submission (verdict: Wrong Answer):
# -*- coding:utf-8 -*-
a,b=map(int,input().split())
if a%3==0 or b%3==0 or a+b%3==0:
    print("Possible")
else:
    print("Impossible")

Fixed, accepted submission:
# -*- coding:utf-8 -*-
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")
Problem:
Let's arrange a deck of cards. There are totally 36 cards of 4 suits(S, H, C, D) and 9 values (1, 2, ... 9). For example, 'eight of heart' is represented by H8 and 'one of diamonds' is represented by D1.  Your task is to write a program which sorts a given set of cards in ascending order by their values using the Bubble Sort algorithms and the Selection Sort algorithm respectively. These algorithms should be based on the following pseudocode:                 BubbleSort(C) 1 for i = 0 to C.length-1 2     for j = C.length-1 downto i+1 3         if C[j].value < C[j-1].value 4             swap C[j] and C[j-1]                 SelectionSort(C) 1 for i = 0 to C.length-1 2     mini = i 3     for j = i to C.length-1 4         if C[j].value < C[mini].value 5             mini = j 6     swap C[i] and C[mini]   Note that, indices for array elements are based on 0-origin.  For each algorithm, report the stability of the output for the given input (instance). Here, 'stability of the output' means that: cards with the same value appear in the output in the same order as they do in the input (instance).

Incorrect submission (verdict: Wrong Answer):
def bubbleSort(l, n):
    for i in range(n):
        for j in range(i, n-1):
            if l[j][0] > l[j+1][0]:
                l[j], l[j+1] = l[j+1], l[j]
    return l[:]

def selectionSort(l, n):
    for i in range(n):
        minj = i
        for j in range(i+1, n):
            if l[j][0] < l[minj][0]:
                minj = j
        l[i], l[minj] = l[minj], l[i]
    return l[:]

n = int(input())
l = []
for c in input().split():
    l.append((int(c[1]), c[0]))
    
bl = ' '.join([k + str(n) for n, k in bubbleSort(l, n)])
sl = ' '.join([k + str(n) for n, k in selectionSort(l, n)])
print(bl)
print('Stable')
print(sl)
print('Stable' if sl == bl else 'Not stable')

Fixed, accepted submission:
def bubbleSort(l, n):
    for i in range(n):
        for j in range(n-1-i):
            if l[j][0] > l[j+1][0]:
                l[j], l[j+1] = l[j+1], l[j]
    return l[:]

def selectionSort(l, n):
    for i in range(n):
        minj = i
        for j in range(i+1, n):
            if l[j][0] < l[minj][0]:
                minj = j
        l[i], l[minj] = l[minj], l[i]
    return l[:]

n = int(input())
l = []
for c in input().split():
    l.append((int(c[1]), c[0]))
    
bl = ' '.join([k + str(n) for n, k in bubbleSort(l[:], n)])
sl = ' '.join([k + str(n) for n, k in selectionSort(l[:], n)])
print(bl)
print('Stable')
print(sl)
print('Stable' if sl == bl else 'Not stable')
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):
mylist = list(map(int,input().split()))
x = mylist.count(5)
y = mylist.count(7)

if x == 2 and y == 1:
  print("Yes")
else:
  print("NO")


Fixed, accepted submission:
mylist = list(map(int,input().split()))
x = mylist.count(5)
y = mylist.count(7)
 
if x == 2 and y == 1:
  print("YES")
else:
  print("NO")
Problem:
Write a program which reads two integers a and b, and calculates the following values:    * a ÷ b: d (in integer)   * remainder of a ÷ b: r (in integer)   * a ÷ b: f (in real number)

Incorrect submission (verdict: Wrong Answer):
i = j = 0
n = ''
m = ''


line = input()

while line[i] != ' ':
    n = n + line[i]
    i += 1
    
while i < len(line):
    m = m + line[i]
    i += 1
    
n = int(n)
m = int(m)

d = n // m
r = n % m
f = n / m

print(d,end=' ')
print(r,end=' ')
print(f)

Fixed, accepted submission:
i = j = 0
n = ''
m = ''
 
 
line = input()
 
while line[i] != ' ':
    n = n + line[i]
    i += 1
     
while i < len(line):
    m = m + line[i]
    i += 1
     
n = int(n)
m = int(m)
 
d = n // m
r = n % m
f = n / m
 
print(d,end=' ')
print(r,end=' ')
print("{0:.5f}".format(f))
Problem:
We will call a string that can be obtained by concatenating two equal strings an _even_ string. For example, `xyzxyz` and `aaaaaa` are even, while `ababab` and `xyzxy` are not.  You are given an even string S consisting of lowercase English letters. Find the length of the longest even string that can be obtained by deleting one or more characters from the end of S. It is guaranteed that such a non-empty string exists for a given input.

Incorrect submission (verdict: Wrong Answer):
letters = input()
print(letters)
while True:
    not_equal = 0
    length = len(letters)
    letters = letters[:length-1]
    print(letters)
    if len(letters) % 2 != 0:
        continue

    if int(len(letters)) % 2 == 0:
        half = int(len(letters)/2 -1)
    else:
        half = int((len(letters)-1)/2)
    i = 0
    while i <= half:
        if letters[i] != letters[i + half + 1]:
            not_equal = 1
            break
        i += 1

    if not_equal == 0:
        print(len(letters))
        break


Fixed, accepted submission:
letters = input()
while True:
    not_equal = 0
    length = len(letters)
    letters = letters[:length-1]
    if len(letters) % 2 != 0:
        continue

    if int(len(letters)) % 2 == 0:
        half = int(len(letters)/2 -1)
    else:
        half = int((len(letters)-1)/2)
    i = 0
    while i <= half:
        if letters[i] != letters[i + half + 1]:
            not_equal = 1
            break
        i += 1

    if not_equal == 0:
        print(len(letters))
        break
Problem:
Rng has a connected undirected graph with N vertices. Currently, there are M edges in the graph, and the i-th edge connects Vertices A_i and B_i.  Rng will add new edges to the graph by repeating the following operation:    * Operation: Choose u and v (u \neq v) such that Vertex v can be reached by traversing exactly three edges from Vertex u, and add an edge connecting Vertices u and v. It is not allowed to add an edge if there is already an edge connecting Vertices u and v.  Find the maximum possible number of edges that can be added.

Incorrect submission (verdict: Wrong Answer):
import sys
sys.setrecursionlimit(10**7)

def dfs(v, color):
    colors[v] = color
    for to in g[v]:
        if colors[to] == color: return False
        if colors[to] == 0 and not dfs(to, -color):
            return False
    return True

n, m = map(int, input().split())

g = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    g[a].append(b)
    g[b].append(a)

colors = [0]*n

ans = -m
if dfs(0,1):
  b = sum(colors)//2
  w = n-b
  ans += b*w
else:
  ans += n*(n-1)//2
print(ans)

Fixed, accepted submission:
import sys
sys.setrecursionlimit(10**7)

def dfs(v, color):
    colors[v] = color
    for to in g[v]:
        if colors[to] == color: return False
        if colors[to] == 0 and not dfs(to, -color):
            return False
    return True

n, m = map(int, input().split())

g = [[] for _ in range(n)]
for _ in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    g[a].append(b)
    g[b].append(a)

colors = [0]*n

ans = -m
if dfs(0,1):
  b = (sum(colors)+n)//2
  w = n-b
  ans += b*w
else:
  ans += n*(n-1)//2
print(ans)
Problem:
You are given a trapezoid. The lengths of its upper base, lower base, and height are a, b, and h, respectively.    An example of a trapezoid  Find the area of this trapezoid.

Incorrect submission (verdict: Wrong Answer):
#!/usr/bin/python3

a = int(input())
b = int(input())
h = int(input())

print((a+b)*h/2)

Fixed, accepted submission:
#!/usr/bin/python3

a = int(input())
b = int(input())
h = int(input())

print(int((a+b)*h/2))
Problem:
Based on some criterion, Snuke divided the integers from 1 through 12 into three groups as shown in the figure below. Given two integers x and y (1 ≤ x < y ≤ 12), determine whether they belong to the same group.  

Incorrect submission (verdict: Wrong Answer):
x, y = list(map(int, input().split()))
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]

if x in a and y in b:
    print('Yes')

elif x in b and y in b:
    print('Yes')

elif x == 2 and y == 2:
    print('Yes')

else:
    print('No')


Fixed, accepted submission:
x, y = list(map(int, input().split()))
a = [1,3,5,7,8,10,12]
b = [4,6,9,11]

if x in a and y in a:
    print('Yes')

elif x in b and y in b:
    print('Yes')

elif x == 2 and y == 2:
    print('Yes')

else:
    print('No')
Problem:
We will buy a product for N yen (the currency of Japan) at a shop.  If we use only 1000-yen bills to pay the price, how much change will we receive?  Assume we use the minimum number of bills required.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
print(N%1000)

Fixed, accepted submission:
N = int(input())
if N%1000 == 0:
    print(0)
else:
    print(1000-N%1000)
Problem:
A prime number is a natural number which has exactly two distinct natural number divisors: 1 and itself. For example, the first four prime numbers are: 2, 3, 5 and 7.  Write a program which reads a list of _N_ integers and prints the number of prime numbers in the list.

Incorrect submission (verdict: Wrong Answer):
def prime(n):
    for i in range(2, int(n**0.5) + 1):
        if n % i:
            return False
    return True

n = int(input())
c = 0
for _ in range(n):
    if prime(int(input())):
        c+=1

print(c)

Fixed, accepted submission:
def prime(n):
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            return False
    return True

n = int(input())
c = 0
for _ in range(n):
    s = int(input())
    if prime(s):
        c+=1

print(c)
Problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.

Incorrect submission (verdict: Wrong Answer):
s = input()

if sorted(s) == "abc":
  print("Yes")
else:
  print("No")

Fixed, accepted submission:
s = input()

if "".join(sorted(s)) == "abc":
  print("Yes")
else:
  print("No")
Problem:
For an integer n not less than 0, let us define f(n) as follows:    * f(n) = 1 (if n < 2)   * f(n) = n f(n-2) (if n \geq 2)  Given is an integer N. Find the number of trailing zeros in the decimal notation of f(N).

Incorrect submission (verdict: Wrong Answer):
N = int(input())
if N % 2 == 1:
    print(0)
    quit()
N /= 2
res = 0
while N:
    print(N)
    res += int(N / 5)
    N = int(N / 5)
print(res)

Fixed, accepted submission:
N = int(input())
if N % 2 == 1:
    print(0)
    quit()
N //= 2
s = 1
ans = 0
while N >= 5 ** s:
    ans += N // (5 ** s)
    s += 1
print(ans)
Problem:
AtCoDeer the deer has found two positive integers, a and b. Determine whether the concatenation of a and b in this order is a square number.

Incorrect submission (verdict: Wrong Answer):
import math
import numpy as np

a, b = map(int, input().split())
c = (int(str(a) + str(b)))
d = math.sqrt(c)

z = np.rint(d)

if z**2== c:
    print("Yes")
    print(c)
else:
    print("No")
    print(c)

Fixed, accepted submission:
import math
import numpy as np

a, b = map(int, input().split())
c = (int(str(a) + str(b)))
d = math.sqrt(c)

z = np.rint(d)

if z**2== c:
    print("Yes")
else:
    print("No")
Problem:
AtCoDeer the deer has found two positive integers, a and b. Determine whether the concatenation of a and b in this order is a square number.

Incorrect submission (verdict: Wrong Answer):
import math
A,B = map(int, input().split())
C=str(A)+str(B)
C2=int(C)
C3=math.sqrt(C2)
if C3.is_integer():
    print("yes")
else:
    print("no")

Fixed, accepted submission:
import math
A,B = map(str,input().split())
if math.sqrt(int(A+B)) % 1==0:
    print("Yes")
else:
    print("No")
Problem:
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.  Snuke has decided to abbreviate the name of the contest as "AxC". Here, x is the uppercase English letter at the beginning of s.  Given the name of the contest, print the abbreviation of the name.

Incorrect submission (verdict: Wrong Answer):
a=input().split()
print("A"+a[1][0]+"B")

Fixed, accepted submission:
a=input().split()
print("A"+a[1][0]+"C")
Problem:
An _X -layered kagami mochi_ (X ≥ 1) is a pile of X round mochi (rice cake) stacked vertically where each mochi (except the bottom one) has a smaller diameter than that of the mochi directly below it. For example, if you stack three mochi with diameters of 10, 8 and 6 centimeters from bottom to top in this order, you have a 3-layered kagami mochi; if you put just one mochi, you have a 1-layered kagami mochi.  Lunlun the dachshund has N round mochi, and the diameter of the i-th mochi is d_i centimeters. When we make a kagami mochi using some or all of them, at most how many layers can our kagami mochi have?

Incorrect submission (verdict: Wrong Answer):

paper = int(input())


moti_list  = []
li_uniq    = []


for w in range(paper):
    paper = int(input())

    moti_list.append(paper)


Fixed, accepted submission:

paper = int(input())


moti_list  = []
li_uniq    = []


for w in range(paper):
    paper = int(input())

    moti_list.append(paper)

li_uniq = list(set(moti_list))

print(len(li_uniq))
Problem:
There are N stones arranged in a row. Every stone is painted white or black. A string S represents the color of the stones. The i-th stone from the left is white if the i-th character of S is `.`, and the stone is black if the character is `#`.  Takahashi wants to change the colors of some stones to black or white so that there will be no white stone immediately to the right of a black stone. Find the minimum number of stones that needs to be recolored.

Incorrect submission (verdict: Wrong Answer):
S=list(input())

b = 0
w = 0
for i in range(len(S)):
    if(S[i]=="#"):
        b += 1
    else:
        w += 1
        
b_ = w
min_ = min([len(S)+1,w,b])
for i in range(len(S)):
    if(S[i]=="#"):
        b += 1
        
    w_ = w-(i+1-b) 
    min_ = min([w_+b_,min_])
    
    
print(min_)

Fixed, accepted submission:
N = int(input())
S=list(input())

b = 0
w = 0
for i in range(len(S)):
    if(S[i]=="#"):
        b += 1
    else:
        w += 1
        
b_ = 0
min_ = min([w,b])
w_ = 0
for i in range(len(S)):
    if(S[i]=="#"):
        b_ += 1
    else:
        w_ += 1
    min_ = min([w-w_+b_,min_])
        

print(min_)
Problem:
AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i.  If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1,y), (x,y+1) and (x,y-1). Note that **he cannot stay at his place**. Determine whether he can carry out his plan.

Incorrect submission (verdict: Wrong Answer):
import sys

def dis(x0, y0, x1, y1):
    d = 0
    d += abs(x0 - x1)
    d += abs(y0 - y1)
    return d

if __name__ == '__main__':
    N = int(sys.stdin.readline())
    lines = sys.stdin.readlines()

    ls = []
    for line in lines:
        ls.append([int(i) for i in line.split()])

    t, x, y = 0, 0, 0
    for l in ls:
        d = dis(x, y, l[1], l[2])
        # print(t, x, y, l, d)
        if (l[0] - t) % d == 0:
            t, x, y = l
        else:
            print('NO')
            break
    else:
        print('YES')


Fixed, accepted submission:
import sys

def dis(x0, y0, x1, y1):
    d = 0
    d += abs(x0 - x1)
    d += abs(y0 - y1)
    return d

if __name__ == '__main__':
    N = int(sys.stdin.readline())
    lines = sys.stdin.readlines()

    ls = [[0, 0, 0]]
    for line in lines:
        ls.append([int(i) for i in line.split()])

    for i in range(1, len(ls)):
        d = dis(ls[i][1], ls[i][2], ls[i-1][1], ls[i-1][2])
        t = ls[i][0] - ls[i-1][0]
        # print(ls[i], d, t)
        if d <= t and t % 2 == d %  2:
            continue
        else:
            print('No')
            break
    else:
        print('Yes')
Problem:
We have a long seat of width X centimeters. There are many people who wants to sit here. A person sitting on the seat will always occupy an interval of length Y centimeters.  We would like to seat as many people as possible, but they are all very shy, and there must be a gap of length at least Z centimeters between two people, and between the end of the seat and a person.  At most how many people can sit on the seat?

Incorrect submission (verdict: Wrong Answer):
n = list(map(int, input().split()))
a = n[0]
b = n[1]
c = n[2]

i = 0
l = a

l -= c

while l > b + c:
  i += 1
  l -= b + c

print(int(i))

Fixed, accepted submission:
n = list(map(int, input().split()))
a = n[0]
b = n[1]
c = n[2]

i = 0
l = a

l -= c


while l >= (b + c):
    i += 1
    l -= (b + c)
  
print(i)
Problem:
Snuke has come to a store that sells boxes containing balls. The store sells the following three kinds of boxes:    * Red boxes, each containing R red balls   * Green boxes, each containing G green balls   * Blue boxes, each containing B blue balls  Snuke wants to get a total of exactly N balls by buying r red boxes, g green boxes and b blue boxes. How many triples of non-negative integers (r,g,b) achieve this?

Incorrect submission (verdict: Wrong Answer):
r,g,b,n = map(int,input().split())
ans = 0
for i in range(int(n/r)+1):
    for j in range(int((n-r*i)+1)):
        if (n-r*i-g*j) % b == 0:
            ans += 1
print(ans)

Fixed, accepted submission:
r,g,b,n = map(int,input().split())
ans = 0
for i in range((n//r)+1):
    for j in range(((n-r*i)//g)+1):
        if (n-r*i-g*j) % b == 0:
            ans += 1
print(ans)
Problem:
How many ways are there to choose two distinct positive integers totaling N, disregarding the order?

Incorrect submission (verdict: Wrong Answer):
n = int(input())
if n%2 == 0:
  print(int(n/2)+1)
else:
  print(int(n/2))

Fixed, accepted submission:
n = int(input())
if n%2 == 0:
  print(int(n/2)-1)
else:
  print(int(n/2))
Problem:
Write a program which computes the digit number of sum of two integers a and b.

Incorrect submission (verdict: Wrong Answer):
a, b = map(int, input().split())
print(len(str(a+b)))

Fixed, accepted submission:
import sys
for line in sys.stdin:
    a, b = map(int, line.split())
    print(len(str(a+b)))
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):
a=input().split()
if a.count('5')==2 and a.count('7')==1:
  print("Yes")
else:
  print("No")

Fixed, accepted submission:
a=input().split()
if a.count('5')==2 and a.count('7')==1:
  print("YES")
else:
  print("NO")
Problem:
There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.  Extend this image vertically so that its height is doubled. That is, print a image with a height of 2H pixels and a width of W pixels where the pixel at the i-th row and j-th column is equal to C_{(i+1)/2,j} (the result of division is rounded down).

Incorrect submission (verdict: Wrong Answer):
H, M = map(int, input().split())
C = [input() for _ in range(H)]

for row in C:
    print(*row)
    print(*row)

Fixed, accepted submission:
H, M = map(int, input().split())
C = [input() for _ in range(H)]

for row in C:
    print(row)
    print(row)
Problem:
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 −v persons left.  Assume that initially no person lives in the building.

Incorrect submission (verdict: Wrong Answer):


n = int(input())
houses = 4
floors = 3
rooms = 10

official = [[[0 for k in range(rooms)] for j in range(floors)] for i in range(houses)]
print(official)

for a in range(n):
    info = [int(x) for x in input().rstrip().split()]
    b = info[0] - 1
    f = info[1] - 1
    r = info[2] - 1
    v = info[3]
    currentFloor = official[b][f]
    print(currentFloor)
    currentFloor[r] += v

print(official)

for i in range(houses):
    for j in range(floors):
        roomList = [str(official[i][j][k]) for k in range(rooms)]
        print(' '.join(roomList))
    print('#' * 20)



Fixed, accepted submission:


n = int(input())
houses = 4
floors = 3
rooms = 10

official = [[[0 for k in range(rooms)] for j in range(floors)] for i in range(houses)]


for a in range(n):
    info = [int(x) for x in input().rstrip().split()]
    b = info[0] - 1
    f = info[1] - 1
    r = info[2] - 1
    v = info[3]
    currentFloor = official[b][f]
    # print(currentFloor)
    currentFloor[r] += v



for i in range(houses):
    for j in range(floors):
        for k in range(rooms):
            print(' ' + str(official[i][j][k]), end = '')
        print()
    if i < houses - 1:
        print('#' * 20)