結果

問題 No.3644 Division by Shitoshitoto Sequence
コンテスト
ユーザー amesyu
提出日時 2026-08-25 14:53:50
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 322 ms / 2,000 ms
+ 815µs
コード長 433 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 236 ms
コンパイル使用メモリ 95,592 KB
実行使用メモリ 158,672 KB
最終ジャッジ日時 2026-08-25 14:54:04
合計ジャッジ時間 6,248 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
サブタスク 配点 結果
サンプル 0 % AC * 1
小課題1 10 % AC * 3
小課題2 20 % AC * 2
小課題3 70 % AC * 21
合計 100 点
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# 全部決まっとるやんけ
t = int(input())

def is_shitoshito(arr):
    if len(arr) != 5: return False
    x1, x2, x3, x4, x5 = arr
    if x1 == x3 and x2 == x4 == x5 and x1 != x2: return True
    return False

def solve():
    n = int(input())
    a = list(map(int, input().split()))
    if all(is_shitoshito(a[5*i:5*i+5]) for i in range(n)):
        print("Yes")
    else:
        print("No")
for _ in range(t):
    solve()
0