Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <algorithm>
- using namespace std;
- int main() {
- int ar[4];
- cin >> ar[0];
- cin >> ar[1];
- cin >> ar[2];
- cin >> ar[3];
- bool b = 0;
- sort(ar, ar + 4);
- for (int i = 0; i < sizeof(ar) / sizeof(int) - 2; i++) {
- for (int j = i + 2; j < sizeof(ar) / sizeof(int); j++) {
- if (ar[i] + ar[i+1]> ar[j]) b = 1;
- }
- }
- if (b) cout << "S";
- else cout << "N";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement