結果

問題 No.455 冬の大三角
ユーザー niyarin
提出日時 2016-12-06 18:30:08
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 867 bytes
コンパイル時間 160 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 6,400 KB
最終ジャッジ日時 2024-11-28 03:10:24
合計ジャッジ時間 2,447 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 44 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W = map(int,raw_input().split(" "))

field = []
stars = []
for h in range(H):
    line = raw_input()
    field.append(line)
    for w in range(len(line)):
        if line[w] == "*":
            stars.append((w,h))

def nyrn():
    global line
    for i in range(W):
        for j in range(H):
            flag = True
            for x,y in stars:
                if x == i or y == j:
                    flag = False
            if flag:

                s1 = stars[0]
                s2 = stars[1]
                a = float(s1[0]-i)/float(s1[1]-j)
                b = float(s2[0]-i)/float(s2[1]-j)

                if a == b:
                    continue

                



                v = list(field[j])
                v[i] = "*"
                field[j] = "".join(v)
                return i,j
nyrn()
for line in field:
    print line




            



0