結果

問題 No.819 Enjapma game
ユーザー 259_Momone259_Momone
提出日時 2019-04-19 23:16:44
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 430 bytes
コンパイル時間 1,499 ms
コンパイル使用メモリ 167,012 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 12:31:15
合計ジャッジ時間 3,032 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 1 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 WA -
testcase_09 AC 2 ms
4,348 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 2 ms
4,348 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 2 ms
4,348 KB
testcase_17 WA -
testcase_18 AC 2 ms
4,348 KB
testcase_19 AC 3 ms
4,348 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 2 ms
4,348 KB
testcase_24 AC 3 ms
4,348 KB
testcase_25 WA -
testcase_26 AC 2 ms
4,348 KB
testcase_27 AC 2 ms
4,348 KB
testcase_28 AC 3 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;

int main(){
    unsigned long N, M;
    cin >> N >> M;
    string s;
    unsigned long a{0}, c{0};
    for(unsigned long i = 0; i < N; ++i){
        cin >> s;
        for(unsigned long j = 0; j < M; ++j){
            if(s[j] == 'o'){
                a += (N - i - 1) + (M - j - 1);
                c ^= 1;
            }
        }
    }
    puts(c & 1 ? "NO" : a & 1 ? "YES" : "NO");
}
0