Help me in solving MAKEAP problem

My issue

can expain it

My code

#include <iostream>
using namespace std;

int main() {
	// your code goes here
	return 0;

Problem Link: MAKEAP Problem - CodeChef

U have to make A ,B, C as Ap which only be possible when B is valid mean of A and C which means either A and C both should be even or they both should be odd and for else case its not possible.