Problem Link
Solution :-
Algo : ত্রিভুজ তখনি হবে যদি যেকোন দুইটি বাহুর যোগফল অপর বাহুর অপেক্ষা বড় হয় ।
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
/*------------------------------------------------*/ //Uva Problem No: 11936 //Problem Name : The Lazy Lumberjacks //Type : Ad hoc,Geometry. //Author : Shipu Ahamed //University : BUBT //E-mail : shipuahamed01@gmail.com /*------------------------------------------------*/ #include<cstdio> #include<cstring> #include<string> #include<cmath> #include<iostream> #include<cctype> #include<map> #include<stack> #include<cstdlib> #include <queue> #include <vector> #include<algorithm> #define ll long long #define sc scanf #define pf printf #define Pi 2*acos(0.0) using namespace std; int main() { int t; sc("%d",&t); while(t--) { ll a,b,c; sc("%lld%lld%lld",&a,&b,&c); if(a+b>c && b+c>a && a+c>b) pf("OKn"); else pf("Wrong!!n"); } return 0; } |