結果
| 問題 |
No.923 オセロきりきざむたん
|
| コンテスト | |
| ユーザー |
沙耶花
|
| 提出日時 | 2024-12-06 23:33:37 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 633 bytes |
| コンパイル時間 | 4,143 ms |
| コンパイル使用メモリ | 256,372 KB |
| 最終ジャッジ日時 | 2025-02-26 11:16:58 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 51 WA * 33 |
ソースコード
#include <stdio.h>
#include <atcoder/all>
#include <bits/stdc++.h>
using namespace std;
using namespace atcoder;
using mint = modint998244353;
#define rep(i,n) for (int i = 0; i < (n); ++i)
#define Inf32 1000000001
#define Inf64 1000000000000000000LL
int main(){
int h,w;
cin>>h>>w;
vector<string> s(h);
rep(i,h)cin>>s[i];
bool f = true;
rep(i,h){
set<char> S;
rep(j,w)S.insert(s[i][j]);
if(S.size()==1)f = false;
}
if(f)cout<<"YES"<<endl;
else{
f =true;
rep(i,w){
set<char> S;
rep(j,h)S.insert(s[j][i]);
if(S.size()==1)f = false;
}
}
if(f)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
return 0;
}
沙耶花