In the kingdom of Westeros, Catelyn Tully is interested so much in gardening and she plants more trees in her garden. She plants trees in a rectangular fashion with the order of rows and columns. She numbered the trees in column wise order and planted mango tree only in the 1st row, 1st column and last column. So given the tree number, write a program to find whether the given number denotes a mango tree or not?
Answers
Answered by
0
Answer:
Explanation:
e , . of and in to a " - was is for on ' that as with ) ( by s it he at from his an are : this ... had one their also its who first you new after all been her she more / when two ... buildings products daily quality follow ability 1995 expected plant initially 200 ... density offensive trees falls cards jim concert faith ray missing theater actress ...
Answered by
1
Answer:
#include<iostream>
using namespace std;
int main()
{
int r,c,n;
cin>>r>>c>>n;
if(n<r || n>r*(c-1) || n%r==1)
cout<<"Yes";
else
cout<<"No";
}
Explanation:
Similar questions