#include using namespace std; int main(){ int T; int A,B,C; cin>>T; for(int i=0;i>A>>B>>C; if((AC))&&(AB)&&(BC))&&(A>C)){cout<<"0";} else if(((AC))&&(A>C)){cout<<"0";} else if((A>B)&&(B>C)){ a=abs(A-B); b=abs(C-B); ans=min(a,b)+1; cout<