Author: Hasan Jaddouh
Tester: Alexey Zayakin
Editorialist: Oleksandr Kulkov DIFFICULTY:
You’re given four numbers
a, b, c, d. You have to determine if you can make a rectangle of such lengthes. QUICK EXPLANATION
Do what the problem asks you to do.
In other words you have to check if two smallest and two largest numbers among this four are same. To do this you can sort all four numbers in whatever way you like and check that first two and last two numbers are both same. Example of solution:
cin >> a >> a >> a >> a;
sort(a, a + 4);
cout << (a == a && a == a ? "YES" : "NO") << "\n";
AUTHOR’S AND TESTER’S SOLUTIONS:
Author’s solution can be found
Tester’s solution can be found here. RELATED PROBLEMS:
printf(“enter the no of test cases”);
printf(“entrt the values of sides”);
January 16, 2018, 3:10pm
Exactly same solution i did…
January 17, 2018, 11:24am
your Editorials are not visible below the questions we need to find editorial in discussion part. kindly add a link below question its self
using namespace std;
//what’s wrong with my code. I haven’t used sort function.
What if its a square? Square is a rectangle with length=breadth.