Problem Code: ZCO14003

My bad I pasted the link at first but it showed some error and then copy pasted the code

THe problem code is [ ZCO14003] : CodeChef: Practical coding for everyone
CodeChef: Practical coding for everyone

here i took average of all the cost and then found the element in the array{a[c]} that is near to average (in near function and then counted the costs that are greater than a[c]
multiplied with min*a[c]
where most of the solutions given right solution but not all

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

1 Like

Please first provide a link to the question, then provide a link to your submission(i.e. dont copy paste the code provide a link to your codechef submission), shortly explain what your code does or what was your thinking going on because it is hard to read others code and then debug for you and mostly no one does.