結果

問題 No.179 塗り分け
ユーザー wassyoiyoiwassyoiyoi
提出日時 2020-06-10 13:17:04
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 466 bytes
コンパイル時間 1,913 ms
コンパイル使用メモリ 164,048 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-05 06:38:38
合計ジャッジ時間 4,183 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,376 KB
testcase_02 WA -
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 2 ms
4,376 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,376 KB
testcase_07 WA -
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 2 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
testcase_11 AC 1 ms
4,376 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 2 ms
4,380 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 WA -
testcase_20 AC 2 ms
4,376 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 WA -
testcase_23 AC 2 ms
4,380 KB
testcase_24 WA -
testcase_25 AC 2 ms
4,376 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 WA -
testcase_28 AC 2 ms
4,376 KB
testcase_29 WA -
testcase_30 AC 2 ms
4,376 KB
testcase_31 WA -
testcase_32 AC 2 ms
4,376 KB
testcase_33 WA -
testcase_34 AC 2 ms
4,376 KB
testcase_35 WA -
testcase_36 AC 2 ms
4,380 KB
testcase_37 AC 2 ms
4,380 KB
testcase_38 AC 2 ms
4,376 KB
testcase_39 AC 2 ms
4,376 KB
testcase_40 WA -
testcase_41 AC 2 ms
4,380 KB
testcase_42 WA -
testcase_43 AC 1 ms
4,380 KB
testcase_44 WA -
testcase_45 AC 1 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

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