結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-06 17:53:12 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 1,030 bytes |
コンパイル時間 | 3,433 ms |
コンパイル使用メモリ | 279,732 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-09-06 17:53:18 |
合計ジャッジ時間 | 5,883 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 6 WA * 14 RE * 9 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #define debug(x) cerr << #x << " = " << (x) << "\n" #else #define debug(x) void(0) #endif typedef long long ll; typedef long double ld; typedef pair<int, int> Pii; typedef pair<ll, ll> Pll; template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) { for (int i = 0; i < (int)v.size(); i++) os << v[i] << (i + 1 == (int)v.size() ? "" : " "); return os; } template <typename T> istream &operator>>(istream &is, vector<T> &v) { for (int i = 0; i < (int)v.size(); i++) is >> v[i]; return is; } //////////////////////////////////////////////////////////// int main() { int H, W; cin >> H >> W; vector<string> S(H); cin >> S; for (int i = 0; i < H; i++) for (int j = 0; j + 5 < W; j++) { if (S[i].substr(j, 6) == "yiwiy9") S[i].replace(j, 6, "yiwY9"); else if (S[i].substr(j, 6) == "9yiwiy") S[i].replace(j, 6, "9Yiwiy"); else j -= 5; j += 5; } for (int i = 0; i < H; i++) cout << S[i] << "\n"; return 0; }