Problem link– https://www.codechef.com/ABCS2017/problems/ABCS04
right approach?
Problem description:
Geek Sundaram is a world renowned Master Chef. One of his signature dishes include Idly and Vada.
Each day he prepares M Idlies and N vadas and places them in a bucket. He asks his customers to pick two items from the bucket in whatever order they desire.
After picking two items, each customer is asked to place a vada back into the bucket if they had picked two similar items or else place an idly into the bucket.
At the end of the day, Geek is left with one item in the bucket. He is keen to find out what the last item could be since he doesn’t know the order in which the customers picked and replaced.
Help Geek find the last item.
Print one of the following as the output:
“IDLY” - if the last item is idly.
“VADA” - if the last item is vada.
“SAMBAR” - if the last item is unknown.