結果

問題 No.3644 Division by Shitoshitoto Sequence
コンテスト
ユーザー titia
提出日時 2026-08-31 02:24:07
言語 Python3
(3.14.7 + numpy 2.5.2 + scipy 1.18.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 309 ms / 2,000 ms
+ 251µs
コード長 366 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 289 ms
コンパイル使用メモリ 21,340 KB
実行使用メモリ 69,588 KB
最終ジャッジ日時 2026-08-31 02:24:21
合計ジャッジ時間 9,007 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_0
このコードへのチャレンジ
(要ログイン)
サブタスク 配点 結果
サンプル 0 % AC * 1
小課題1 10 % AC * 3
小課題2 20 % AC * 2
小課題3 70 % AC * 21
合計 100 点
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import sys
input = sys.stdin.readline

T=int(input())

for tests in range(T):
    N=int(input())
    A=list(map(int,input().split()))


    flag=1
    for i in range(0,len(A),5):
        if A[i]==A[i+2] and A[i]!=A[i+1] and A[i+1]==A[i+3]==A[i+4]:
            pass
        else:
            flag=0

    if flag==1:
        print("Yes")
    else:
        print("No")
0