結果
問題 |
No.455 冬の大三角
|
ユーザー |
|
提出日時 | 2020-12-27 10:51:17 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 422 bytes |
コンパイル時間 | 89 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-10-01 07:04:21 |
合計ジャッジ時間 | 3,403 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 53 WA * 1 |
ソースコード
h,w=map(int,input().split()) a=['']*h s=[] for y in range(h): a[y]=input() x=a[y].find('*') if x<0:continue s.append([x,y]) z=a[y][x+1:].find('*') if z<0:continue s.append([z+x+1,y]) x,y=0,0 if x==s[0][0]==s[1][0]: x+=1 elif y==s[0][1]==s[1][1]: y+=1 elif [x,y] in s: if x+1<w:x+=1 else:y+=1 elif s[0][1]==s[0][0] and s[1][1]==s[1][0]: if x+1<w:x+=1 else:y+=1 a[y]=a[y][:x]+'*'+a[y][x+1:] print(*a,sep='\n')