結果

問題 No.3261 yiwiy9 → yiwiY9
ユーザー hamikan
提出日時 2025-09-06 18:46:34
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 520 bytes
コンパイル時間 2,011 ms
コンパイル使用メモリ 195,376 KB
実行使用メモリ 7,844 KB
最終ジャッジ日時 2025-09-06 18:46:37
合計ジャッジ時間 3,316 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12 WA * 17
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int H, W;
    cin >> H >> W;
    for(int i=0; i<H; i++) {
        string S;
        cin >> S;
        for(int j=0; j<=W-6; j++) {
            if(S.substr(j, 6) == "yiwiy9") {
                S[j+4] = 'Y';
                j += 5;
            }
            if(S.substr(j, 6) == "9yiwiy") {
                S[j+1] = 'Y';
                j += 5;
            }
        }
        cout << S << endl;
    }
}
0