結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
|
提出日時 | 2025-09-06 15:16:45 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 568 bytes |
コンパイル時間 | 2,935 ms |
コンパイル使用メモリ | 276,584 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-09-06 15:16:51 |
合計ジャッジ時間 | 3,926 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include<bits/stdc++.h> using namespace std; using ll =long long; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); ll H,W; cin>>H>>W; for(int h=0;h<H;h++){ string S; cin>>S; for(int i=0;i<W-5;i++){ if(S.substr(i,6)=="yiwiy9"){ S[i+4]='Y'; S[i+5]='0'; } if(S.substr(i,6)=="9yiwiy"){ S[i]='0'; S[i+1]='Y'; } } for(int i=0;i<W;i++)if(S[i]=='0')S[i]='9'; cout<<S<<"\n"; } }