fork(1) download
  1. #include <type_traits>
  2. #include <stdexcept>
  3. #include <cstdlib>
  4. #include <iostream>
  5. namespace _k=std;
  6. using l=_k::overflow_error;
  7. template<typename _,typename=_k::enable_if_t<_k::is_integral<_>{}>>
  8. auto _1(_ w, _ t, _ f)throw(l)->decltype(!!_{}){
  9. if(w*w<=w*((_{}-1<_{}))*2-1||t*t<=t*((_{}-1<_{}))*2-1||f*f<=f*((_{}-1<_{}))*2-1)
  10. throw l{""};
  11. return w&&t&&f&&((w>t)?w:t)<f&&!(w*w-f*f+t*t);
  12. }
  13. auto main()->_k::common_type_t<decltype(EXIT_SUCCESS),decltype(EXIT_FAILURE)>{
  14. int a,b,c;
  15. _k::cin>>a>>b>>c;
  16. auto _=[&](auto..._){return[&](auto&&_d){_d<<(_1(_...)?"Ja":"Nein")<<'\n';};};
  17. try{
  18. _(a,b,c)(_k::cout);
  19. }catch(l&_){
  20. _k::cerr<<_.what();
  21. }
  22. }
Success #stdin #stdout 0s 3468KB
stdin
0
1
1
stdout
Standard output is empty