結果
| 問題 |
No.3261 yiwiy9 → yiwiY9
|
| コンテスト | |
| ユーザー |
Akidai
|
| 提出日時 | 2025-09-06 13:29:04 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,161 bytes |
| コンパイル時間 | 4,278 ms |
| コンパイル使用メモリ | 255,712 KB |
| 実行使用メモリ | 7,720 KB |
| 最終ジャッジ日時 | 2025-09-06 13:29:11 |
| 合計ジャッジ時間 | 5,385 ms |
|
ジャッジサーバーID (参考情報) |
judge / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 WA * 19 |
ソースコード
#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = (1LL << 62) - (1LL << 31) - 1;
#define REP(i, init, n) for(int i = (int)(init); i < (int)(n); i++)
#define RREP(i, init, n) for(int i = (int)(init); i >= (int)(n); i--)
#define All(A) A.begin(), A.end()
#define rAll(A) A.rbegin(), A.rend()
#define vi vector<int>
#define vl vector<long>
#define vvi vector<vector<int>>
#define vvl vector<vector<long>>
#define pint pair<int, int>
#define plong pair<long, long>
int H, W;
vector<string> S;
void solve() {
REP(i, 0, H) {
REP(j, 0, W) {
if(S[i][j] == '9') {
if(j - 1 >= 0 && S[i][j - 1] == 'y') {
S[i][j - 1] = 'Y';
}
if(j + 1 < W && S[i][j + 1] == 'y') {
S[i][j + 1] = 'Y';
}
}
}
}
REP(i, 0, H) {
cout << S[i] << endl;
}
}
int main() {
cin.tie(nullptr);
ios::sync_with_stdio(false);
cin >> H >> W;
S.resize(H);
REP(i, 0, H) cin >> S[i];
solve();
}
Akidai