結果
問題 |
No.3261 yiwiy9 → yiwiY9
|
ユーザー |
![]() |
提出日時 | 2025-09-07 04:10:31 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 1,003 bytes |
コンパイル時間 | 3,455 ms |
コンパイル使用メモリ | 273,400 KB |
実行使用メモリ | 6,272 KB |
最終ジャッジ日時 | 2025-09-07 04:10:36 |
合計ジャッジ時間 | 4,675 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 29 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define rep(i,n) for(int i=0; i<(int)n; i++) #define repi(i,m,n) for(int i=(int)m; i<=(int)n; i++) #define rrep(i,n) for(int i=(int)n-1; i>=0; i--) #define rrepi(i,m,n) for(int i=(int)n; i>=(int)m; i--) #define all(x) x.begin(),x.end() template <typename T> inline bool chmin(T& a, const T& b) { return a > b ? a = b, true : false; }; template <typename T> inline bool chmax(T& a, const T& b) { return a < b ? a = b, true : false; }; template <typename T> void uniq(std::vector<T> &v){ std::sort(v.begin(),v.end()); v.erase(unique(v.begin(),v.end()),v.end()); } using ll = long long; int main(){ int h,w; cin >> h >> w; rep(i,h){ string s; cin >> s; rep(j,w){ if(s[j] == 'y'){ s[j+4] = 'Y'; j += 5; } else if(s[j] == '9'){ s[j+1] = 'Y'; j += 5; } } cout << s << endl; } return 0; }