0_0_15680519_24901.cpp: In function 'int searchindex(long long int)':
0_0_15680519_24901.cpp:2:90: error: 'alen' was not declared in this scope
int searchindex(long long m){int l=1,r=54,mid,ans=0; while(l <= r){mid = (l+r)/2;if(m == alen[mid]) return mid; if(m > alen[mid]){l = mid + 1;ans = (mid > ans ? mid : ans);}else r = mid - 1;}return ans; }
^
0_0_15680519_24901.cpp:2:120: error: 'alen' was not declared in this scope
int searchindex(long long m){int l=1,r=54,mid,ans=0; while(l <= r){mid = (l+r)/2;if(m == alen[mid]) return mid; if(m > alen[mid]){l = mid + 1;ans = (mid > ans ? mid : ans);}else r = mid - 1;}return ans; }
^
0_0_15680519_24901.cpp: In function 'int main()':
0_0_15680519_24901.cpp:3:88: error: 'aans' was not declared in this scope
int main(){ long long ans = 1, len =1; for(int i = 1; len <= 10000000000000000*2; ++i){aans[i] = ans;alen[i] = len;ans += (ans + len + 1);len += (len + 1);} int T; scanf("%d", &T);long long m,tans; while(T--){scanf("%lld", &m);tans = 0; while(m>0){int x1 = searchindex(m);m -= alen[x1];tans += aans[x1];if(m <= 0) break;tans += m;m-=1;}printf("%lld\n", tans);}return 0;}
^
0_0_15680519_24901.cpp:3:102: error: 'alen' was not declared in this scope
int main(){ long long ans = 1, len =1; for(int i = 1; len <= 10000000000000000*2; ++i){aans[i] = ans;alen[i] = len;ans += (ans + len + 1);len += (len + 1);} int T; scanf("%d", &T);long long m,tans; while(T--){scanf("%lld", &m);tans = 0; while(m>0){int x1 = searchindex(m);m -= alen[x1];tans += aans[x1];if(m <= 0) break;tans += m;m-=1;}printf("%lld\n", tans);}return 0;}
^
0_0_15680519_24901.cpp:3:278: error: 'alen' was not declared in this scope
int main(){ long long ans = 1, len =1; for(int i = 1; len <= 10000000000000000*2; ++i){aans[i] = ans;alen[i] = len;ans += (ans + len + 1);len += (len + 1);} int T; scanf("%d", &T);long long m,tans; while(T--){scanf("%lld", &m);tans = 0; while(m>0){int x1 = searchindex(m);m -= alen[x1];tans += aans[x1];if(m <= 0) break;tans += m;m-=1;}printf("%lld\n", tans);}return 0;}
^
0_0_15680519_24901.cpp:3:295: error: 'aans' was not declared in this scope
int main(){ long long ans = 1, len =1; for(int i = 1; len <= 10000000000000000*2; ++i){aans[i] = ans;alen[i] = len;ans += (ans + len + 1);len += (len + 1);} int T; scanf("%d", &T);long long m,tans; while(T--){scanf("%lld", &m);tans = 0; while(m>0){int x1 = searchindex(m);m -= alen[x1];tans += aans[x1];if(m <= 0) break;tans += m;m-=1;}printf("%lld\n", tans);}return 0;}
^
|