fork(1) download
  1. #include <algorithm>
  2. #include <iostream>
  3. #include <vector>
  4.  
  5. int main()
  6. {
  7. std::vector<int> choice(4);
  8. for(int i = 0; i < 4; ++i) {
  9. std::cin >> choice[i];
  10. }
  11. std::sort(std::begin(choice), std::end(choice));
  12. if(choice == std::vector<int>{ 1, 3, 4, 6 }) { // 1, 3, 4, 6 should be sorted.
  13. // equal
  14. std::cout << "equal\n";
  15. } else {
  16. // different
  17. std::cout << "different\n";
  18. }
  19.  
  20. }
  21.  
Success #stdin #stdout 0s 3432KB
stdin
6 1 3 4
stdout
equal