Блог пользователя SAFWAN.K

Автор SAFWAN.K, история, 8 лет назад, По-английски

Hi All

can anyone tell me why this two solution

gives me WA on UVA

this is problem : https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3977

first solution : http://ideone.com/WVbSQO

second solution : http://ideone.com/Kb3TmW

thanks all

  • Проголосовать: нравится
  • -17
  • Проголосовать: не нравится

»
8 лет назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

why down votes ????

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

It's quite time consuming to read someone else's code... I suggest you code some brute force solution, generate many small test cases and compare the outputs.