My issue
can i get the vedio solution of this question(binary conversion)
My code
# cook your dish here
for i in range(int(input())):
n,k=map(int,input().split())
s=input()
t=input()
co=0
a=s.count('0');b=s.count('1')
c=t.count('0');d=t.count('1')
if a!=c or b!=d:
print("NO")
continue
for j in range(n):
if s[j]=='0' and s[j]!=t[j]:
co+=1
if co>k:
print("NO")
continue
if co%2==k%2:
print("YES")
elif max(a,b)>1:
print("YES")
else:
print("NO")
Problem Link: Binary Conversion Practice Coding Problem