結果
| 問題 | No.3823 Make 1 |
| コンテスト | |
| ユーザー |
kidodesu
|
| 提出日時 | 2026-11-22 13:30:40 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 496 bytes |
| 記録 | |
| コンパイル時間 | 80 ms |
| コンパイル使用メモリ | 64,352 KB |
| 実行使用メモリ | 57,476 KB |
| 最終ジャッジ日時 | 2026-11-22 13:30:47 |
| 合計ジャッジ時間 | 6,811 ms |
|
ジャッジサーバーID (参考情報) |
judge6_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 12 |
ソースコード
def main():
n = int(input())
S = input()
i = 0
x = 0
while i < n:
j = i
while j < n and S[i] == S[j]:
j += 1
c = j-i
i = j
if x % 2:
c -= 1
x -= 1
x = x//2+c
if S[-1] == "1":
while not x % 4:
x //= 4
t = 1
else:
while not x % 4:
x //= 4
t = 2
return "Yes" if x == t else "No"
for _ in range(int(input())):
print(main())
kidodesu