結果

問題 No.2283 Prohibit Three Consecutive
ユーザー miho-4miho-4
提出日時 2023-04-28 23:39:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 200 bytes
コンパイル時間 216 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 77,952 KB
最終ジャッジ日時 2024-04-29 00:43:29
合計ジャッジ時間 2,022 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,096 KB
testcase_01 AC 35 ms
52,480 KB
testcase_02 AC 35 ms
51,584 KB
testcase_03 AC 38 ms
53,376 KB
testcase_04 AC 39 ms
53,756 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 39 ms
52,224 KB
testcase_09 AC 42 ms
52,864 KB
testcase_10 AC 40 ms
52,224 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for _ in range(T):
  n=int(input())
  s=input()
  x=s+s
  flag=1
  S={"111","000","11?00","00?11"}
  for e in S:
    if e in x:
      flag=0
      break
  print("Yes" if flag else "No")
0