結果
問題 |
No.819 Enjapma game
|
ユーザー |
|
提出日時 | 2019-04-19 23:09:48 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 391 bytes |
コンパイル時間 | 771 ms |
コンパイル使用メモリ | 71,292 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-23 04:15:41 |
合計ジャッジ時間 | 1,711 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 15 WA * 11 |
ソースコード
#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] ^= 1; } } puts((a[0] - a[1]) % 3 == 0 ? "YES" : "NO"); }