Блог пользователя loboelita

Автор loboelita, история, 9 лет назад, По-английски

Hi,

I have been trying to solve this problem https://code.google.com/codejam/contest/8264486/dashboard#s=p1. I implemented an N^2logn solution[1]. However my solution didn't pass for the large test cases. It took much longer time than expected. I tried searching for some loops but couldn't find any. Can someone please check my code and tell me where is it going wrong? [1] https://ideone.com/mk6Qya

Thanks in advance.

Полный текст и комментарии »

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

Автор loboelita, история, 9 лет назад, По-английски

https://www.facebook.com/hackercup/problem/1527664744192390/

I know how to solve this problem using Dp and greedy. But I am interested in knowing how to solve this problem using Maxflow. Can someone please help me out?

Полный текст и комментарии »

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