/in/foo.cc: In function 'int main()':
/in/foo.cc:102:37: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type {aka double}' and 'int' to binary 'operator%'
if(A==0&&B!=0)ans+=abs(tr[B].d-x)%1000000,del(tr[B].d);
~~~~~~~~~~~~~~^~~~~~~~
/in/foo.cc:103:42: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type {aka double}' and 'int' to binary 'operator%'
else if(B==0&&A!=0)ans+=abs(tr[A].d-x)%1000000,del(tr[A].d);
~~~~~~~~~~~~~~^~~~~~~~
/in/foo.cc:106:57: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type {aka double}' and 'int' to binary 'operator%'
if(abs(tr[B].d-x)>abs(tr[A].d-x))ans+=abs(tr[A].d-x)%1000000,del(tr[A].d);
~~~~~~~~~~~~~~^~~~~~~~
/in/foo.cc:107:29: error: invalid operands of types '__gnu_cxx::__enable_if<true, double>::__type {aka double}' and 'int' to binary 'operator%'
else ans+=abs(tr[B].d-x)%1000000,del(tr[B].d);
~~~~~~~~~~~~~~^~~~~~~~