結果

問題 No.2343 (l+r)/2
ユーザー kobaryo222kobaryo222
提出日時 2023-06-09 21:28:39
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 245 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 10,516 KB
実行使用メモリ 18,004 KB
最終ジャッジ日時 2023-08-30 12:54:15
合計ジャッジ時間 1,820 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,200 KB
testcase_01 AC 376 ms
9,172 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 37 ms
18,004 KB
testcase_05 AC 29 ms
12,556 KB
testcase_06 AC 28 ms
11,468 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 26 ms
9,280 KB
testcase_11 AC 29 ms
9,588 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 31 ms
9,776 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import re
from sys import stdin

T = int(stdin.readline())
for _ in range(T):
    N = stdin.readline()
    S = stdin.readline().strip().replace(' ', '')
    if re.match('((1+0+)|(0+1+))+\Z', S):
        print('Yes')
    else:
        print('No')
0