結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
|
提出日時 | 2025-09-06 13:40:33 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 714 bytes |
コンパイル時間 | 3,188 ms |
コンパイル使用メモリ | 278,548 KB |
実行使用メモリ | 7,720 KB |
最終ジャッジ日時 | 2025-09-06 13:40:45 |
合計ジャッジ時間 | 4,523 ms |
ジャッジサーバーID (参考情報) |
judge / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 WA * 17 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; #define rep(i, s, n) for(int i=(0+s); i < (n+s); i++) //pair<T, T>-> P<T> template<class T> using P = pair<T, T>; template<class T> struct item {T A, B, C;}; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int H, W; cin >> H >> W; vector<string> mygrid(H); rep(i, 0, H) cin >> mygrid[i]; for(int h=0; h<H; h++)for(int w=0; w<=W-6; w++) { if(mygrid[h].substr(w, 6)=="yiwiy9"){ mygrid[h][w+4]='Y'; }else if(mygrid[h].substr(w, 6)=="9yiwiy"){ mygrid[h][w+1]='Y'; } } for(int i=0; i<H; i++){ cout << mygrid[i] << "\n"; } return 0; }