Need help with GEARS!!!!

Jul 12, 2018 at 7:47am
closed account (jy6DLyTq)
it will be 0
Jul 12, 2018 at 9:41am
i have a doubt...
if we set speed of any gear ...then it is for that test case only or for the rest also??
Jul 12, 2018 at 9:50am
it is for that test case only , until the value of teeth connceted to that node doesn't updated by any other value.
means as the node connected to this teeth has updated it's teeth value then it will affect all of the connected teeth speed, so the speed changes everytime whenever type 2 query gets called.
Jul 12, 2018 at 10:08am
can u explain how result for last case is 0??
Jul 12, 2018 at 10:15am
as 123 nodes form a cycle ,so they all gets blocked by one another and hence now if we connect the node 4 to 1 it's speed is also zero because it is written in the question that if the new node is connected to the node which is already blocked then this blocked node will also block the new connected node and so the answer is zero.
Jul 12, 2018 at 10:46am
@michael
check your pm
Jul 12, 2018 at 11:01am
@zyan1zyan can u suggest me too please!!
Jul 12, 2018 at 11:08am
@blackmamba
check your pm
Jul 12, 2018 at 6:37pm
yes u are right..
Jul 13, 2018 at 6:44am
can someone tell whether an even cycle will be blocked?
Jul 13, 2018 at 7:11am
can anyone help me with gears problem???
Jul 13, 2018 at 7:32am
@Kr002 check your pm.
Jul 13, 2018 at 8:32am
can someone give little to reduce complexity...i am getting tle for second subtask!!
Jul 13, 2018 at 8:39am
@helpinghand
No, even cycle will never gets blocked , you have to keep track of odd cycle , this is main thing in the Gears problem. whenever you get odd cycle then all their connected nodes gets blocked and the new nodes which are going to connect with these nodes will also gets blocked.
OK.
Jul 13, 2018 at 1:03pm
hey man why r u providing http links they are not safe.
Topic archived. No new replies allowed.