結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-14 11:49:20 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 443 bytes |
コンパイル時間 | 1,144 ms |
コンパイル使用メモリ | 88,200 KB |
実行使用メモリ | 7,716 KB |
最終ジャッジ日時 | 2025-09-14 11:49:23 |
合計ジャッジ時間 | 2,215 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
// ,,廿_廿,, #include<iostream> #include<vector> using namespace std; int main(){ int h,w;cin>>h>>w; vector<string>hw(h);for(int i=0;i<h;++i)cin>>hw[i]; string yiwiy[] { "yiwiy9", "9yiwiy", "yiwiY9", "9Yiwiy", }; for(int i=0;i<h;++i){ for(int j=0;j<w-5;++j){ string str=hw[i].substr(j,6); if(str==yiwiy[0])hw[i][j+4]='Y',j+=5; if(str==yiwiy[1])hw[i][j+1]='Y',j+=5; } } for(int i=0;i<h;++i)cout<<hw[i]<<'\n'; }