Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- #include <stdio.h>
- using namespace std;
- int main()
- {
- freopen("lesson.in", "r", stdin);
- freopen("lesson.out", "w", stdout);
- long int a, b, c, d;
- cin >> a >> b >> c >> d;
- long long maxx = max(max(a*(b+c-d), d*(c+b-a)), max(c*(a+d-b), b*(d+a-c)));
- if (a*(b+c-d) == maxx)
- cout << 0;
- else if (c*(a+d-b) == maxx)
- cout << 1;
- else if (d*(c+b-a) == maxx)
- cout << 2;
- else if (b*(d+a-c) == maxx)
- cout << 3;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement