結果

問題 No.1941 CHECKER×CHECKER(1)
ユーザー tnakao0123
提出日時 2022-05-20 22:58:24
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 545 bytes
コンパイル時間 368 ms
コンパイル使用メモリ 41,024 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-20 09:20:56
合計ジャッジ時間 920 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 1941.cc:  No.1941 CHECKER×CHECKER(1) - yukicoder
 */

#include<cstdio>
#include<algorithm>
 
using namespace std;

/* constant */

const int N = 3;
const int NN = N * N;

/* typedef */

/* global variables */

char s[NN + 4];

/* subroutines */

/* main */

int main() {
  for (int i = 0; i < N; i++) scanf("%s", s + i * N);
  //puts(s);

  char cs[] = "#.";
  if (s[0] == '.') swap(cs[0], cs[1]);

  for (int i = 0; i < NN; i++)
    if (s[i] != cs[i & 1]) { puts("No"); return 0; }

  puts("Yes");
  return 0;
}
0