結果
| 問題 |
No.455 冬の大三角
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-01-14 04:22:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 1,140 bytes |
| コンパイル時間 | 1,059 ms |
| コンパイル使用メモリ | 90,488 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 05:51:32 |
| 合計ジャッジ時間 | 3,323 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 54 |
ソースコード
#define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string>
#include<iostream>
#include<iostream>
#include<cctype>
#include<cstdio>
#include<vector>
#include<stack>
#include<queue>
#include <algorithm>
#include<math.h>
#include<set>
#include<map>
#include <sstream>
#include<iomanip>
#include <ctype.h>
#include <fstream>
#include <cassert>
//#include <bits/stdc++.h>
using namespace std;
//#include<bits/stdc++.h>
int main() {
int h, w;
cin >> h >> w;
vector<string>p;
int x[3] = {}, y[3] = {};
int r = 0;
for (int i = 0; i < h; i++) {
string t;
cin >> t;
p.push_back(t);
for (int j = 0; j < w; j++)if (t[j] == '*') {
x[r] = j; y[r] = i;
r++;
}
}
int a = 0, b = 0;
for (int i = 0;i<h; i++) {
for (int j = 0; j < w; j++) {
if (x[0] == j&&y[0] == i)continue;
if (x[1] == j&&y[1] == i)continue;
if (x[0] == j&&x[1] == j)continue;
if (y[0] == i&&y[1] == i)continue;
if (abs(x[0] - j)*abs(y[1] - i) == abs(x[1] - j)*abs(y[0] - i))continue;
p[i][j] = '*';
for (int k = 0; k < h; k++) {
cout << p[k] << endl;
}
return 0;
}
}
return 0;
}