結果
| 問題 |
No.1941 CHECKER×CHECKER(1)
|
| コンテスト | |
| ユーザー |
Nachia
|
| 提出日時 | 2022-05-20 21:21:29 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 801 bytes |
| コンパイル時間 | 2,202 ms |
| コンパイル使用メモリ | 109,924 KB |
| 最終ジャッジ日時 | 2025-01-29 09:55:08 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <array>
#include <atcoder/modint>
using namespace std;
using i32 = int32_t;
using u32 = uint32_t;
using i64 = int64_t;
using u64 = uint64_t;
#define rep(i,n) for(int i=0; i<(int)(n); i++)
const i64 INF = 1001001001001001001;
using modint = atcoder::static_modint<998244353>;
int main(){
string A[3]; rep(t,3) cin >> A[t];
int n = A[0].size();
bool ans = true;
rep(y,2) rep(x,n) if(A[y][x] == A[y+1][x]) ans = false;
rep(y,3) rep(x,n-1) if(A[y][x] == A[y][x+1]) ans = false;
cout << (ans ? "Yes" : "No") << '\n';
return 0;
}
struct ios_do_not_sync{
ios_do_not_sync(){
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr);
}
} ios_do_not_sync_instance;
Nachia