Блог пользователя R.A.X

Автор R.A.X, 10 лет назад, По-английски

I am stuck on this problem http://www.spoj.com/problems/MINUS/ and after searching the topcoder forum http://apps.topcoder.com/forums/?module=Thread&threadID=699255&start=0&mc=11#1336125 I can tell whether sum m(given in problem) can be formed or not,But I am not getting How to find which i to choose first for performing operations?? Any help will be appreciated!

Теги spoj, dp
  • Проголосовать: нравится
  • -6
  • Проголосовать: не нравится

»
10 лет назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

-a + b + c + d + e + ... = -(a - b - c - d - e - ...). Knowledge of this formula is pretty enough to solve your problem...

UPD. Hint: you don't need to use nested parentheses.