結果

問題 No.455 冬の大三角
ユーザー ynyn
提出日時 2016-12-06 01:19:14
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 888 bytes
コンパイル時間 1,193 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 90,480 KB
最終ジャッジ日時 2023-08-18 16:04:49
合計ジャッジ時間 18,195 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 217 ms
89,272 KB
testcase_01 AC 216 ms
89,412 KB
testcase_02 AC 214 ms
89,600 KB
testcase_03 RE -
testcase_04 AC 214 ms
89,492 KB
testcase_05 AC 217 ms
89,396 KB
testcase_06 AC 217 ms
89,468 KB
testcase_07 AC 217 ms
89,268 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 213 ms
89,328 KB
testcase_11 AC 214 ms
89,280 KB
testcase_12 AC 218 ms
89,596 KB
testcase_13 AC 215 ms
89,368 KB
testcase_14 RE -
testcase_15 AC 219 ms
89,468 KB
testcase_16 AC 220 ms
89,504 KB
testcase_17 AC 220 ms
89,468 KB
testcase_18 AC 216 ms
89,488 KB
testcase_19 AC 217 ms
89,436 KB
testcase_20 AC 223 ms
89,436 KB
testcase_21 RE -
testcase_22 AC 218 ms
89,332 KB
testcase_23 AC 218 ms
89,264 KB
testcase_24 AC 220 ms
89,272 KB
testcase_25 AC 215 ms
89,376 KB
testcase_26 AC 218 ms
89,460 KB
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 233 ms
89,940 KB
testcase_30 AC 230 ms
90,168 KB
testcase_31 RE -
testcase_32 AC 248 ms
90,348 KB
testcase_33 AC 250 ms
90,196 KB
testcase_34 AC 227 ms
89,516 KB
testcase_35 AC 237 ms
90,020 KB
testcase_36 AC 235 ms
90,212 KB
testcase_37 AC 228 ms
89,936 KB
testcase_38 AC 234 ms
90,120 KB
testcase_39 AC 228 ms
89,988 KB
testcase_40 AC 228 ms
90,208 KB
testcase_41 AC 236 ms
89,852 KB
testcase_42 AC 232 ms
90,112 KB
testcase_43 AC 231 ms
90,480 KB
testcase_44 AC 242 ms
90,112 KB
testcase_45 AC 241 ms
89,940 KB
testcase_46 AC 249 ms
90,208 KB
testcase_47 AC 243 ms
90,164 KB
testcase_48 AC 245 ms
89,992 KB
testcase_49 AC 237 ms
89,456 KB
testcase_50 AC 229 ms
89,384 KB
testcase_51 AC 246 ms
89,448 KB
testcase_52 AC 242 ms
89,528 KB
testcase_53 AC 242 ms
89,452 KB
testcase_54 AC 236 ms
89,528 KB
testcase_55 AC 243 ms
89,856 KB
testcase_56 AC 236 ms
89,456 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import fractions
h, w = map(int,input().split())
s = [list(input()) for i in range(h)]

star = []

for j in range(h):
    for i in range(w):
        if s[j][i] == "*":
            star.append(j)
            star.append(i)
f = False
for j in range(h):
    for i in range(w):
        if j == star[0] == star[2]:
            continue
        if i == star[1] == star[3]:
            continue
        if star[0] == star[2]:
            s[j][i] = "*"
            f = True
            break
        if star[1] == star[3]:
            s[j][i] = "*"
            f = True
            break

        if fractions.Fraction((star[0] - star[2]),(star[1] - star[3])) == \
            fractions.Fraction((j - star[2]), (i - star[3])):
            continue
        else:
            s[j][i] = "*"
            f = True
            break
    if f:
        break

for j in range(h):
    print("".join(s[j]))
0