結果

問題 No.455 冬の大三角
ユーザー roarisroaris
提出日時 2019-12-15 21:16:10
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 539 bytes
コンパイル時間 158 ms
コンパイル使用メモリ 10,996 KB
実行使用メモリ 8,416 KB
最終ジャッジ日時 2023-09-15 15:41:40
合計ジャッジ時間 4,204 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
8,140 KB
testcase_01 AC 15 ms
8,164 KB
testcase_02 AC 16 ms
8,208 KB
testcase_03 AC 15 ms
8,200 KB
testcase_04 AC 15 ms
8,152 KB
testcase_05 AC 17 ms
8,236 KB
testcase_06 AC 15 ms
8,116 KB
testcase_07 AC 15 ms
8,172 KB
testcase_08 AC 17 ms
8,224 KB
testcase_09 AC 14 ms
8,240 KB
testcase_10 AC 15 ms
8,232 KB
testcase_11 AC 15 ms
8,164 KB
testcase_12 AC 15 ms
8,312 KB
testcase_13 AC 15 ms
8,200 KB
testcase_14 AC 15 ms
8,316 KB
testcase_15 AC 15 ms
8,284 KB
testcase_16 AC 15 ms
8,152 KB
testcase_17 AC 15 ms
8,320 KB
testcase_18 AC 15 ms
8,116 KB
testcase_19 AC 15 ms
8,248 KB
testcase_20 AC 15 ms
8,328 KB
testcase_21 AC 15 ms
8,304 KB
testcase_22 AC 14 ms
8,276 KB
testcase_23 AC 15 ms
8,264 KB
testcase_24 AC 15 ms
8,164 KB
testcase_25 AC 15 ms
8,136 KB
testcase_26 AC 15 ms
8,144 KB
testcase_27 AC 15 ms
8,244 KB
testcase_28 AC 15 ms
8,124 KB
testcase_29 AC 16 ms
8,348 KB
testcase_30 AC 16 ms
8,212 KB
testcase_31 AC 16 ms
8,336 KB
testcase_32 AC 15 ms
8,308 KB
testcase_33 AC 17 ms
8,416 KB
testcase_34 AC 15 ms
8,172 KB
testcase_35 AC 16 ms
8,236 KB
testcase_36 AC 16 ms
8,272 KB
testcase_37 AC 16 ms
8,156 KB
testcase_38 AC 16 ms
8,208 KB
testcase_39 AC 17 ms
8,272 KB
testcase_40 AC 16 ms
8,192 KB
testcase_41 AC 16 ms
8,368 KB
testcase_42 AC 17 ms
8,264 KB
testcase_43 AC 16 ms
8,228 KB
testcase_44 AC 15 ms
8,324 KB
testcase_45 AC 16 ms
8,364 KB
testcase_46 AC 16 ms
8,184 KB
testcase_47 AC 16 ms
8,268 KB
testcase_48 AC 15 ms
8,284 KB
testcase_49 AC 14 ms
8,260 KB
testcase_50 AC 15 ms
8,152 KB
testcase_51 AC 15 ms
8,164 KB
testcase_52 AC 15 ms
8,148 KB
testcase_53 AC 15 ms
8,148 KB
testcase_54 AC 15 ms
8,248 KB
testcase_55 AC 16 ms
8,128 KB
testcase_56 AC 15 ms
8,316 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H, W = map(int, input().split())
S = [list(input()) for _ in range(H)]
x, y = [], []

for i in range(H):
    for j in range(W):
        if S[i][j]=='*':
            x.append(i)
            y.append(j)
    
for i in range(H):
    for j in range(H):
        if S[i][j]=='*':
            continue
        
        v1 = (x[0]-i, y[0]-j)
        v2 = (x[1]-i, y[1]-j)
        
        if v1[0]*v2[1]!=v1[1]*v2[0]:
            S[i][j] = '*'
            
            for Si in S:
                print(''.join(Si))
            
            exit()
0