This problem is the easiest problem in the set. We take the price for each menu, and check whether it is a Ciel number naively. For example, we can take the price as the last element by splitting each line by a single space.
TO ALL THOSE PEOPLE WHO ARE SOLVING THIS QUESTION READ BELOW :
1.THIS QUESTION TEST CASES HAVE ERRORS. ERROR IS IN ‘N’. IN ONE TEST CASE N IS SPECIFIED ALONG WITH 2 CHARACTERS FURTHER. HENCE :scanf("%d",&n); WILL GIVE YOU ALL WRONG ANSWER. HENCE USE : scanf("%d",&n); getchar(); getchar();
YES , USE THEM 2 TIMES TO GET THE RIGHT INPUT OR USE gets(string) TO The ELIMINATE ERROR.If you just use :
scanf("%d",&n);
getchar(); // used to eliminate new line character
you will get wrong answer .
@admin@laycurse PLEASE RECTIFY THIS ERROR AND DO NOT POST SUCH QUESTIONS WHICH HAVE WRONG TEST CASES.