結果
| 問題 |
No.455 冬の大三角
|
| コンテスト | |
| ユーザー |
butter_roll
|
| 提出日時 | 2016-12-12 17:35:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 697 bytes |
| コンパイル時間 | 775 ms |
| コンパイル使用メモリ | 74,488 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-29 16:54:32 |
| 合計ジャッジ時間 | 2,941 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 45 WA * 9 |
ソースコード
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
using namespace std;
int main(void){
int H,W;
vector<string> a;
string s;
int i,t1,t2;
cin>>H>>W;
t1=t2=-1;
for(i=0;i<H;i++){
cin>>s;
if(s.find("*")!=-1){
if(t1==-1) t1=s.find("*");
else t2=s.find("*");
}
a.push_back(s);
}
if(t2==-1){
if(t1==0){
a[1].replace(a[0].find("-"),a[0].find("-")+1,"*");
}
else{
a[0].replace(a[0].find("-"),a[0].find("-")+1,"*");
}
}
else if(t1!=0||t2!=0){
a[0].replace(a[0].find("-"),a[0].find("-")+1,"*");
}
else{
a[0].replace(1,1,"*");
}
for(i=0;i<H;i++){
cout<<a[i]<<endl;
}
return 0;
}
butter_roll