結果

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

ソースコード

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):
            
            
            s1 = stars[0]
            s2 = stars[1]
            if s1[0] == s2[0] == i:
                continue
            if s1[1] == s2[1] == j:
                continue
            if s1[1]-j and s2[1]-j:
                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