結果

問題 No.455 冬の大三角
ユーザー 👑 KazunKazun
提出日時 2020-08-31 13:37:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 53 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 608 ms
コンパイル使用メモリ 82,604 KB
実行使用メモリ 64,540 KB
最終ジャッジ日時 2024-04-27 17:19:01
合計ジャッジ時間 5,001 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,564 KB
testcase_01 AC 38 ms
52,200 KB
testcase_02 AC 41 ms
52,752 KB
testcase_03 AC 38 ms
52,968 KB
testcase_04 AC 38 ms
52,464 KB
testcase_05 AC 37 ms
52,920 KB
testcase_06 AC 38 ms
53,588 KB
testcase_07 AC 38 ms
53,368 KB
testcase_08 AC 46 ms
61,424 KB
testcase_09 AC 38 ms
53,036 KB
testcase_10 AC 38 ms
53,012 KB
testcase_11 AC 38 ms
52,392 KB
testcase_12 AC 39 ms
52,268 KB
testcase_13 AC 38 ms
52,200 KB
testcase_14 AC 38 ms
52,576 KB
testcase_15 AC 37 ms
53,228 KB
testcase_16 AC 39 ms
52,496 KB
testcase_17 AC 37 ms
52,756 KB
testcase_18 AC 38 ms
52,648 KB
testcase_19 AC 38 ms
52,268 KB
testcase_20 AC 38 ms
52,380 KB
testcase_21 AC 38 ms
54,016 KB
testcase_22 AC 38 ms
52,644 KB
testcase_23 AC 37 ms
53,236 KB
testcase_24 AC 38 ms
52,072 KB
testcase_25 AC 37 ms
52,412 KB
testcase_26 AC 38 ms
53,848 KB
testcase_27 AC 38 ms
52,408 KB
testcase_28 AC 38 ms
52,364 KB
testcase_29 AC 45 ms
60,284 KB
testcase_30 AC 45 ms
59,500 KB
testcase_31 AC 46 ms
61,368 KB
testcase_32 AC 53 ms
64,540 KB
testcase_33 AC 45 ms
60,120 KB
testcase_34 AC 39 ms
52,832 KB
testcase_35 AC 46 ms
61,548 KB
testcase_36 AC 45 ms
59,964 KB
testcase_37 AC 45 ms
60,904 KB
testcase_38 AC 44 ms
59,888 KB
testcase_39 AC 45 ms
60,384 KB
testcase_40 AC 45 ms
60,752 KB
testcase_41 AC 44 ms
60,004 KB
testcase_42 AC 45 ms
60,956 KB
testcase_43 AC 51 ms
63,868 KB
testcase_44 AC 43 ms
60,020 KB
testcase_45 AC 45 ms
59,928 KB
testcase_46 AC 48 ms
61,416 KB
testcase_47 AC 45 ms
60,872 KB
testcase_48 AC 46 ms
59,832 KB
testcase_49 AC 38 ms
52,532 KB
testcase_50 AC 37 ms
53,104 KB
testcase_51 AC 38 ms
52,864 KB
testcase_52 AC 38 ms
52,884 KB
testcase_53 AC 39 ms
53,960 KB
testcase_54 AC 37 ms
52,688 KB
testcase_55 AC 43 ms
60,056 KB
testcase_56 AC 38 ms
53,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W=map(int,input().split())
A=[]
T=[]
for y in range(H):
    S=input()
    T.append(S)
    for x in range(W):
        if S[x]=="*":
            A.append((x,y))
C=A[0][0]-A[1][0],A[0][1]-A[1][1]

X=Y=-1
for y in range(H):
    for x in range(W):
        D=A[0][0]-x,A[0][1]-y
        if C[0]*D[1]!=C[1]*D[0] and T[y][x]=="-":
            X,Y=x,y

T[Y]=T[Y][:X]+"*"+T[Y][X+1:]

print("\n".join(T))
0