結果

問題 No.2518 Adjacent Larger
コンテスト
ユーザー komkompi
提出日時 2023-10-27 22:21:37
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
WA  
実行時間 -
コード長 296 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 125 ms
コンパイル使用メモリ 85,592 KB
実行使用メモリ 100,096 KB
最終ジャッジ日時 2026-04-12 18:54:06
合計ジャッジ時間 2,858 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 12 WA * 16
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

# coding: utf-8
# Your code here!

T=int(input())

for _ in range(T):
    N=int(input())
    A=list(map(int,input().split()))
    
    dic={0:0,1:0,2:0}
    for a in A:
        dic[a]+=1
    
    if dic[2]==dic[0] and dic[0]>0 and dic[1]>0:
        print("Yes")
    else:
        print("No")
    
0