Skip to content

Instantly share code, notes, and snippets.

@Thiago4532
Created June 17, 2020 01:59
Show Gist options
  • Select an option

  • Save Thiago4532/c6a3b9e6bb0b0decc7d522006a7a3668 to your computer and use it in GitHub Desktop.

Select an option

Save Thiago4532/c6a3b9e6bb0b0decc7d522006a7a3668 to your computer and use it in GitHub Desktop.
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
int w1, h1, w2, h2;
cin >> w1 >> h1 >> w2 >> h2;
if (w1 + w2 <= n && h1 + h2 <= n) {
cout << "S\n";
}else if (w1 + h2 <= n && w2 + h1 <= n) {
cout << "S\n";
}else {
cout << "N\n";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment