Clarification on RANKLIST problem

This is regarding the ranklist problem http://www.codechef.com/FEB15/problems/RANKLIST.

I need some clarification for the ranklist problem. When there are more than one possible ranks for which one should i use

for example n=4 & s=7

the ranklist could be {1,2,2,2} => 2 operations or {1,1,2,3} => 1 operation. To go with minimal i guess 1 would the answer i guess. but is this a valid assumption ?

Yes !! Going Right.

It is mentioned in the question…

yes that’s a valid assumption

i have one more doubt is it possible that s can be smaller than n ???

s can never be smaller than n. read the note carefully.

what about s greater than ideal rank list like n=3 and s= 7

I have one more serious doubt
on submitting solution to this problem I’m getting WA all right that is acceptable but the memory usage of the program shows 0.0 and the run time is also 0.
why is this so ?? am i generating any internal error ?? or something like that

plz explain

i said you to read the note in question carefully. there will not be such cases. attempt the question instead of asking irrelevant questions.

@grvana if your program doesn’t pass any test case then it will show 0MB used. It’s not an internal error. I experienced the same thing in this question till I corrected my algorithm :stuck_out_tongue: ,Recheck your logic :smiley: :slight_smile: