DELETED
DELETED
Hey guys...
Recently I was solving this problem from CSES.
Here is what I have tried...
By implementing this idea , I am getting WA in one TC ( Out of 11 ).
You can find my code here.
So , can someone point out what am I doing wrong or any cases that I am missing.
Thanks in advance :)
UPD
As pwild sir pointed out , I was missing that cases.
To overcome that , I just added small logic to my code and it got ACCEPTED.
If you want to see code...
Hello guys , I am having trouble solving this problem
You can read problem statement here also.
So , any hint to solve this problem will be grateful.
Thanks in advance :)
Hello everyone...
First of all sorry but I am writing the blog on same doubt again because there was some issues with code in last blog.
So , recently I was solving this problem ...
I am aware of solving this problem using Bellman Ford's Algorithm , But I am trying another approach which is giving me WA in 1 Test Case (total 13 is there) .
So , Can anyone point out whether this approach is correct or not ... and If it is correct then suggest me some modification else give some counter examples where this code might fail.
Any kind of help will be appreciated.
**Feel free to downvote but help me if you know the answer ;) **
THANKS.
Hello Everyone ...
Today I was solving this problem ... Problem statement : You are given a directed weighted graph, and your task is to find out if it contains a negative cycle, and also give an example of such a cycle.
I am aware of solving this problem using Bellman Ford's Algorithm , But I am trying another approach which is giving me WA in 1 Test Case (total 13 is there) .
So , Can anyone point out whether this approach is correct or not ... and If it is correct then suggest me some modification otherwise give some counter examples where this code might fail.
Thanks in advance :) and sorry for my bad english.
Hey there ...
Today I was solving these problem click ... and I got tle verdict on TC 5. Here's a link to my solution click.
As much as I got , time complexity of my above solution is O(nlogn) where n can be upto 10^5.
So , I am not getting why it is giving tle verdict. So any help regarding this would be appreciated.
Thanks in advance ;)
UPD ==================: Was getting TLE due to ( endl ).
Can someone share some problems on Articulation Points and bridges in a graph ! Thanks in advance :)