結果
| 問題 |
No.3261 yiwiy9 → yiwiY9
|
| コンテスト | |
| ユーザー |
Andrew8128
|
| 提出日時 | 2025-08-09 13:55:55 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 858 bytes |
| コンパイル時間 | 730 ms |
| コンパイル使用メモリ | 89,108 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-08-09 13:55:57 |
| 合計ジャッジ時間 | 1,990 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
#include <iostream>
using std::cerr, std::cin, std::cout, std::endl, std::fixed, std::flush;
#include <vector>
using std::vector;
#include <string>
using std::stoi, std::stol, std::string, std::to_string;
static_assert(sizeof(long) == 8);
int main()
{
int H, W;
cin >> H >> W;
vector<string> S(H);
for (int i = 0; i < H; i++)
{
cin >> S[i];
}
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");
j += 5;
continue;
}
if (S[i].substr(j, 6) == "9yiwiy") {
S[i].replace(j, 6, "9Yiwiy");
j += 5;
continue;
}
}
}
for (int i = 0; i < H; i++)
{
cout << S[i] << '\n';
}
return 0;
}
/*
File : ~/kyopro/yukicoder/iwai2/B.cpp
Date : 2025/08/09
Time : 13:42:24
*/
Andrew8128