T3000

Untitled

Jan 5th, 2022
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.66 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2.  
  3. using namespace std;
  4.  
  5. int main(){
  6.      int a,b,c,s1,s2,s3,z1,z2,a1;
  7.      
  8.      cin>>a;
  9.      while(a>0){
  10.          z1=0;
  11.          z2=0;
  12.          cin>>c>>b;
  13.           s2=b;
  14.           for(int i=1;z1==0 || z2==0;i++){
  15.               a1=i;
  16.              if(z1==0){
  17.                  if(0a1==b){
  18.                      z1=1;
  19.                      s1=i;
  20.                  }
  21.                  if(0xa1==b){
  22.                      z2=1;
  23.                      s3=i;
  24.                  }
  25.              }
  26.  
  27.           }
  28.          
  29.        cout<<c<<" "<<s1<<" "<<s2<<" "<<s3<<endl;
  30.        
  31.        a-=1;
  32.  
  33.      }
  34.      
  35.      
  36.      
  37.      
  38.     return 0;
  39. }
Advertisement
Add Comment
Please, Sign In to add comment