Skip to content

Commit 1f9d0fc

Browse files
Merge pull request jitendrajat10099#22 from SN786/master
CATSDOGS.cpp
2 parents 25c585f + 3a63f62 commit 1f9d0fc

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

Codechef/CATSDOG.cpp

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/* Link to the problem: https://www.codechef.com/problems/CATSDOGS/ */
2+
#include<bits/stdc++.h>
3+
using namespace std;
4+
int main()
5+
{
6+
int t;
7+
cin>>t;
8+
while(t--)
9+
{
10+
long long int c,d,l;
11+
cin>>c>>d>>l;
12+
if(l<=(c+d)*4&&l>=(c-d)*4&&l>=d*4&&l%4==0)
13+
{
14+
cout<<"yes"<<endl;
15+
16+
}
17+
18+
else
19+
{
20+
cout<<"no"<<endl;
21+
}
22+
}
23+
return(0);
24+
}

0 commit comments

Comments
 (0)