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

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

Hi, I've been trying to solve this problem(Building Blocks on codechef) for some time now but always end up with a WA.

I have matched my output for all inputs(n = 0 to 10^5) with that from an AC code and found no differences.

When I submit my code it fetches me a WA while the other code gives an AC veridct. :(

My submission: https://www.codechef.com/viewsolution/15623378

AC code with which i matched my output : https://www.codechef.com/viewsolution/15618920

I can't seem to understand whats wrong. Is this an issue of the judge? Any help would be appreciated.

Thanks!

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

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

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

I am trying to learn Dinic's algorithm to find max flow for a given graph. However my implementation for the same is timing out for the 11th pretest for the question FASTFLOW on SPOJ whatever I do. It's been a day and I haven't been able to find the fault. Please can anyone help me optimize my code further?

Link to question : http://www.spoj.com/problems/FASTFLOW/

My code: http://ideone.com/7FFYRy

Any help would be appreciated, Thank you.

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

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