結果
問題 | No.179 塗り分け |
ユーザー |
![]() |
提出日時 | 2023-05-10 22:35:59 |
言語 | PyPy3 (7.3.11) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,259 bytes |
コンパイル時間 | 1,639 ms |
コンパイル使用メモリ | 87,192 KB |
実行使用メモリ | 77,264 KB |
最終ジャッジ日時 | 2023-08-18 00:56:49 |
合計ジャッジ時間 | 6,683 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge14 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | WA | - |
testcase_01 | AC | 71 ms
71,492 KB |
testcase_02 | WA | - |
testcase_03 | AC | 71 ms
71,376 KB |
testcase_04 | AC | 70 ms
71,536 KB |
testcase_05 | AC | 84 ms
76,308 KB |
testcase_06 | WA | - |
testcase_07 | AC | 74 ms
75,856 KB |
testcase_08 | AC | 100 ms
77,264 KB |
testcase_09 | WA | - |
testcase_10 | AC | 79 ms
76,132 KB |
testcase_11 | AC | 79 ms
76,172 KB |
testcase_12 | TLE | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
testcase_39 | -- | - |
testcase_40 | -- | - |
testcase_41 | -- | - |
testcase_42 | -- | - |
testcase_43 | -- | - |
testcase_44 | -- | - |
testcase_45 | -- | - |
ソースコード
h,w=map(int,input().split()) g=[input() for i in range(h)] cnt=0 for i in range(h): for j in range(w): if g[i][j] == '#': cnt+=1 if cnt ==0: print('NO') exit() for x in range(h): for y in range(w): for xx in range(x,h): for yy in range(y,w): if g[i][j] == '.': continue if x ==xx and y == yy: continue xz = xx-x yz = yy-y f=[[0]*w for i in range(h)] ff=0 for i in range(h): for j in range(w): if g[i][j] == '#' and f[i][j] == 0: if i+xz >= h or j + yz >=w: ff = 1 break if g[i+xz][j+yz] != '#': ff = 1 break f[i+xz][j+yz] = 1 f[i][j] = 1 if ff == 1: break if ff == 0: print('YES') exit() print('NO')