Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Cooling Pies : COOLING

$
0
0

Code : http://ideone.com/FtzkyM

What is the error in my code?

After taking the input, the nested for loops are used to compare all the elements of array b (where I have stored the weights of the pies), with all elements of array c (where I have stored the eight limits of the racks). If the weight of a pie is greater than the weight limit of a rack, variable f is incremented by 1. If at the end of the inner for loop, f is equal to d (the number of pies), g is incremented by 1. g is used for counting the number of pies that can not be cooled. The result is d - g (total pies minus the number of pies that can't be cooled).


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>