結果

問題 No.179 塗り分け
ユーザー wassyoiyoi
提出日時 2020-06-10 13:17:04
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 1,451 ms
コンパイル使用メモリ 166,624 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-23 02:57:25
合計ジャッジ時間 2,610 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4 WA * 2
other AC * 25 WA * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define PI 3.141592653589
#define ll long long
using namespace std;

template<typename T_char>
T_char ToUpper(T_char cX){return toupper(cX);}

int  main(){
  int h, w;
  cin >> h >> w;
  char s[h*w];
  for(int i=0; i<h*w; ++i) cin >> s[i];
  
  int cnt = 0, cnt1=0;
  for(int i=0; i<h*w; ++i){
    if(s[i]=='#') ++cnt;
    if(s[i]=='.') ++cnt1;
  }
  if(cnt%2==0 && cnt1%2==0) cout << "YES" << endl;
  else cout << "NO" << endl;
  return 0;
}
0