problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p03272
u887207211
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['a, b = map(int, input().split())\nprint(a - b - 1)', 'a, b = map(int, input().split())\nprint(a - b + 1)\n']
['Wrong Answer', 'Accepted']
['s722207504', 's472240176']
[2940.0, 2940.0]
[17.0, 17.0]
[49, 50]
p03272
u888512581
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['N, i = map(int, input().split())\nprint(N - i +\u30001)', 'N, i = map(int, input().split())\nprint(N - i + 1)']
['Runtime Error', 'Accepted']
['s756840556', 's376203642']
[3188.0, 2940.0]
[20.0, 17.0]
[51, 49]
p03272
u894694822
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['a, b=map(int, input().split())\nprint(a+b-1)', 'a, b=map(int, input().split())\nprint(a-b+1)']
['Wrong Answer', 'Accepted']
['s737721580', 's600528077']
[2940.0, 2940.0]
[17.0, 17.0]
[43, 43]
p03272
u895515293
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['i,j=map(int, input())\nprint(i-j+1)', 'i,j=map(int, input().split())\nprint(i-j+1)']
['Runtime Error', 'Accepted']
['s576279866', 's335095439']
[2940.0, 2940.0]
[17.0, 17.0]
[34, 42]
p03272
u898967808
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['n,i = (map,int(input()))\nprint(n-i+1)\n', 'n,i = map(int,input().split())\nprint(n-i+1)']
['Runtime Error', 'Accepted']
['s463711459', 's829634205']
[3316.0, 2940.0]
[19.0, 17.0]
[38, 43]
p03272
u905715926
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['a,b = map(int,input().split())\nprint(b-a+1)', 'a,b = map(int,input().split())\nprint(a-b+1)\n']
['Wrong Answer', 'Accepted']
['s005456201', 's263990823']
[2940.0, 2940.0]
[17.0, 21.0]
[43, 44]
p03272
u921773161
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['s = input()\ns_list = list(s)\nprint(s_list)\nl = len(s_list) - 2\na = s_list[0] + str(l) + s_list[-1]\nprint(a)\n', 'd = list(map(int, input().split()))\nN = d[0]\ni = d[1]\nprint(N-i+1)']
['Wrong Answer', 'Accepted']
['s063320784', 's832748107']
[2940.0, 2940.0]
[17.0, 19.0]
[108, 66]
p03272
u923077302
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['def main():\n N = int(input())\n i = int(input())\n output = solve(N, i)\n print(output)\n return\n\n#________________________________________\n# Solve\n#________________________________________\ndef solve(N, i):\n \n return N - i + 1\n#________________________________________\n\n\nif __name__ =...
['Runtime Error', 'Accepted']
['s939453557', 's156753960']
[2940.0, 2940.0]
[18.0, 17.0]
[360, 364]
p03272
u933129390
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['n, k = map(int, input().split())\nif n%k:\n print(1)\nelse:\n print(0)\n', 'n, i = map(int, input().split())\nprint(n-i+1)\n']
['Wrong Answer', 'Accepted']
['s891663294', 's006998844']
[2940.0, 2940.0]
[17.0, 20.0]
[73, 46]
p03272
u933622697
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['# WIP (WA: 1_01.txt, 1_06.txt, 1_07.txt)\nimport sys\ninput_s = sys.stdin.readline\n\nN, K = map(int, input_s().split())\nxxx = list(map(int, input_s().split()))\n\nmin_elapsed_time = float("inf")\nfor left, right in zip(xxx, xxx[K - 1:]):\n elapsed_time = right - left + min(abs(left), abs(right))\n """\n r...
['Wrong Answer', 'Accepted']
['s937938403', 's430223602']
[3064.0, 2940.0]
[17.0, 17.0]
[543, 45]
p03272
u946969297
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['a,b = map(int,input().split())\nreturn a - b + 1', 'a,b = map(int,input().split())\nprint(a-b+1)']
['Runtime Error', 'Accepted']
['s413864179', 's394009930']
[9016.0, 9148.0]
[27.0, 29.0]
[47, 43]
p03272
u950376354
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['N,i = map(int,input(),split())\n\nprint(N-i+1)', 'N,i = map(int,input().split())\n\nprint(N-i+1)']
['Runtime Error', 'Accepted']
['s677822134', 's593976849']
[2940.0, 2940.0]
[17.0, 18.0]
[44, 44]
p03272
u956547804
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['n,i=map(int,input(),split())\nprint(n-i+1)', 'n,i=map(int,input().split())\nprint(n-i+1)']
['Runtime Error', 'Accepted']
['s446623022', 's481941922']
[2940.0, 2940.0]
[17.0, 17.0]
[41, 41]
p03272
u962718741
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['print(1 - eval(input().replace(" ", "-")))', 'print(1 + eval(input().replace(" ", "-")))']
['Wrong Answer', 'Accepted']
['s200265914', 's948347034']
[9020.0, 9052.0]
[26.0, 25.0]
[42, 42]
p03272
u967835038
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['n,i=map(int、input().split())\nprint(n-i+1)\n', 'n,i=map(int,input().split())\nprint(n-i+1)']
['Runtime Error', 'Accepted']
['s453276342', 's771069876']
[2940.0, 2940.0]
[17.0, 17.0]
[44, 41]
p03272
u970197315
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['# ABC107 A - Train \nn,i = map(int,input().split())\nprint(n-1+1)', '# ABC107 A - Train \nn,i = map(int,input().split())\nprint(n-i+1)']
['Wrong Answer', 'Accepted']
['s377640094', 's750796088']
[2940.0, 2940.0]
[17.0, 18.0]
[63, 63]
p03272
u972892985
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['n i = map(int,input().split())\nprint(n - i + 1)', 'n i = map(int,input().split())\nprint((n - i) + 1)\n', 'n, i = map(int,input().split())\nprint((n - i) + 1)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s010413257', 's401186692', 's752470968']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[47, 50, 51]
p03272
u975481854
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['h, w = map(int, input().split())\na = [input() for w in range(h)]\n\nfor i in range(h)[::-1]:\n if "#" not in a[i]:\n del a[i]\n h -= 1\n\nn = []\nfor j in range(w):\n m = ["".join(t[j] for t in a)]\n if "#" in m[0]:\n n += m\n\nfor k in range(h):\n print("".join(u[k] for u in n))\n',...
['Runtime Error', 'Accepted']
['s674715615', 's243523122']
[3064.0, 2940.0]
[18.0, 17.0]
[300, 45]
p03272
u977642052
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
["\n\n\ndef main(n, i):\n print(n - i + 1)\n\n\nif __name__ == '__main__':\n main(map(int, input().split(' ')))\n", "\n\n\ndef main(n, i):\n print(n - i + 1)\n\n\nif __name__ == '__main__':\n n, i = map(int, input().split(' '))\n main(n, i)\n"]
['Runtime Error', 'Accepted']
['s902876921', 's001077602']
[2940.0, 2940.0]
[17.0, 17.0]
[227, 243]
p03272
u978313283
2,000
1,048,576
There is an N-car train. You are given an integer i. Find the value of j such that the following statement is true: "the i-th car from the front of the train is the j-th car from the back."
['N=int(input())\nA=list(map(int,input().split()))\nmedian_len=N*(N+1)//2\nmedian=median_len//2+1\na=1\nmedin_rank=1\nfor i in range(1,N):\n a=i*(i+1)//2\n b=(i+2)*(i+1)//2\n if a<=median and b>median:\n medin_rank=i\n break\nrank_index=median-a\nmedian_list=[]\nl=medin_rank//2\nfor i in range(N-...
['Runtime Error', 'Accepted']
['s933826275', 's531337832']
[3064.0, 2940.0]
[17.0, 18.0]
[378, 41]
p03273
u001024152
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h, w = map(int, input().split())\n\nnewGrid = []\nfor i in range(h):\n a = list(input())\n for j,a_j in enumerate(a):\n if a_j == "#":\n newGrid.append(a)\n break\n else:\n continue\n\nans = []\nfor j in range(w):\n for i in range(len(newGrid)):\n if newG...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s670111154', 's799505894', 's487544783']
[3316.0, 3188.0, 3316.0]
[20.0, 19.0, 19.0]
[466, 497, 509]
p03273
u007263493
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h , w = map(int,input().split())\na = [''] * h \nfor i in range(n):\n a[i] = input()\n\nrow = [False]*h\ncol = [False]*w\n\nfor i in range(h):\n for j in range(w):\n if a[i][j] =='#':\n row[i] = True\n col[j] = True\n\nfor i in range(h):\n if row[i]:\n for j in range(w):...
['Runtime Error', 'Accepted']
['s408436379', 's465366203']
[3064.0, 4468.0]
[18.0, 31.0]
[379, 380]
p03273
u010110540
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h, w = map(int, input().split())\n\na = [''] * h\n\nfor i in range(h):\n a[i] = input()\n \nrow = [False] * h\ncol = [False] * w\n\nfor i in range(h):\n for j in range(w):\n if a[i][j] == '#':\n row[i] = True\n col[j] = True\n\nfor i in range(h):\n if row[i]:\n for j in...
['Wrong Answer', 'Accepted']
['s586566325', 's811553274']
[3700.0, 4468.0]
[26.0, 31.0]
[380, 392]
p03273
u013408661
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w=map(int,input().split())\ngrid=[]\nfor i in range(h):\n grid.append(list(map(int,input().split())))\nfor i in range(grid):\n if grid[i].count('.')==len(grid[i]):\n grid.pop(i)\nfor j in range(grid[0]):\n for i in range(len(grid)):\n if grid[i][j]!='#':\n break\n for i in range(len(grid)):\n grid...
['Runtime Error', 'Accepted']
['s179609888', 's943389749']
[3064.0, 3188.0]
[18.0, 21.0]
[361, 467]
p03273
u013756322
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h, w = map(int, input().split())\nA = [None] * h\nfor i in range(h):\n A[i] = list(input())\n\nwhile ('.' * w in A):\n A.remove('.' * w)\n\nB = [''.join(col) for col in zip(*A)]\n\nwhile ('.' * len(A) in B):\n B.remove('.' * len(A))\n\nA = [''.join(col) for col in zip(*B)]\n\nfor a in A:\n print(''.join(a))\n", "...
['Wrong Answer', 'Accepted']
['s362538841', 's556780839']
[3060.0, 3064.0]
[19.0, 19.0]
[297, 292]
p03273
u017415492
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['import numpy as np\nh,w=map(int,input().split())\na=np.array([ list(input()) for i in range(h)])\ncount=0\nd_w=[]\nd_h=[]\nfor i in range(0,h):\n count=0\n for j in range(0,w):\n if a[i][j]==".":\n count+=1\n if count==w:\n d_w.append(i)\nfor i in range(0,w):\n count=0\n for j in range(0,h):\n if a...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s151397328', 's843931920', 's159158290']
[13056.0, 13136.0, 12528.0]
[165.0, 168.0, 164.0]
[428, 428, 436]
p03273
u026155812
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H, W = map(int, input().split())\na = []\nfor i in range(H):\n s = input()\n if s != '.'*W:\n a.append(s)\nls = []\nfor i in range(W):\n b = ''\n for j in range(len(a)):\n b += a[j][i]\n if b == '.'*len(a):\n ls.append(i)\nans = []\nfor i in range(W):\n s = ''\n for j in rang...
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Time Limit Exceeded', 'Runtime Error', 'Accepted']
['s136415172', 's730866041', 's741332823', 's921595543', 's957276121', 's966704207']
[3064.0, 3064.0, 3064.0, 79896.0, 3064.0, 3064.0]
[22.0, 22.0, 17.0, 2108.0, 17.0, 22.0]
[431, 432, 435, 366, 373, 432]
p03273
u038027079
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w = map(int, input().split())\na = [''] * h\nprint(a)\nfor i in range(h):\n a[i] = input()\n\nrow = [False] * h\ncol = [False] * w\nfor i in range(h):\n for j in range(w):\n if a[i][j] == '#':\n row[i] = True\n col[j] = True\n\nfor i in range(h):\n if row[i]:\n for j in ...
['Wrong Answer', 'Accepted']
['s829080543', 's493729271']
[4468.0, 4468.0]
[30.0, 30.0]
[391, 382]
p03273
u039189422
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w=map(int,input().split())\na=[list(input().split()) for _ in range(h)]\n\n\nfor i in range(w):\n\ttmp=0\n\tfor j in range(h):\n\t\tif a[j][i]=="#":\n\t\t\ttmp=1\n\tif tmp==0:\n\t\tfor j in range(h):\n\t\t\ta[j][i]="0"\n\n\nfor i in range(h):\n\tif not "#" in a[i][:]:\n\t\ta[i][:]=[0]*w\n\nfor i in range(h):\n\ttmp...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s294626577', 's648028464', 's844294583', 's381375566']
[3064.0, 3064.0, 3064.0, 3192.0]
[18.0, 18.0, 18.0, 25.0]
[455, 453, 477, 525]
p03273
u059262067
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['import numpy as np\n\na1, a2 = map(int, input().split())\nmx = [[list(i) for i in input().split()] for i in range(a1)]\nmx = np.reshape(mx,-1)\nmx = [0 if i == \'.\' else 1 for i in mx]\nmx = np.reshape(mx,[a1,a2])\n\nw = min(np.append(sum(mx,1),sum(mx,0)))\n\nwhile w == 0:\n mx = mx[np.sum(mx,1) > 0]\n mx = mx...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s267398998', 's837156902', 's367301859']
[12672.0, 12700.0, 12692.0]
[163.0, 158.0, 162.0]
[418, 449, 443]
p03273
u064408584
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w=map(int, input().split())\ns = [list(input()) for i in range(h)]\nfor i in s:print(i)\ns=[i for i in s if '#' in i]\ncount=0\nwhile count<len(s[0]):\n check=0\n for i in s:\n if i[count]=='#':\n check=1\n if check==0:\n for i in s:\n i.pop(count)\n else:count+=1\nfo...
['Wrong Answer', 'Accepted']
['s161197290', 's033343256']
[3188.0, 3064.0]
[22.0, 18.0]
[330, 310]
p03273
u064434060
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w=map(int,input().split())\na=[input() for _ in range(h)]\n\nres=[]\nfor i in range(h):\n if "#" not in a[i]:\n res.append(i)\nfor i in res:\n a.pop(i)\nres=[]\nh=len(a)\nfor i in range(w):\n for j in range(len(a)):\n if a[j][i]=="#":\n break\n else:\n res.append(j)\nfor i in res:\n ...
['Runtime Error', 'Accepted']
['s930497085', 's080294976']
[3700.0, 4468.0]
[23.0, 29.0]
[377, 401]
p03273
u066551652
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h, w = map(int,input().split())\n\nA = [list(input()) for _ in range(h)]\n\nrow = [False] * h\ncol = [False] * w\n\nfor i in range(h):\n for j in range(w):\n if A[i][j] == '#':\n row[i] = True\n col[j] = True\n\nfor i in range(h):\n if row[i]:\n for j in range(w):\n ...
['Wrong Answer', 'Accepted']
['s578917917', 's778158126']
[9324.0, 9304.0]
[33.0, 33.0]
[355, 318]
p03273
u076512055
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["def transpose(A):\n B = []\n for j in range(len(A[0])):\n C = [A[i][j] for i in range(len(A))]\n B.append(C)\n return B\n\nH, W = map(int, input().split())\nA = [list(input()) for _ in range(H)]\n\nfor i in reversed(range(H)):\n if A[i] == ['.']*W:\n A.pop(i)\n \nH = len(A) ...
['Wrong Answer', 'Accepted']
['s163026008', 's624896907']
[3828.0, 4596.0]
[22.0, 23.0]
[452, 460]
p03273
u077019541
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H,W = map(int,input().split())\nahw = [strlist for strlist in [[s for s in input()] for i in range(H)] if "#" in strlist]\ntenti = []\nfor h in range(H-1):\n m = [ah for ah in ahw[h]]\n if "#" in m:\n tenti.append(m)\nfor ahwnum in range(len(ahw)):\n print("".join([num for num in tenti[ahwnum]]))', 'H,W...
['Runtime Error', 'Accepted']
['s872911436', 's097630252']
[3188.0, 3188.0]
[20.0, 21.0]
[303, 301]
p03273
u084357428
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w = map(int,input().split())\na = [list(input()) for i in range(h)]\nb = [x for x in a if '#' in x]\nc = zip(*[y for y in zip(*b) if '#' in y])\nfor d in c:\n print(d)", "h,w = map(int,input().split())\na = [list(input()) for i in range(h)]\nb = [x for x in a if '#' in x]\nc = zip(*[y for y in zip(*b) if '#' in ...
['Wrong Answer', 'Accepted']
['s643683954', 's728488864']
[3188.0, 3188.0]
[19.0, 18.0]
[167, 176]
p03273
u094191970
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['N = int(input())\nans = 0\nfor i in range(1,N+1,2):\n cnt = 0\n for n in range(1,N+1,2):\n if n%i == 0:\n cnt += 1\n if cnt == 8:\n ans += 1\nprint(ans)', ",w=input().split()\na=[list(input()) for i in range(int(h))]\n\nl1=[i for i in a if '#' in i]\nl2=[i for i in zip(*l1) if '#' in...
['Runtime Error', 'Runtime Error', 'Accepted']
['s319975514', 's436822752', 's336137244']
[3060.0, 2940.0, 9136.0]
[17.0, 17.0, 32.0]
[177, 168, 148]
p03273
u095021077
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["import numpy as np\n\nH, W=map(int, input().split())\nmatrix=np.zeros((H, W))\n\nfor i in range(H):\n s=input()\n for j in range(W):\n if s[j]=='#':\n matrix[i, j]=1\n \nfor i in range(H):\n if np.sum(matrix[i, :]==0)==W:\n matrix[i, :]=-1\n \nfor i in range(W):\n if np.sum(matrix[:, i]==0)==H:...
['Wrong Answer', 'Accepted']
['s761807466', 's784596512']
[13904.0, 21432.0]
[190.0, 294.0]
[581, 571]
p03273
u095756391
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H, W = map(int, input().split())\n\na = [input() for i in range(H)]\n\nrow = [False] * H\ncol = [False] * W\n\nfor i in range(H):\n for j in range(W):\n if a[i][j] == '#':\n row[i] = True\n col[j] = True\n\n \nfor i in range(H):\n if row[i]:\n for j in range(W):\n if col[j]:\n print...
['Wrong Answer', 'Accepted']
['s328727745', 's297068418']
[4468.0, 4468.0]
[30.0, 31.0]
[319, 331]
p03273
u098012509
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H, W = [int(x) for x in input().split()]\nA = [input().strip() for _ in range(H)]\n\nB = []\nfor i in range(H):\n if "#" in A[i]:\n B.append(A[i])\n\nans = []\nfor j in range(W):\n for i in range(len(B)):\n if "#" == B[i][j]:\n ans.append(j)\n break\n\nfor i in range(len(B))...
['Wrong Answer', 'Accepted']
['s978310952', 's485096093']
[9172.0, 9088.0]
[31.0, 28.0]
[382, 370]
p03273
u103902792
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w = map(int,input().split())\nmaze = []\nfor _ in range(h):\n s = input()\n if s != '.'*w:\n maze.append(s)\nh = len(maze)\nskip = []\nfor j in range(w):\n for i in raneg(h):\n if maze[i][j] == '#':\n break\n else:\n skip.append(j)\n\nfor i in range(h):\n for j in range(w):\n if j not in skip:...
['Runtime Error', 'Accepted']
['s050648884', 's805158826']
[3064.0, 4468.0]
[17.0, 29.0]
[343, 345]
p03273
u107269063
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['import numpy as np\n\nh, w = map(int,input().split())\ngrid = np.array([list(input()) for _ in range(h)], dtype="U1") \n\nrow = []\ncol = []\n\nfor i in range(h):\n if (grid[i] != ".").any():\n row.append(i)\n\ntrans_grid = np.transpose(grid)\n\nfor i in range(w):\n if (trans_grid != ".").any():\n ...
['Wrong Answer', 'Accepted']
['s098122455', 's413092737']
[15272.0, 12540.0]
[169.0, 155.0]
[527, 530]
p03273
u111508936
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["import numpy as np\nimport math\n\n\nH, W = map(int, input().split())\n\nA = np.zeros((H, W), dtype=int)\n\nfor h in range(H):\n ah = input()\n for w in range(W):\n if ah[w] == '.':\n A[h][w] = 0\n else:\n A[h][w] = 1\n\n# print(A)\nremH = []\nremW = []\n \nfor h i...
['Wrong Answer', 'Accepted']
['s721554171', 's853518540']
[21640.0, 14280.0]
[1291.0, 180.0]
[964, 966]
p03273
u128740947
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h, w = map(int, input().split())\na = []\nfor i in range(h):\n A = list(map(str,input().split()))\n a.append(A)\nkesu = []\nfor i in range(h):\n b = str(a[i])\n ten = 0\n for l in range(w):\n if b[l+2] == ",":\n ten += 1\n if w == ten :\n kesu.append(i)\nfor i in range(len(ke...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s004781812', 's314010964', 's767573217']
[3188.0, 3188.0, 3188.0]
[41.0, 41.0, 42.0]
[987, 952, 986]
p03273
u136843617
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H,W = map(int, input().split())\nmap =[]\nfor _ in range(H):\n a = list(input())\n map.append([int(x !=\'.\') for x in a ])\nmemo = []\nfor i in range(H):\n if sum(map[i]) == 0:\n memo.append(i)\nwhile memo:\n del map[memo[-1]]\n del memo[-1]\n H -= 1\nfor j in range(W):\n color = [map[x...
['Wrong Answer', 'Accepted']
['s394496529', 's516024469']
[3828.0, 3188.0]
[24.0, 21.0]
[538, 546]
p03273
u139880922
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w= map(int,input().split())\nl = list()\nm = 0\nfor i in range(h):\n c = input()\n if "#" in c:\n b = [ w for w in range(len(c)) if c[w] == "#" ]\n l.append(b)\n if m < max(b) : m = max(b)\np = list()\nfor i in range(m) :\n for j in l:\n if i in j: break\n else:\n p.append(i)\nfor j in range(len(...
['Wrong Answer', 'Accepted']
['s972012791', 's243869101']
[3316.0, 3188.0]
[30.0, 30.0]
[587, 578]
p03273
u151625340
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["import numpy as np\nH, W = map(int, input().split())\na = []\nfor i in range(H):\n a_l = input()\n a.append([c for c in a_l])\n\n\nfor i in range(H):\n for j in range(W):\n if a[i][j] == '.':\n a[i][j] = 1\n elif a[i][j] == '#':\n a[i][j] = 0\n else:\n pa...
['Wrong Answer', 'Accepted']
['s405492674', 's313883294']
[14048.0, 14052.0]
[186.0, 184.0]
[783, 734]
p03273
u152638361
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H, W = map(int,input().split())\na=[list(input()) for i in range(H)]\n#yoko\nfor i in range(1,H):\n if a[-i]==["."]*W:\n a.pop(-i)\na_t = tenchi(a)\nfor i in range(1,len(a_t)):\n if a_t[-i]==["."]*len(a):\n a_t.pop(-i)\nans = tenchi(a_t)\nfor i in range(len(ans)):\n ansa = "".join(ans[i])\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s255862285', 's454685268', 's990557242', 's930219158']
[3064.0, 3188.0, 3064.0, 3316.0]
[18.0, 20.0, 18.0, 21.0]
[498, 495, 492, 495]
p03273
u155687575
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["import numpy as np\nh, w = map(int, input().split())\nfield = []\nfor _ in range(h):\n row = list(input())\n field.append(row)\nfield = np.array(field)\n\n\ndeleterow = []\ndeleteline = []\nfor i in range(field.shape[0]):\n if len(set(field[i,:]))==1:\n deleterow.append(i)\nfor j in range(field.shape[...
['Wrong Answer', 'Accepted']
['s284625692', 's340866561']
[13688.0, 13692.0]
[172.0, 174.0]
[568, 564]
p03273
u155828990
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['import numpy as np\n\nh,w=map(int,input().split())\ntmp=[]\nfor i in range(h):\n a=list(input())\n tmp.append(a)\nans1=[]\nif(w!=1):\n for i in range(h):\n if(len(set(tmp[i]))==1):\n ans1.append(i)\nans2=[]\ntmp=list(map(list,zip(*tmp)))\nif(h!=1)\n for i in range(w):\n if...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s096171451', 's138042170', 's777390729', 's463941555']
[3060.0, 3060.0, 2940.0, 13880.0]
[18.0, 17.0, 17.0, 170.0]
[565, 565, 605, 604]
p03273
u174434198
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H, W = map(int, input().split())\na = [list(input()) for i in range(H)]\nfor i in range(H):\n for j in range(W):\n print(a[i][j], end='')\n print('')\ncntH = 0\nfor i in range(H-1, 0, -1):\n flag = True\n for j in range(W):\n if a[i][j] == '#':\n flag = False\n break\n ...
['Wrong Answer', 'Accepted']
['s374285639', 's359722901']
[4724.0, 4596.0]
[41.0, 29.0]
[645, 561]
p03273
u175590965
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w = map(int,input().split())\na = [[i for i in input()] for _ in range(h)]\nb = [x for in a if "#" in x]\nc = zip(*[x for x in zip(*b) if "#"in x])\nfor d in c:\n print("".join(d))', 'h,w = map(int,input().split())\na = [[i for i in input()] for _ in range(h)]\nb = [x for x in a if "#" in x]\nc = zip(*[x for x i...
['Runtime Error', 'Accepted']
['s389472688', 's059527416']
[2940.0, 3188.0]
[18.0, 18.0]
[180, 182]
p03273
u185037583
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w=map(int,input().split())\na=[]\nfor i in range(h):\n tmp=input()\n if len(tmp)!=tmp.count('.'):\n a.append(tmp)\n else:\n h-=1\n \na=list(zip(*a))\nfor i in range(w):\n if len(a[i])==a[i].count('.'):\n del a[i]\n w-=1\n i-=1\n \na=list(zip(*a))\nfor i in range(h):\n print(a[i])\n \n...
['Runtime Error', 'Accepted']
['s462558093', 's121018714']
[3188.0, 4468.0]
[19.0, 30.0]
[298, 373]
p03273
u186838327
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h, w = map(int, input().split())\na = ['']*h\nfor i in range(h):\n a[i] = input()\n \nrow = [False] * h\ncol = [False] * w\n\nfor i in range(h):\n for j in range(w):\n if a[i][j] == '#':\n row[i] = True\n col[j] = True\n\nfor i in range(h):\n if row[i]:\n for j in range...
['Wrong Answer', 'Accepted']
['s373234520', 's243597648']
[3700.0, 3064.0]
[31.0, 20.0]
[371, 432]
p03273
u192541825
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w=map(int,input().split())\na=[\'\']*h\nfor i in range(h):\n a[i]=input()\n\nrow=[False]*h\ncol=[False]*w\n\nfor i in range(h):\n for j in range(w):\n if a[i][j]=="#":\n raw[i]=True\n col[j]=True;\n\nfor i in range(h):\n if raw[i]:\n for j in range(w):\n if co...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s192097242', 's299095089', 's466299024', 's126535765']
[3064.0, 3064.0, 3064.0, 4468.0]
[19.0, 19.0, 19.0, 30.0]
[359, 359, 359, 359]
p03273
u199290844
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w = [int(i) for i in input().split(' ')]\na = [list(input()) for i in range(h)]\n\n\nb = [i for i in a if not i.count('.') == w]\nfor i in b:\n print(''.join(i))\n\nh2 = len(b)\nw2 = len(b[0])\nret = []\nfor i in range(w2):\n for x in range(h2):\n if b[x][i] == '#':\n ax = [b[xx][i] for xx i...
['Wrong Answer', 'Accepted']
['s823431967', 's496865229']
[3316.0, 3188.0]
[21.0, 20.0]
[495, 461]
p03273
u202570162
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['l = [int(i) for i in input().split()]\nprint(l[0]-l[1]+1)', "h,w = map(int,input().split())\n\nm = []\n\nfor i in range(h):\n m.append(list(input()))\n\n\n\ndl = []\n\nfor i in range(h):\n if all(j =='_' for j in m[i]):\n dl.append(int(i))\n\nfor i in dl:\n del m[i]\n\n\n\nm = list(zip(*m)) \n\ndl = [...
['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s176076243', 's675961743', 's717176054', 's623140161']
[2940.0, 3188.0, 3188.0, 3188.0]
[17.0, 18.0, 21.0, 21.0]
[56, 496, 624, 977]
p03273
u204616996
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H,W=map(int,input().split())\nA=[list(input())for i in range(H)]\nww=set()\nhh=set()\nfor h in range(H):\n for w in range(W):\n if A[h][w]=='#':\n ww.add(w)\n hh.add(h)\nprint(ww,hh)\nww=sorted(list(ww))\nfor h in sorted(list(hh)):\n _=''\n for w in ww:\n _+=A[h][w]\n print(_)", "H,W=map(int,input...
['Wrong Answer', 'Accepted']
['s987575788', 's055875162']
[3188.0, 3188.0]
[23.0, 23.0]
[282, 269]
p03273
u207799478
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['import math\n\n\ndef readints():\n return list(map(int, input().split()))\n\n\ndef nCr(n, r):\n return math.factorial(n)//math.factorial(n-r)*math.factorial(r)\n\n\nh, w = map(int, input().split())\na = [None]*h\nprint(a)\nfor i in range(h):\n a[i] = str(input())\nprint(a)\nx = [None]*h\ny = [None]*w\nprint(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s078960449', 's127273941', 's552724165']
[4084.0, 4084.0, 4468.0]
[32.0, 31.0, 31.0]
[597, 592, 604]
p03273
u216289806
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['HW = input()\nmasu = "none"\nhw = HW.split()\n\nAdata = []\nfor lop in range(int(hw[0])):\n A = input()\n Adata.append(A)\n\nx = []\ny = []\nbuf = ""\nfor lop in range(int(hw[0])):\n if str(Adata[lop]).find(".") == -1 or str(Adata[lop]).find("#") == -1:\n x.append(lop)\n \nfor lop in range(int(hw[1...
['Wrong Answer', 'Accepted']
['s716723793', 's764109110']
[3188.0, 3188.0]
[24.0, 23.0]
[784, 749]
p03273
u218843509
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h, w = map(int, input().split())\na = [input() for _ in range(h)]\nans_w = []\nans_h = []\nfor i in range(h):\n for j in range(w):\n if a[i][j] == "#":\n break\n else:\n ans_h.append(i)\nfor j in range(w):\n for i in range(h):\n if a[i][j] == "#":\n break\n else:\n ans_w.append(j)\n\nfor i i...
['Wrong Answer', 'Accepted']
['s582433984', 's770242155']
[4468.0, 4340.0]
[24.0, 25.0]
[352, 339]
p03273
u223646582
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H,W=map(int,input().split())\na=[list(map(str, input())) for _ in range(H)]\n\nc=[]\nfor li in a:\n print(li)\n if li!=['.']*len(li):\n c.append(li)\n\nb=[]\nfor lc in zip(*c):\n if lc!=('.',)*len(lc):\n b.append(lc)\n\nfor ld in zip(*b):\n print(''.join(ld))\n\n\n\n\n", "H,W=map(int,input()...
['Wrong Answer', 'Accepted']
['s986316064', 's213937341']
[3316.0, 3188.0]
[20.0, 21.0]
[275, 261]
p03273
u223904637
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w=map(int,input().split())\nl=[]\nfor i in range(h):\n l.append(list(input()))\nwl=[]\nfor i in range(h):\n wf=0\n for j in range(w):\n if l[i][j]=='.':\n wf+=1\n if wf<w:\n wl.append(i)\n \nhl=[]\nfor i in range(w):\n hf=0\n for j in range(h):\n if l[j][i]=='.':...
['Runtime Error', 'Runtime Error', 'Accepted']
['s410062918', 's750980425', 's817393387']
[3064.0, 4596.0, 4596.0]
[17.0, 31.0, 43.0]
[427, 426, 426]
p03273
u224554402
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["p,q= input().split()\na,b =(int(p), int(q))\na_list = []\ncount_row = 0\nfor i in range(a):\n c = input()\n \n if c == '.'*b:\n count_row+=1\n else:\n a_list.append(c)\nfor i in range(b):\n count_clm = 0\n \n for j in range(a-count):\n if a_list[j][i] == '.':\n cou...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s279804925', 's715232575', 's585536318']
[3064.0, 3064.0, 3064.0]
[18.0, 22.0, 23.0]
[520, 596, 616]
p03273
u227082700
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w=map(int,input().split());b=[input()for i in range(h)];a=[]\nfor i in b:\n if i!="."*w:a.append(i)\nb=[]\nfor i in range(w):\n s=""\n for j in a:s+=j[i]\n if s!="."*len(a):b.append(s)\nfor i in b:print(i)', 'h,w=map(int,input().split());b=[input()for i in range(h)];a=[]\nfor i in b:\n if i!="."*w:a.insert(0,i...
['Wrong Answer', 'Accepted']
['s400178465', 's730336370']
[3064.0, 3064.0]
[20.0, 20.0]
[203, 262]
p03273
u227085629
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w = map(int,input().split())\na_list = [input() for nesya in range(h)]\n\ngyo = [False]*h\nretsu = [False]*w\nfor i in range(h):\n for j in range(w):\n if a_list[i][j] == '#':\n gyo[i] = True\n retsu[j] = True\nfor k range(h):\n if gyo[k]:\n for l in range(w):\n if retsu[l]:\n print(a_...
['Runtime Error', 'Accepted']
['s412351040', 's744214148']
[2940.0, 4468.0]
[17.0, 31.0]
[335, 338]
p03273
u230117534
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H, W = map(int, input().strip().split(" "))\n\nrow = []\nfor i in range(H):\n line = input()\n if line.count(".") == W:\n continue\n row.append(line)\n\nprint(row)\nrow_count = len(row)\nans = [[] for i in range(row_count)]\nfor i in range(W):\n tmp = []\n for j in range(row_count):\n tmp...
['Wrong Answer', 'Accepted']
['s100628208', 's557142380']
[3188.0, 3064.0]
[21.0, 22.0]
[494, 483]
p03273
u238084414
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H, W = map(int, input().split())\nX = []\nres = []\nF = [True] * W\n\nfor i in range(H):\n x = list(input())\n \n if x.count("#") != 0:\n X.append(x)\n\n for j in range(W):\n if x[j] == "#":\n F[j] = False\n break\n\nfor k in range(len(X)):\n r = ""\n for l in range(W):\n if not F[l]:\n ...
['Wrong Answer', 'Accepted']
['s634861817', 's447979964']
[3064.0, 3064.0]
[21.0, 22.0]
[324, 312]
p03273
u249727132
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H, W = map(int, input().split())\na = [""] * H\nfor i in range(H):\n a[i] = input()\nrow = [False] * H\ncol = [False] * W\nfor i in range(H):\n for j in range(W):\n if a[i][j] == "#":\n row[i] = True\n col[i] = True\nfor i in range(H):\n if row[i]:\n for j in range(W):\n ...
['Runtime Error', 'Accepted']
['s581631726', 's548344078']
[4468.0, 4468.0]
[31.0, 31.0]
[381, 319]
p03273
u252828980
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['import numpy as np\nH,W = map(int,input().split())\nL = []\nfor i in range(H):\n L.append(list(input()))\nL = np.array(L)\nL = [x for x in L if "#" in x]\nL = np.rot90(L)\nL = [x for x in L if "#" in x]\nL = np.rot90(L,3)\n\nfor i in range(len(L)):\n print(*L[i])', 'h,w = map(int,input().split())\nL = []\nfor i...
['Wrong Answer', 'Accepted']
['s568635450', 's562781637']
[13160.0, 4596.0]
[162.0, 22.0]
[257, 246]
p03273
u252964975
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['def rotate(mat):\n mat2 = []\n for i in range(len(mat[0])):\n s = ""\n for k in range(len(mat)):\n s = s + mat[k][i]\n mat2.append(s)\n return mat2\n\nH,W=map(int, input().split())\nmat = []\nfor i in range(H):\n a = input()\n if "#" in a:\n mat.append(a)\n\nfor count in range(H+W):\n for i in ...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s121898299', 's236663893', 's251473932', 's700042128', 's852391309', 's515512918']
[3188.0, 3060.0, 3060.0, 2940.0, 3064.0, 3064.0]
[401.0, 17.0, 2104.0, 17.0, 395.0, 391.0]
[522, 163, 253, 656, 492, 537]
p03273
u274644863
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h, w = map(int, input().split())\n\na = [list(input()) for i in range(h)]\n\nrow = [False]*h\ncol = [False]*w\n\nfor i in range(h):\n for j in range(w):\n if a[i][j] == '#':\n row[i] = True\n col[j] = True\n\nfor i in range(h):\n if row[i]:\n for j in range(w):\n i...
['Wrong Answer', 'Accepted']
['s755403949', 's858382235']
[4212.0, 4468.0]
[33.0, 31.0]
[371, 362]
p03273
u281303342
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H,W = map(int,input().split())\nA = []\nfor i in range(H):\n a = input()\n A.append(a)\n\nansW,ansH = [],[]\nfor hi in range(H):\n for wi in range(W):\n if A[hi][wi] == "#":\n break\n else:\n ansH.append(hi)\nfor wi in range(W):\n for hi in range(H):\n if A[hi][wi] == "#...
['Wrong Answer', 'Accepted']
['s846953849', 's870215527']
[3064.0, 3064.0]
[22.0, 22.0]
[557, 577]
p03273
u288430479
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w = map(int,input().split())\nl = list(list(input()) for i in range(h))\nfor i in l:\n if i.count(\'.\') ==w:\n i.clear()\n l.remove([])\nt = len(l)\n#print(l)\nfor i in range(w):\n if all (l[q][i]=="." for q in range(t)):\n for q in range(t):\n l[q][i] =""\nfor z in range(t):\n l[z].remove("")\npr...
['Runtime Error', 'Accepted']
['s957848144', 's231049780']
[3188.0, 3064.0]
[20.0, 18.0]
[311, 349]
p03273
u294385082
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['import numpy as np\nh,w = map(int,input().split())\na = [input() for i in range(h)]\nd = "."\nc = 0\n\nfor i in range(h):\n if len(set(a[i])) == 1 and a[i][0] == d:\n a.remove(a[i])\n\nat = np.array(a)\ntr = at.T\n\nfor i in range(w):\n if len(set(tr[i])) == 1 and tr[i][0] == d:\n a.remove(tr[i])\n \natt =...
['Runtime Error', 'Accepted']
['s375231760', 's836485798']
[12520.0, 12540.0]
[151.0, 155.0]
[379, 344]
p03273
u300968187
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H, W = map(int, input().split())\nmat = [list(map(lambda x: 0 if x == '#' else 1, input())) for _ in range(H)]\nprint((H - sum(all(row) for row in mat)) * (W - sum(all(row) for row in zip(*mat))))", "h, k = map(int, input().split())\nmat = [input() for _ in range(h)]\nfor _ in range(2):\n poplist = []\n for i,...
['Wrong Answer', 'Accepted']
['s165722605', 's616740024']
[3060.0, 3188.0]
[19.0, 18.0]
[194, 403]
p03273
u305965165
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H, W = (int(i) for i in input().split())\ne = [input() for i in range(H)] \n\nnew_e = []\nfor row in e:\n if row.count("#") > 0:\n new_e.append(row)\n\nnot_use_col = list(range(W))\nuse_col = []\nfor row in new_e:\n for col in not_use_col:\n if row[col] == "#":\n use_col.append(not_use_...
['Runtime Error', 'Accepted']
['s756153108', 's182056776']
[3060.0, 3064.0]
[19.0, 27.0]
[425, 401]
p03273
u306033313
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['/* ex5_3\n Graku */\n#include<stdio.h>\n\nint main(void) {\n int height, width;\n scanf("%d %d", &height, &width);\n char matrix[height][width];\n for (int row = 0; row < height; ++row) {\n for (int col = 0; col < width; ++col) {\n scanf(" %c", &matrix[row][col]); //don\'t read "\\...
['Runtime Error', 'Accepted']
['s502680472', 's031563770']
[2940.0, 3188.0]
[17.0, 22.0]
[1360, 662]
p03273
u310431893
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H, W = input().split()\nH = int(H)\nW = int(W)\n\na = [input() for i in range(W)]\n\na = [i for i in a if "#" in i]\nb = ["".join([for a[i]]) for i in range(H) for j in a]\nb = [i for i in b if "#" in i]\n\na = ["".join([for a[i]]) for i in range(len(b)) for j in b]\n\nfor i in a:\n print(i)', 'H, W = tuple(int(i) f...
['Runtime Error', 'Accepted']
['s093752069', 's310659058']
[2940.0, 3064.0]
[17.0, 19.0]
[280, 278]
p03273
u327532412
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H, W = map(int, input().split())\nG = [list(input()) for _ in range(H)]\nv = [g for g in G if g.count('.') != W]\nprint(v)\nfor i in reversed(range(W)):\n chk = True\n for vv in v:\n if vv[i] == '#':\n chk = False\n break\n if chk:\n for vv in v:\n vv.pop(i)\nfo...
['Wrong Answer', 'Accepted']
['s314985211', 's663175817']
[3316.0, 3064.0]
[19.0, 19.0]
[338, 329]
p03273
u330799501
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['#k = int(input())\n#s = input()\n#a, b = map(int, input().split())\n#s, t = map(str, input().split())\n#l = list(map(int, input().split()))\n\n#a = [list(input()) for _ in range(n)]\n\nh,w = map(int, input().split())\na = [input() for _ in range(h)]\n\ny = [False] * h\nx = [False] * w\n\nfor i in range(h):\n for j...
['Runtime Error', 'Accepted']
['s034790176', 's286851934']
[9132.0, 9140.0]
[34.0, 38.0]
[587, 587]
p03273
u339523379
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['import numpy as np\n\nH,W=map(int,input().split())\nfield=[list(input()) for i in range(H)]\n\nfield=[i for i in field if "#" in i]\n\nfield=np.array(field)\n#print(field)\n\nfield=np.rot90(field,k=1)\nfield=field.tolist()\n\nfield=[i for i in field if "#" in i]\n\nfield=np.rot90(field,k=-1)\nfield=field.tolist()\n\n...
['Wrong Answer', 'Accepted']
['s722111219', 's054901135']
[12644.0, 12536.0]
[154.0, 149.0]
[312, 351]
p03273
u342051078
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H,W = map(int,input().split())\ntmp = True\nA = []\nB = []\nfor i in range(H):\n a = list(input())\n if a != [\'.\']*W:\n A.appned(a)\nfor i in range(W):\n cnt = 0\n for j in range(len(A)):\n if A[j][i] != \'.\':\n cnt += 1\n if cnt == 0:\n B.insert(0,i)\nfor i in range(...
['Runtime Error', 'Accepted']
['s085308202', 's458427020']
[3064.0, 3188.0]
[17.0, 19.0]
[423, 412]
p03273
u346395915
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H,W = map(int,input().split())\n\nmatrix = [list(map(int,input().replace("#", "1").replace(".","0"))) for _ in range(H)]\n\nans = []\ntemp = []\n\nfor row in matrix:\n if sum(row) != 0:\n ans.append(row)\n\nfor row in zip(*ans):\n temp.append(row)\n\nans = []\nfor row in temp:\n if sum(row) != 0:\n ...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s216249768', 's501456558', 's361161851']
[3956.0, 3956.0, 3188.0]
[25.0, 25.0, 22.0]
[523, 831, 839]
p03273
u347397127
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w=map(int,input().split())\nA=[list(input()) for i in range(w)]\nansw=[]\nansh=[]\nfor i in range(w):\n if not all([a=="." for a in A[i]]):\n answ.append(i)\nfor j in range(h):\n if not all([A[i][j]=="." for i in range(w)]):\n ansh.append(j)\nfor i in answ:\n for j in ansh:\n print(A[i][j],end="")\n pr...
['Runtime Error', 'Accepted']
['s971294344', 's404416339']
[9192.0, 9240.0]
[37.0, 28.0]
[319, 312]
p03273
u348285568
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w=map(int,input().split())\ngrid=[list(input()) for i in range(h)]\ntag=[]\nfor i in range(w):\n a=[grid[j][i] for j in range(h)]\n if not "#" in a:tag.append(i)\nfor i in tag[::-1]:\n for j in range(h):\n grid[j].pop(i)\nfor i in grid:\n if "#" in i:print(*i)\n ', 'h,w=map(int,input().sp...
['Wrong Answer', 'Accepted']
['s300760490', 's574147732']
[3828.0, 4596.0]
[22.0, 22.0]
[281, 220]
p03273
u366959492
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w=map(int,input().split())\nl=[]\nn=0\nm=0\ncou=0\nfor i in range(h):\n x=input()\n if x==("."*w):\n cou+=1\n continue\n l.append(list(x))\nfor i in range(w):\n k=0\n for j in range(h-cou-1):\n if l[j][i]=="#":\n break\n else:\n k+=1\n if k==h-cou:...
['Wrong Answer', 'Accepted']
['s855883930', 's652564680']
[3064.0, 3188.0]
[19.0, 24.0]
[419, 614]
p03273
u369752439
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H, W = list(map(int, input().strip().split(" ")))\n\nfield = []\nhist = [0 for w in range(W)]\n\ndef shrink():\n newField = []\n for h in range(H):\n line = []\n for w in range(W):\n if(hist[w] != H):\n line.append(field[h][w])\n newField.append(line) \n ...
['Wrong Answer', 'Accepted']
['s038985136', 's477390051']
[3188.0, 3188.0]
[22.0, 22.0]
[607, 617]
p03273
u371132735
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H,W = map(int,input().split())\nA = [input() for i in range(H)]\nlow = [False]*H\ncol= [False]*W\nfor l in range(H):\n for c in range(W):\n if A[l][c] == "#":\n low[l] = True\n col[c] = True\nfor l in range(H):\n if low[l] ==True:\n for c in range(W):\n if col[c]==...
['Wrong Answer', 'Accepted']
['s920546113', 's570026506']
[4468.0, 4596.0]
[31.0, 32.0]
[362, 396]
p03273
u371467115
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w=map(int,input().split())\na=[input() for i in range(h)]\n\nprint(a)\n\nfor j in a:\n if '#' not in j:\n a.remove(j)\n h-=1\n \nprint(a)\n \nb=[]\n\nfor k in range(w):\n c=''\n for l in range(h):\n c+=a[l][k]\n b.append(c)\n\nfor m in b:\n if '#' not in m:\n b.remove(m)\n w-=1\n \nprint...
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s216518793', 's327879980', 's807269487', 's287600265']
[3572.0, 3188.0, 3064.0, 4596.0]
[28.0, 23.0, 24.0, 21.0]
[372, 454, 341, 209]
p03273
u373958718
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w=map(int,input().split())\ns=[list(input())for i in range(h)]\nl=[x for x in s if '#' in x]\nans=[]\nfor i in zip(*l):\n if '#' in i:ans.append(i)\nfor x in ans:\n print(''.join(x))", "h,w=map(int,input().split())\ns=[list(input())for i in range(h)]\nl=[x for x in s if '#' in x]\nans=[]\nfor i in zip(*l):\n if ...
['Wrong Answer', 'Accepted']
['s961253455', 's493155638']
[3188.0, 3188.0]
[18.0, 18.0]
[179, 191]
p03273
u375695365
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w=map(int,input().split())\na=[[0 for _ in range(h)] for _ in range(w)]\nans=[]\nprint(a)\nfor i in range(h):\n b=list(input())\n if \'#\' in b:\n for j in range(w):\n a[j][i]=b[j]\n\n #print(a[i])\nc=0\nfor i in range(0-c,w-c):\n if \'#\' not in a[i]:\n for j in range(h):\n ...
['Wrong Answer', 'Accepted']
['s511311385', 's515637768']
[4724.0, 4596.0]
[34.0, 33.0]
[503, 530]
p03273
u384679440
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H, W = map(int, input().split())\na = [input() for _ in range(H)]\nrow = [False] * H\ncol = [False] * W\nfor i in range(len(row)):\n for j in range(len(col)):\n if a[i][j] == '#':\n row[i] = col[j] = True\n\nfor i in range(len(row)):\n if row[i]:\n for j in range(len(col)):\n if col[j]:\n pri...
['Wrong Answer', 'Accepted']
['s826784626', 's776804265']
[3996.0, 4468.0]
[29.0, 30.0]
[332, 338]
p03273
u390883247
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H,W = map(int,input().split())\nData1 = []\n\nfor _ in range(H):\n Data1.append(s)\n\nhdata = {}\nwdata = {}\n\nfor h in range(H):\n for w in range(W):\n if Data1[h][w] == '#':\n hdata.add(h)\n wdata.add(w)\n\nfor h in range(H):\n for w in range(W):\n if h in hdata or w in...
['Runtime Error', 'Accepted']
['s222418305', 's644221899']
[3064.0, 4468.0]
[17.0, 33.0]
[345, 434]
p03273
u393512980
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["H, W = map(int, input().split())\nf = [input() for _ in range(H)]\nwhile True:\n flag = False\n for y in range(H):\n if '#' not in f[y]:\n del f[y]\n H -= 1\n flag = True\n break\n for x in range(W):\n for y in range(H):\n if f[y][x] == '#':\n break\n for y in range(H):\n ...
['Runtime Error', 'Accepted']
['s698004356', 's602329795']
[3064.0, 4596.0]
[18.0, 33.0]
[405, 409]
p03273
u394033362
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['import numpy as np\n\nH,W=map(int,input().split())\na=np.zeros((H,W))\nfor i in range(H):\n tmp = input()\n for j in range(W):\n if tmp[j] == "#":\n a[i][j]=1\n\ntmp=[]\nfor i in range(H):\n if np.sum(a[i])==0:\n tmp.append(i)\na = np.delete(a,tmp,0)\n\nh=len(tmp)\n\na = a.T\n\ntmp=[...
['Wrong Answer', 'Accepted']
['s210459468', 's124713462']
[13908.0, 13784.0]
[182.0, 178.0]
[622, 613]
p03273
u395086545
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h, w = map(int, input().split())\n\nmatrix = []\n\nfor i in range(h):\n row = list(input())\n if '#' not in row:\n continue\n else:\n matrix.append(row)\n\nprint(matrix)\nremoved_index = []\n\nfor i in range(len(matrix[0])):\n col = [row[i] for row in matrix]\n if '#' not in col:\n removed_index.append(...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s124128650', 's491044963', 's973979535']
[3316.0, 3316.0, 3060.0]
[19.0, 20.0, 18.0]
[431, 432, 417]
p03273
u396495667
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
["h,w = map(int, input().split())\na = [(_ for _ in input()) for i in range(h)]\nb = [x for x in a if '#' in x]\nc = zip(*[y for y in zip(*b) if '#' in y])\n\nfor d in c:\n print(''.join(d))", "h,w = map(int, input().split())\na = [[j for j in input()]for i in range(h)]\nb = [x for x in a if '#' in x]\nc = zip(*[y for...
['Wrong Answer', 'Accepted']
['s139201676', 's597246294']
[3188.0, 3188.0]
[18.0, 18.0]
[183, 181]
p03273
u403984573
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['H, W = map(int, input().split())\na = [input() for i in range(H)]\nres = [0 for i in range(W)]\nfor i in range(W):\n for j in range(H):\n if a[j][i] != ".":\n break\n res[i] += 1\nfor i in range(H):\n for j in range(W):\n if res[j] != H:\n print(a[i][j],end="")\n print("")', 'H, W = map(int, inp...
['Wrong Answer', 'Accepted']
['s485951540', 's754082376']
[4468.0, 4468.0]
[29.0, 30.0]
[283, 320]
p03273
u410118019
2,000
1,048,576
There is a grid of squares with H horizontal rows and W vertical columns. The square at the i-th row from the top and the j-th column from the left is represented as (i, j). Each square is black or white. The color of the square is given as an H-by-W matrix (a_{i, j}). If a_{i, j} is `.`, the square (i, j) is white; if...
['h,w=map(int,input().split())\na=[]\nfor i in range(h):\n aa=list(input())\n if "#" not in aa:\n continue\n else:\n a.append(aa)\nfor i in range(w):\n c=0\n for j in range(len(a)):\n if a[j][i]=="#":\n c+=1\n if c==0:\n for j in range(len(a)):\n del a[j][i]\nfor i in range(len(a)):\n print...
['Runtime Error', 'Accepted']
['s222048910', 's610860259']
[3064.0, 3188.0]
[19.0, 19.0]
[316, 362]