Блог пользователя zeyad.alaaeldin2016

Автор zeyad.alaaeldin2016, история, 5 лет назад, По-английски

https://mirror.codeforces.com/gym/101992/problem/H

I was solving this problem by BFS from start node and checking what is the max edge while moving to level K.

https://ideone.com/IcEBeh

I dont know why codeforces sample gives me a lot of zero. while on my codeblocks give me 104 and 7 ... anyone know where is the problem ?

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

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

Auto comment: topic has been updated by zeyad.alaaeldin2016 (previous revision, new revision, compare).

»
5 лет назад, скрыть # |
Rev. 2  
Проголосовать: нравится +6 Проголосовать: не нравится

You haven't read the input from a file. You can easily solve that by adding freopen right after your main function(inside the main function):

freopen("path.in","r",stdin);

If you are participating in this year's ECPC, you should already know that you take the input usually from a file.