sundaysea's blog

By sundaysea, 15 years ago, In English

Type: Binary search or greedy.

Notes:

       1. In order to get an answer X as big as possible, the energy lose between transfer should be as small as possible, so it will always transfer from a device with energy larger than X to a device with energy smaller than X.

       2. If X is possible to be an answer, than all value smaller than X is possible to be the final state, so we can use a binary search here. 

 

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?