Not-Afraid's blog

By Not-Afraid, history, 6 years ago, In English

My initial solution was if there exists a subarray with size > 1 and median k than answer is yes.
But, afer getting a lot of WA on pretest 10, at the last moment i realized that the solution is yes if there exists any subarray of size > 1 with median >= k and i didn't have time so i just submitted my solutin which uses 6 iterations to check if there exists a subarray with size atleast two and median >= k. It passed pretests + system testing.

tc for which my solution fails
  • Vote: I like it
  • +27
  • Vote: I do not like it

»
6 years ago, hide # |
Rev. 2  
Vote: I like it 0 Vote: I do not like it

Try to reach Div.1 , then you will have the right to uphack(hack anyone after the contest, including yourself)

(And I got away from div.1 just now :(