結果
問題 |
No.3015 右に寄せろ!
|
ユーザー |
![]() |
提出日時 | 2025-01-25 16:47:32 |
言語 | PyPy3 (7.3.15) |
結果 |
TLE
|
実行時間 | - |
コード長 | 509 bytes |
コンパイル時間 | 403 ms |
コンパイル使用メモリ | 82,700 KB |
実行使用メモリ | 862,408 KB |
最終ジャッジ日時 | 2025-01-25 23:55:40 |
合計ジャッジ時間 | 40,225 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge7 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 TLE * 11 MLE * 1 |
ソースコード
import pypyjit pypyjit.set_param("max_unroll_recursion=-1") import sys sys.setrecursionlimit(10**7) from collections import deque S = input() stack = [] def f(): global ans ans += 1 for _ in range(3):stack.pop() stack.append("0") if(len(stack) > 2): if(stack[-3:] == ["1","1","0"]):f() stack.append("1") stack.append("1") ans = 0 for i in range(len(S)): stack.append(S[i]) if(len(stack) <= 2):continue if(stack[-3:] == ["1","1","0"]): f() print(ans)