Hepic_Antony_Skarlatos's blog

By Hepic_Antony_Skarlatos, 9 years ago, In English

I am trying to solve this problem: http://mirror.codeforces.com/contest/545/problem/E My source is that: http://pastebin.com/Jyjb6sjx

I take memory limit in testcase 6. Can you help me? Thank you !

9 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I you visited a node already , why you process the node again ? just add if(visited[node]==true) continue ; in 85 number lines . Thanks.