Russian's blog

By Russian, 10 years ago, In Russian
  • что я могу сделать чтоб моя программа работала быстрее ?
  • задача — 61E - Enemy is weak
  • код — 6713532
  • Vote: I like it
  • +6
  • Vote: I do not like it

»
10 years ago, # |
Rev. 3   Vote: I like it +12 Vote: I do not like it

Since N is <=1000000 you can make the numbers smaller in range [1...N] and then make your end=N.
Example:
Before
4
10 8 3 1
After
4
4 3 2 1

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

I realy dont know it brother. If i udrestand it i will help to you :-D