結果
| 問題 |
No.3261 yiwiy9 → yiwiY9
|
| コンテスト | |
| ユーザー |
yuu_w
|
| 提出日時 | 2025-09-06 17:53:51 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 1,031 bytes |
| コンパイル時間 | 3,439 ms |
| コンパイル使用メモリ | 279,804 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-06 17:53:56 |
| 合計ジャッジ時間 | 4,497 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#define debug(x) cerr << #x << " = " << (x) << "\n"
#else
#define debug(x) void(0)
#endif
typedef long long ll;
typedef long double ld;
typedef pair<int, int> Pii;
typedef pair<ll, ll> Pll;
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v)
{
for (int i = 0; i < (int)v.size(); i++)
os << v[i] << (i + 1 == (int)v.size() ? "" : " ");
return os;
}
template <typename T>
istream &operator>>(istream &is, vector<T> &v)
{
for (int i = 0; i < (int)v.size(); i++)
is >> v[i];
return is;
}
////////////////////////////////////////////////////////////
int main()
{
int H, W;
cin >> H >> W;
vector<string> S(H);
cin >> S;
for (int i = 0; i < H; i++)
for (int j = 0; j + 5 < W; j++)
{
if (S[i].substr(j, 6) == "yiwiy9")
S[i].replace(j, 6, "yiwiY9");
else if (S[i].substr(j, 6) == "9yiwiy")
S[i].replace(j, 6, "9Yiwiy");
else
j -= 5;
j += 5;
}
for (int i = 0; i < H; i++)
cout << S[i] << "\n";
return 0;
}
yuu_w