結果
問題 |
No.1694 ZerOne
|
ユーザー |
![]() |
提出日時 | 2021-10-02 00:18:47 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 472 bytes |
コンパイル時間 | 303 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,624 KB |
最終ジャッジ日時 | 2024-07-19 18:10:10 |
合計ジャッジ時間 | 2,456 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 WA * 20 |
ソースコード
import sys input = sys.stdin.readline S=input().strip() LEN=len(S) DP=[[0]*(62) for i in range(LEN+2)] DP[0][31]=1 for i in range(LEN+2): for j in range(62): DP[i][j]+=DP[i-1][j] if i<LEN-1: if S[i]=="0" and S[i+1]=="1": for j in range(61,-1,-1): DP[i+2][j]+=DP[i][j-1] if S[i]=="1" and S[i+1]=="0": for j in range(61): DP[i+2][j]+=DP[i][j+1] ANS=0 print(DP[-1][31])