結果

問題 No.455 冬の大三角
ユーザー maspymaspy
提出日時 2020-01-07 21:43:21
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 516 bytes
コンパイル時間 98 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 44,620 KB
最終ジャッジ日時 2024-05-02 11:45:26
合計ジャッジ時間 36,153 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 558 ms
43,972 KB
testcase_01 RE -
testcase_02 AC 546 ms
44,088 KB
testcase_03 AC 546 ms
44,096 KB
testcase_04 AC 548 ms
44,108 KB
testcase_05 AC 553 ms
44,356 KB
testcase_06 AC 552 ms
44,356 KB
testcase_07 AC 550 ms
44,348 KB
testcase_08 AC 563 ms
44,408 KB
testcase_09 AC 551 ms
44,352 KB
testcase_10 RE -
testcase_11 AC 559 ms
44,096 KB
testcase_12 RE -
testcase_13 AC 548 ms
44,092 KB
testcase_14 RE -
testcase_15 AC 667 ms
44,608 KB
testcase_16 AC 554 ms
44,352 KB
testcase_17 RE -
testcase_18 AC 550 ms
44,096 KB
testcase_19 AC 547 ms
44,100 KB
testcase_20 AC 543 ms
44,352 KB
testcase_21 RE -
testcase_22 AC 551 ms
44,476 KB
testcase_23 AC 664 ms
44,620 KB
testcase_24 AC 558 ms
44,108 KB
testcase_25 AC 551 ms
44,488 KB
testcase_26 AC 548 ms
44,352 KB
testcase_27 AC 544 ms
44,480 KB
testcase_28 AC 541 ms
44,224 KB
testcase_29 AC 551 ms
44,352 KB
testcase_30 AC 541 ms
44,096 KB
testcase_31 RE -
testcase_32 RE -
testcase_33 AC 546 ms
44,476 KB
testcase_34 RE -
testcase_35 RE -
testcase_36 AC 551 ms
44,092 KB
testcase_37 AC 652 ms
44,240 KB
testcase_38 AC 552 ms
44,488 KB
testcase_39 AC 653 ms
44,360 KB
testcase_40 AC 552 ms
44,104 KB
testcase_41 AC 653 ms
44,100 KB
testcase_42 AC 541 ms
44,096 KB
testcase_43 RE -
testcase_44 AC 534 ms
44,356 KB
testcase_45 AC 541 ms
44,364 KB
testcase_46 AC 541 ms
44,092 KB
testcase_47 RE -
testcase_48 AC 546 ms
44,480 KB
testcase_49 AC 548 ms
44,092 KB
testcase_50 AC 637 ms
44,476 KB
testcase_51 AC 651 ms
44,360 KB
testcase_52 RE -
testcase_53 AC 558 ms
44,352 KB
testcase_54 AC 553 ms
44,228 KB
testcase_55 AC 552 ms
44,356 KB
testcase_56 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

import numpy as np
import random

H,W = map(int,readline().split())
S = np.frombuffer(read(),'S1').reshape(H,-1)[:,:W].astype(str)

X,Y = np.where(S == '*')

def test(x,y):
    x0,x1 = X-x
    y0,y1 = Y-y
    return x0 * y1 != y0 * x1

while True:
    x = random.randint(0,H-1)
    y = random.randint(0,H-1)
    if test(x,y):
        break

S[x][y] = '*'

print('\n'.join(''.join(row) for row in S))
0