結果
| 問題 |
No.455 冬の大三角
|
| コンテスト | |
| ユーザー |
dnish
|
| 提出日時 | 2018-06-10 20:00:14 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 1,103 bytes |
| コンパイル時間 | 827 ms |
| コンパイル使用メモリ | 84,100 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 13:20:26 |
| 合計ジャッジ時間 | 3,107 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 54 |
ソースコード
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <deque>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
#define p(s) cout<<(s)<<endl
#define REP(i,n,N) for(int i=n;i<N;i++)
#define RREP(i,n,N) for(int i=N-1;i>=n;i--)
#define CK(n,a,b) ((a)<=(n)&&(n)<(b))
#define F first
#define S second
typedef long long int ll;
using namespace std;
const int mod=1e9+7;
int H,W;
string s[110];
pair<int,int> pr[2];
int main(){
cin>>H>>W;
bool f=false;
REP(i,0,H){
cin>>s[i];
REP(j,0,W){
if(s[i][j]=='*'){
pr[f]={i, j};
f=true;
}
}
}
f=false;
REP(i,0,H){
REP(j,0,W){
if(s[i][j]=='*') continue;
if((pr[0].F-i)*(pr[1].S-j)!=(pr[1].F-i)*(pr[0].S-j)){
s[i][j]='*';
f=true;
break;
}
}
if(f){
break;
}
}
REP(i,0,H){
p(s[i]);
}
return 0;
}
dnish