結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-06 14:04:59 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 828 bytes |
コンパイル時間 | 3,044 ms |
コンパイル使用メモリ | 278,192 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-09-06 14:05:08 |
合計ジャッジ時間 | 4,190 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #ifdef LOCAL #include <debug.hpp> #else #define debug(...) #endif int main() { cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20); 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 < W; j++) { if (S[i][j] == '.') continue; if (S[i].substr(j, 6) == "yiwiy9") { S[i][j + 4] = 'Y'; j += 5; continue; } if (S[i].substr(j, 6) == "9yiwiy") { S[i][j + 1] = 'Y'; j += 5; continue; } } } for (int i = 0; i < H; i++) cout << S[i] << "\n"; }