foo.cc:11:11: error: 'INT_MAX' was not declared in this scope
int r=0,l=INT_MAX-1,mid,ans=Inf,sum=0;
^~~~~~~
foo.cc:11:11: note: suggested alternative: 'INT8_MAX'
int r=0,l=INT_MAX-1,mid,ans=Inf,sum=0;
^~~~~~~
INT8_MAX
foo.cc: In function 'bool twice(long long int)':
foo.cc:27:2: error: 'sum' was not declared in this scope
sum=abs(tmp-t);
^~~
foo.cc: In function 'int main()':
foo.cc:40:3: error: 'mid' was not declared in this scope
mid=(l+r)>>1;
^~~
foo.cc:40:3: note: suggested alternative: 'main'
mid=(l+r)>>1;
^~~
main
foo.cc:43:3: error: 'ans' was not declared in this scope
ans=min(ans,sum);
^~~
foo.cc:43:3: note: suggested alternative: 'abs'
ans=min(ans,sum);
^~~
abs
foo.cc:43:15: error: 'sum' was not declared in this scope
ans=min(ans,sum);
^~~
foo.cc:45:2: error: 'ans' was not declared in this scope
ans=min(ans,sum);
^~~
foo.cc:45:2: note: suggested alternative: 'abs'
ans=min(ans,sum);
^~~
abs
foo.cc:45:14: error: 'sum' was not declared in this scope
ans=min(ans,sum);
^~~