結果
| 問題 |
No.2397 ω冪
|
| コンテスト | |
| ユーザー |
👑 testestest
|
| 提出日時 | 2022-11-18 20:42:00 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 462 bytes |
| コンパイル時間 | 75 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 13,684 KB |
| 最終ジャッジ日時 | 2024-09-20 01:22:00 |
| 合計ジャッジ時間 | 2,454 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 37 WA * 4 |
ソースコード
def check(A,B,f):
# return A<B
AA=f(A)
BB=f(B)
for aa,bb in zip(AA,BB):
if aa!=bb:
return check(aa,bb,f)
return len(AA)<len(BB)
def f(S):
temp=[]
cnt=0
for c in S[::-1]:
if c=='0':
cnt+=1
else:
temp.append(bin(cnt)[2:])
cnt=0
ans=[]
for s in temp[::-1]:
#while len(ans) and check(ans[-1],s,f):
# ans.pop()
ans.append(s)
return ans
N=input()
M=input()
print("Yes" if check(N,M,f) else "No")
testestest