結果
| 問題 |
No.3261 yiwiy9 → yiwiY9
|
| コンテスト | |
| ユーザー |
syoyudango
|
| 提出日時 | 2025-10-20 03:28:20 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 537 bytes |
| コンパイル時間 | 3,140 ms |
| コンパイル使用メモリ | 278,824 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-10-20 03:28:24 |
| 合計ジャッジ時間 | 4,022 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 29 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
for (int y = 0; y < H; y++) {
string S;
cin >> S;
int x = 0;
while (x + 6 <= W) {
if (S.substr(x, 6) == "yiwiy9") {
S[x + 4] = 'Y';
x += 6;
} else if (S.substr(x, 6) == "9yiwiy") {
S[x + 1] = 'Y';
x += 6;
} else {
x++;
}
}
cout << S << endl;
}
return 0;
}
syoyudango