結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-06 14:54:43 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 867 bytes |
コンパイル時間 | 1,057 ms |
コンパイル使用メモリ | 110,300 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-09-06 14:54:52 |
合計ジャッジ時間 | 2,124 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <iostream> #include <iomanip>//小数点出力用 //cout << fixed << setprecision(10) << ans; #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> #include <set> #include <map> #include <unordered_map> using ll = long long; using namespace std; #define modPHash (ll)((1LL<<61)-1) #define modP (ll)998244353 bool chkrng0idx(int pos, int sup) { return (0 <= pos && pos < sup); } int clk4(int num) { return (num - 2) * (num % 2); } void yn(bool tf) { cout << (tf ? "Yes\n" : "No\n"); } int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll H, W; cin >> H >> W; while (H--) { string S; cin >> S; for (int i = 0;i < S.size();) { if (S[i] == '9') { S[i + 1] = 'Y'; i+=6; } else if(S[i] == 'y'){ S[i+4]='Y'; i+=6; }else{ i++; } } cout << S << endl; } return 0; }