結果

問題 No.455 冬の大三角
ユーザー tookunn_1213tookunn_1213
提出日時 2017-09-24 09:48:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 722 bytes
コンパイル時間 201 ms
コンパイル使用メモリ 12,928 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-04-26 17:28:51
合計ジャッジ時間 3,792 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
10,880 KB
testcase_01 WA -
testcase_02 AC 27 ms
10,880 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 29 ms
10,752 KB
testcase_06 AC 28 ms
10,752 KB
testcase_07 WA -
testcase_08 AC 29 ms
10,752 KB
testcase_09 WA -
testcase_10 AC 29 ms
10,752 KB
testcase_11 AC 28 ms
11,008 KB
testcase_12 AC 28 ms
10,880 KB
testcase_13 WA -
testcase_14 AC 28 ms
10,880 KB
testcase_15 AC 27 ms
11,008 KB
testcase_16 AC 28 ms
11,008 KB
testcase_17 WA -
testcase_18 AC 29 ms
10,880 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 28 ms
10,880 KB
testcase_22 AC 29 ms
10,880 KB
testcase_23 AC 28 ms
10,752 KB
testcase_24 WA -
testcase_25 AC 28 ms
10,880 KB
testcase_26 AC 29 ms
10,752 KB
testcase_27 AC 29 ms
11,008 KB
testcase_28 AC 27 ms
10,880 KB
testcase_29 AC 30 ms
10,880 KB
testcase_30 AC 29 ms
10,880 KB
testcase_31 AC 29 ms
10,880 KB
testcase_32 AC 29 ms
11,008 KB
testcase_33 AC 29 ms
10,880 KB
testcase_34 AC 28 ms
10,880 KB
testcase_35 AC 29 ms
10,752 KB
testcase_36 AC 28 ms
10,880 KB
testcase_37 AC 30 ms
10,752 KB
testcase_38 AC 29 ms
11,008 KB
testcase_39 AC 30 ms
10,880 KB
testcase_40 AC 30 ms
10,880 KB
testcase_41 AC 30 ms
10,880 KB
testcase_42 AC 29 ms
10,880 KB
testcase_43 AC 30 ms
10,752 KB
testcase_44 AC 30 ms
10,880 KB
testcase_45 AC 30 ms
10,880 KB
testcase_46 AC 30 ms
10,880 KB
testcase_47 AC 29 ms
10,880 KB
testcase_48 AC 29 ms
10,880 KB
testcase_49 AC 29 ms
10,880 KB
testcase_50 AC 28 ms
10,752 KB
testcase_51 AC 28 ms
10,880 KB
testcase_52 WA -
testcase_53 AC 28 ms
10,880 KB
testcase_54 AC 27 ms
10,880 KB
testcase_55 AC 28 ms
10,880 KB
testcase_56 AC 29 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H,W = map(int,input().split())
S = [list(input()) for i in range(H)]
p = []
for i in range(H):
	for j in range(W):
		if S[i][j] == '*':
			p.append((i,j))

di,dj = p[0][0] - p[1][0],p[0][1] - p[1][1]
ni,nj = p[0][0] + di,p[0][1] + dj
ny,nx = p[0][0] - di,p[0][1] - dj
ok = [[True for j in range(W)] for i in range(H)]
while ni < H and nj < W and ni >= 0 and nj >= 0:
	ok[ni][nj] = False
	ni += di
	nj += dj
while ny < H and nx < W and ny >= 0 and nx >= 0:
	ok[ny][nx] = False
	ny -= di
	nx -= dj

for i in range(H):
	flag = False
	for j in range(W):
		if ok[i][j]:
			S[i][j] = '*'
			flag = True
			break
	if flag:
		break
#print('')
#print(''.join([str(i%10) for i in range(W)]))
for i in range(H):
	print(''.join(S[i]))
0