Consider a 2d plane and a Robot which is located at (0,0) who can move only one unit step at a time in any direction ie if its initial position is (x,y) he can go to positions (x + 1, y), (x - 1, y), (x, y + 1) or (x, y - 1). Now Given three integers a,b (denoting the final position where the robot has

to reach) and x (denoting the steps in which he has to reach).

**Input:**

First line of input contains of an integer 'T' denoting number of test cases Then T test cases follow .

Each test case contains three integers a,b and x .

**Output:**

For each case print 1 if robot can reach the destination (a,b) in exactly x steps, print 0 if he can't.

**Note :** No matter where the robot is in between he must be present at final destination at xth step.

**Constraints**:

1 <= T <= 50

10^{(-9)} <= a,b <= 10^{9}

1 <= x <= 2*10^{9}

**Example**:

**Input**:

2

5 5 11

10 15 25

**Output**:

0

1

Author: hardikgulati96

If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.

jhasaurabh312 | 138 |

Aaaaarohiiii | 136 |

Harsha_kunchala | 128 |

tushki | 124 |

RajaRajput | 117 |

ARUN_PUNDIR | 617 |

manishgupta8497 | 607 |

Abhimanyu_kumar | 559 |

KhyatiSoneji | 501 |

Aman___Jain | 496 |

blackshadows | 5335 |

Ibrahim Nash | 5223 |

akhayrutdinov | 5111 |

mb1973 | 4929 |

Quandray | 4567 |

Login to report an issue on this page.