結果
問題 | No.819 Enjapma game |
ユーザー |
![]() |
提出日時 | 2020-12-09 20:37:20 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 498 bytes |
コンパイル時間 | 2,206 ms |
コンパイル使用メモリ | 194,436 KB |
最終ジャッジ日時 | 2025-01-16 20:57:28 |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 26 |
ソースコード
#include <stdio.h> #include <bits/stdc++.h> using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 10000000 int main(){ int h,w; cin>>h>>w; vector<string> S(h); rep(i,h)cin>>S[i]; int sum = 0; rep(i,h){ rep(j,w){ if(S[i][j]=='o'){ if((j+(h-1-i))%2==0)sum++; else sum += 2; } } } if(sum%3==0)cout<<"YES"<<endl; else cout<<"NO"<<endl; return 0; }