結果
| 問題 |
No.1941 CHECKER×CHECKER(1)
|
| コンテスト | |
| ユーザー |
piyopiyonamako
|
| 提出日時 | 2022-05-20 23:00:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 2,273 bytes |
| コンパイル時間 | 1,635 ms |
| コンパイル使用メモリ | 170,732 KB |
| 実行使用メモリ | 9,696 KB |
| 最終ジャッジ日時 | 2024-09-20 09:23:45 |
| 合計ジャッジ時間 | 2,146 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef string st ;
typedef long double ld ;
typedef pair<int, int> pi;
typedef pair<ll,ll> pl ;
typedef tuple<int,int,int> ti ;
typedef tuple<ll,ll,ll> tl ;
typedef vector<vector<int>> vi ;
typedef vector<vector<ll>> vl ;
typedef vector<vector<bool>> vb ;
typedef vector<vector<st>> vs ;
typedef vector<vector<char>> vc;
const ll mod0 = 1000000007;
const ll mod1 = 998244353 ;
const ll LINF = (1LL << 60);
const int INF = (1 << 30);
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define all(x) x.begin(), x.end()
#define rep(i,a,n) for (ll i = a; i <= (n); ++i)
#define f first
#define s second
#define re return 0;
#define fore(i,a) for(auto &i:a)
ll gcd(ll a, ll b){
if(b == 0){
return a;
}
return gcd(b,a%b) ;
}
ll lcm(ll a, ll b){
ll ans = a*b /gcd(a,b) ;
return ans ;
}
bool nis(ll q){
// 素数だったらtrue ,素数じゃなかったらfalse
if(q == 1){
return false ;
}
for(ll i=2;i*i <=q;i++){
if(q%i == 0){
return false ;
}
}
return true ;
}
ll digit_sum(ll a){
ll sum = 0;
while(a > 0){
sum += a%10 ;
a /= 10 ;
}
return sum ;
}
#define C cout
#define E endl;
const ll dx[4] = { 1, 0, -1, 0 };
const ll dy[4] = { 0, 1, 0, -1 };
// ↑↑↑ 型が ll であることに注意 !!!!
st Y = "Yes" ;
st YY = "No" ;
vector<ll> G[1 << 18] ;
int main(void){
vector<st> S(3);
rep(i,0,2){
cin>>S[i] ;
}
bool flag = true ;
rep(i,0,2){
rep(j,0,2){
if(i-1 >= 0){
if(S[i][j] == S[i-1][j])flag = false ;
}
if(i + 1 <= 2){
if(S[i][j] == S[i+1][j])flag = false ;
}
if(j + 1 <= 2){
if(S[i][j] == S[i][j+1])flag = false ;
}
if(j-1 >= 0){
if(S[i][j] == S[i][j-1])flag = false ;
}
}
}
if(flag == true){
C << Y << E
}else{
C << YY << E
}
re
}
piyopiyonamako