fork download
  1. //Lottery Winner
  2. #include<bits/stdc++.h>
  3. #define pi 3.141592653589793
  4. #define ll long long int
  5. #define Allv v.begin(),v.end()
  6. #define fast ios_base::sync_with_stdio(0); cin.tie(0);
  7. #define yes cout<<"YES"<<endl
  8. #define no cout<<"NO"<<endl
  9. using namespace std;
  10. void solve()
  11. {
  12. ll x,y,z,w;
  13. cin>>x>>y>>z>>w;
  14. if(x==w) cout<<"Congratulation Joy!\n";
  15. else if(y==w) cout<<"Congratulation Viru!\n";
  16. else if(z==w) cout<<"Congratulation Sole!\n";
  17. else cout<<"Oops no one won!!\n";
  18. }
  19. int main()
  20. {
  21.  
  22.  
  23. solve();
  24. return 0;
  25.  
  26. }
  27.  
  28.  
Success #stdin #stdout 0s 5536KB
stdin
34563 45687 54278 34563
stdout
Congratulation Joy!