結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
|
提出日時 | 2025-09-06 13:10:37 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 7 ms / 2,000 ms |
コード長 | 608 bytes |
コンパイル時間 | 2,065 ms |
コンパイル使用メモリ | 194,556 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-09-06 13:12:45 |
合計ジャッジ時間 | 3,062 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(0); int h, w; cin >> h >> w; string str; for(int y = 0; y < h; y++){ cin >> str; for(int x = 0; x + 6 <= w; x++){ if(str.substr(x, 6) == "yiwiy9"){ str[x + 4] = 'Y'; x += 5; continue; } if(str.substr(x, 6) == "9yiwiy"){ str[x + 1] = 'Y'; x += 5; continue; } } cout << str << '\n'; } }