 # Unofficial editorial-TWOGRS

Lets make it easy and clear ! Observation : - Answer is “NO” if (a+2*b+3*c) is odd. Agree?

If (a+2*b+3*c) is even:-

Answer is always “YES” , if a>=1 , b>=1 and c>=1

Proof:-
1)If a,b,c are even, answer is “YES”
2)If a,b,c are odd, answer is “YES”
3)If a=even and b,c=odd , this case is not allowed as the sum is odd 4) If a=odd and b,c=even, this case is not allowed as the sum is odd 5)If b=even and a,c=odd , answer is “YES” 6) If b=odd and a,c=even,answer is “YES” 5)If c=even and a,b=odd , this case is not allowed as the sum is odd 6) If c=odd and a,b=even,this case is not allowed as the sum is odd Now, the only cases left are :- When one of the values (a,b,c) are zero or two of the values of (a,b,c) are zero.

I have discussed them here :- TWOGRS - Editorial

That exact post : -
This is the easiest I can explain guys -

1] If the sum (1*a+2*b+3*c==even) of all numbers is even, we check for something , else (Answer–>No).
(If sum is even, then only a set can be divided into 2-equal sets, agreed?)

2]If sum is even, and all a,b,c are positive. Answer is always Yes(you can try it yourself).

3)If sum is even and a=0 and c=0, just check the value of 'b'.

4)If sum is even, a=1 and c=odd number and b=0, answer is No.

5)If sum is even, b=1 and c=even number and a=0, answer is No.

6)For all others, answer is yes.

Link to my solution : -Very Short Code(https://www.codechef.com/viewsolution/26750930)

23 Likes

Katai zehar…awesome

2 Likes

(though i don’t feel it’s necessary)
but yeah, nice very well done

1 Like

@jainaayush @chayanj450 u have to see this solution…

@moha08 Check this solution.

Hey ashutosh …can we please talk on FB.

Added the link   1 Like

Sure @ssrivastava990

1 Like

Loved it ! Thanks for writing this

1 Like

This post was flagged by the community and is temporarily hidden.

How did you think of this ? I also saw some of the solutions in submissions and a lot of them were using just if/else statements like these…Am i the only dumb person ?

1 Like

Nope, you are not ! I personally found this problem harder than 1st question of Div-1 1 Like

1 Like

@anon55659401 bahut hard bhai…nice explanation

1 Like

bilkul_hard    @anon55659401 bhai wo STRSUB avi tk nhi btaya 1 Like

Abhi toh kuch kaam kar rha hu, jald hi likh dunga bro.
(English Translation:-I am currently working on something, I’ll write its editorial soon )

@anon55659401 ekdum bhai…
english me-okk bro… 1 Like

@anon55659401 bhaiya apka solution to samaj aa gya but editorial ka nhe aya.
kya editorial samajna jrore nhe (newbie coder)?

1 Like

As long as you understand the solution(any!), its all fine 