fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. int main(){
  5. ios_base::sync_with_stdio(false);
  6. cin.tie(NULL);
  7. ll t;
  8. cin>>t;
  9. for(int j=0;j<t;j++){
  10. ll n;
  11. cin>>n;
  12. ll a,b,c;
  13. cin>>a>>b>>c;
  14.  
  15. ll d1=a-1;
  16. ll d2=abs(b-c) + c-1;
  17.  
  18. if(d1 < d2){
  19. cout<<1<<endl;
  20. }
  21. if( d1 > d2){
  22. cout<<2<<endl;
  23. }
  24. if(d1 == d2){
  25. cout<<3<<endl;
  26. }
  27. }
  28.  
  29. return 0;
  30. }
Success #stdin #stdout 0.01s 5540KB
stdin
Standard input is empty
stdout
1