Skip to content

Commit f3fba53

Browse files
committed
Sept Long : Airline Restrictions
1 parent 15fd5a5 commit f3fba53

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

Airline-Restrictions.cpp

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
// Codechef Septempter Long Challenge DIV 3
2+
// Airline Restrictions
3+
#include<iostream>
4+
using namespace std;
5+
6+
int main()
7+
{
8+
int num_of_test_cases ;
9+
cin>>num_of_test_cases;
10+
int arr[5];
11+
for (int i = 0; i < num_of_test_cases; i++)
12+
{
13+
for (int j = 0; j < 5; j++)
14+
{
15+
cin>>arr[j];
16+
}
17+
int A , B , C , D , E ;
18+
A = arr[0];
19+
B = arr[1];
20+
C = arr[2];
21+
D = arr[3];
22+
E = arr[4];
23+
(A + B <= D && C <=E) || (A + C <=D && B <= E) || (B + C <= D && A <= E) ? cout<<"yes" : cout<<"no" ;
24+
}
25+
26+
return 0 ;
27+
}

0 commit comments

Comments
 (0)