結果
問題 | No.819 Enjapma game |
ユーザー |
|
提出日時 | 2019-04-19 23:22:23 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 388 bytes |
コンパイル時間 | 724 ms |
コンパイル使用メモリ | 71,820 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-23 05:10:18 |
合計ジャッジ時間 | 1,672 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
#include <iostream> #include <algorithm> #include <vector> #include <string> #define REP(i, n) for (int i = 0; i < (n); i++) using namespace std; int main() { int H, W; cin >> H >> W; vector<string> S(H); REP(i, H) cin >> S[i]; int a[2] = {}; REP(i, H) REP(j, W) { if (S[i][j] == 'o') { a[(i + j) % 2]++; } } puts((a[0] - a[1]) % 3 == 0 ? "YES" : "NO"); }