Skip to content

Instantly share code, notes, and snippets.

@fredbr

fredbr/sedex.cpp Secret

Last active May 8, 2018 20:59
Show Gist options
  • Save fredbr/028ccd3a9315c801495b38b71383ec38 to your computer and use it in GitHub Desktop.
Save fredbr/028ccd3a9315c801495b38b71383ec38 to your computer and use it in GitHub Desktop.
Sedex Marciano
// solucao de Davi Gabriel
#include <bits/stdc++.h>
using namespace std;
int main() {
int l, a, p, r;
cin >> l >> a >> p >> r;
int d1 = pow(l/2, 2);
int d2 = pow(a/2, 2);
int d3 = pow(p/2, 2);
int d = sqrt(d1 + d2 + d3);
if(d > r){
cout << "N\n";
}
else{
cout << "S\n";
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment