結果

問題 No.819 Enjapma game
ユーザー chocorusk
提出日時 2019-05-18 01:12:52
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 813 bytes
コンパイル時間 739 ms
コンパイル使用メモリ 99,172 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-17 06:04:36
合計ジャッジ時間 1,530 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 13 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <cstdio>
#include <cstring>
#include <iostream>
#include <string>
#include <cmath>
#include <bitset>
#include <vector>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <algorithm>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <random>
#include <cassert>
#include <fstream>
#define popcount __builtin_popcount
using namespace std;
typedef long long int ll;
typedef pair<int, int> P;

int main()
{
    int h, w; cin>>h>>w;
    int c=0, d=0;
    for(int i=0; i<h; i++){
        string s; cin>>s;
        for(int j=0; j<w; j++){
            if(s[j]=='o'){
                d+=(h-1-i+abs(c-j));
                c++;
            }
        }
    }
    if(c&1) cout<<"NO"<<endl;
    else if(d&1) cout<<"NO"<<endl;
    else cout<<"YES"<<endl;
    return 0;
}
0