ritikagupta8734's blog

By ritikagupta8734, history, 6 weeks ago, In English

Can someone help me understand the meaning of error message that I am getting here

 
 
 
 
  • Vote: I like it
  • -23
  • Vote: I do not like it

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

this means that in jurys answer h[i]<=h[i+1] is 446 times and in your answer its 445 times.

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

maybe you haven't read the statement well.. the difficulty of the problem means number of element is not less then it's previous adjacent element(count of ar[i]<=ar[i+1]).. and you have to print the array such that the difference between 1st and last element is minimum and the difficulty is maximum.... so in your solution your difficulty count was not the maximum..

»
6 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Well, it's clearly written in English but anyway. You have to maximize the difficulty score in the given problem while minimizing the difference between first and last element of the sequence. But your code doesn't gives the maximal difficulty. On test case 6, your code outputs a sequence with difficulty = 445, while the correct sequence has a difficulty = 446.