結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-06 13:56:49 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 739 bytes |
コンパイル時間 | 3,395 ms |
コンパイル使用メモリ | 277,972 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-09-06 13:57:19 |
合計ジャッジ時間 | 4,572 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 17 |
ソースコード
#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 + 6 <= W; j++) { if (S[i].substr(j, 6) == "yiwiy9") { S[i][j + 4] = 'Y'; j += 5; } if (S[i].substr(j, 6) == "9yiwiy") { S[i][j + 1] = 'Y'; j += 5; } } } for (int i = 0; i < H; i++) cout << S[i] << "\n"; }