結果
| 問題 |
No.179 塗り分け
|
| コンテスト | |
| ユーザー |
hogeover30
|
| 提出日時 | 2018-07-10 16:22:03 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 514 bytes |
| コンパイル時間 | 1,724 ms |
| コンパイル使用メモリ | 198,460 KB |
| 最終ジャッジ日時 | 2025-01-06 11:54:41 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 6 |
| other | AC * 34 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main()
{
int H, W; cin>>H>>W;
vector<string> S(H); for(auto& e: S) cin>>e;
#define REP(i, a, b) for(int i=a; i<b; ++i)
REP(r, 0, H) REP(c, 0, W) if (c|r) {
auto T=S;
REP(i, 0, H-r) REP(j, 0, W-c)
if (T[i][j] && S[i][j]==S[i+r][j+c]) T[i][j]=T[i+r][j+c]=0;
int no=0;
REP(i, 0, H) REP(j, 0, W)
no|=T[i][j] && S[i][j]=='#';
if (!no) return !printf("YES\n");
}
puts("NO");
}
hogeover30