結果

問題 No.1941 CHECKER×CHECKER(1)
ユーザー a
提出日時 2022-05-21 07:39:21
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 650 bytes
コンパイル時間 2,042 ms
コンパイル使用メモリ 198,984 KB
最終ジャッジ日時 2025-01-29 12:44:06
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    char S[3][3];
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            cin >> S[i][j];
        }
    }
    set<char> s1, s2;
    for (int i = 0; i < 3; i++) {
        for (int j = 0; j < 3; j++) {
            if ((i + j) % 2 == 0) {
                s1.insert(S[i][j]);
            } else {
                s2.insert(S[i][j]);
            }
        }
    }
    if ((int)(s1.size()) == 1 && (int)(s2.size()) == 1) {
        cout << "Yes" << endl;
    } else {
        cout << "No" << endl;
    }
    return 0;
}
0