After calculating the size comparison of two strings the main q^2=q+1 is obviously Fibonacci number
100,000-bit definitely super ll I'm in each of the only two to be within the AC
#include <bits/stdc++.h>using namespace Std;int a[100020];char s1[100020],s2[100020];int main () {scanf ("%s%s", S1,S2); int Len1=strlen (S1), Len2=strlen (S2); for (int i=len1-1;i>=0;i--) {if (s1[i]== ' 1 ') a[len1-i-1]++; } for (int i=len2-1;i>=0;i--) {if (s2[i]== ' 1 ') a[len2-i-1]--; } for (int i=100000;i>=2;i--) {if (a[i]==1) {a[i-1]++; a[i-2]++; } else if (a[i]>=2) {a[i-1]+=2; a[i-2]+=2; } else if (a[i]==-1) {a[i-1]--; a[i-2]--; } else if (a[i]<=-2) {a[i-1]-=2; a[i-2]-=2; } a[i]=0; } Double x= (sqrt (5) +1)/2; if (a[1]*x+a[0]>0) printf (">\n"); else if (a[1]*x+a[0]<0) printf ("<\n"); else printf ("=\n"); return 0;}
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
Codeforces 458A Golden System