結果

問題 No.1941 CHECKER×CHECKER(1)
ユーザー kmoyashikmoyashi
提出日時 2022-05-20 21:25:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 2,874 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 81,776 KB
実行使用メモリ 53,492 KB
最終ジャッジ日時 2023-10-20 11:41:41
合計ジャッジ時間 1,475 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,492 KB
testcase_01 AC 37 ms
53,492 KB
testcase_02 AC 38 ms
53,492 KB
testcase_03 AC 37 ms
53,492 KB
testcase_04 AC 38 ms
53,492 KB
testcase_05 AC 39 ms
53,492 KB
testcase_06 AC 36 ms
53,492 KB
testcase_07 AC 37 ms
53,492 KB
testcase_08 AC 37 ms
53,492 KB
testcase_09 AC 38 ms
53,492 KB
testcase_10 AC 40 ms
53,492 KB
testcase_11 AC 37 ms
53,492 KB
testcase_12 AC 37 ms
53,492 KB
testcase_13 AC 39 ms
53,492 KB
testcase_14 AC 37 ms
53,492 KB
権限があれば一括ダウンロードができます

ソースコード

diff #


# from functools import reduce

# def gcd(*numbers):
#     return reduce(math.gcd, numbers)


# readline = sys.stdin.readline
# write = sys.stdout.write
# flush = sys.stdout.flush

# sys.setrecursionlimit(500000)

# def input():
#     return sys.stdin.readline()[:-1]

mod = 998244353

def sum_range(n):
	return n * (n + 1) // 2

def yes(r=True):
    if r:
        print('Yes')

def yes_exit(r=True):
    if r:
        print('Yes')
        exit()

def no(r=True):
    if r:
        print('No')

def no_exit(r=True):
    if r:
        print('No')
        exit()

def yes_no(r):
    print('Yes' if r else 'No')

def yes_no_exit(r):
    print('Yes' if r else 'No')
    exit()

# S = input()
# N = int(input())
# H = int(input())
# K = int(input())
# Q = int(input())
# T = int(input())
# W = int(input())
# X = int(input())
# N = input()
# S = input()
S1 = input()
S2 = input()
S3 = input()
# T = input()
# N, K = map(int, input().split())
# N, M = map(int, input().split())
# N, Q = map(int, input().split())
# N, W = map(int, input().split())
# N, X = map(int, input().split())
# H, W = map(int, input().split())
# R, C = map(int, input().split())
# L, R = map(int, input().split())
# a, b = map(int, input().split())
# a, N = map(int, input().split())
# N, X, Y = map(int, input().split())
# N, A, B = map(int, input().split())
# A, B, K = map(int, input().split())
# N, M, K = map(int, input().split())
# V, A, B, C = map(int, input().split())
# A, B, C, D = map(int, input().split())
# A, B, C, X = map(int, input().split())
# N, M, K, S, T, X = map(int, input().split())
# A = list(map(int, input().split()))
# C = list(map(int, input().split()))
# H = list(map(int, input().split()))
# T = list(map(int, input().split()))
# P = list(map(lambda x: int(x) - 1, input().split()))
# S = input()
# Q = int(input())
# A = input().split()
# S = input().split()
# T = input().split()
# N = list(input())
# S = list(input())
# X = [int(input()) for _ in range(N)]
# X = [int(input()) for _ in range(Q)]
# A = [input().split() for _ in range(N)]
# A = [list(map(int, input().split())) for _ in range(N)]
# A = [list(map(int, input().split())) for _ in range(H)]
# G = [list(map(int, input().split())) for _ in range(M)]
# querys = [list(map(int, input().split())) for _ in range(Q)]
# querys = [input() for _ in range(Q)]
# T = [list(map('.#'.index, input())) for _ in range(H)]
# S = list(map('LR'.index, input()))
# S = list(map('ULR'.index, input()))


def main():
    # import collections
    # import math
    # import queue
    # import random
    # import copy
    # import sys
    pass

    v = ""
    for S in [S1, S2, S3]:
        t = ""
        if v == S[0]:
            no()
            return
        v = S[0]
        for s in S:
            if t == s:
                no()
                return 
            t = s
    yes()


if __name__ == "__main__":
    main()
0