Комментарии

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

На awooEducational Codeforces Round 65 Editorial, 7 лет назад
+8

Can someone explain the editorial of problem E (Range Deleting)?
Having a difficult time to understand it or is there any other approach which is simpler and easy to explain.

Golovanov399 I think there is some mistake in editorial of 1031B — Curiosity Has No Limits because 4th case "If t1=0 and a1=1 and b1=1 then t2= 1" is wrong as t2 can't have any value because since t1 is 0 , b1 can never be 1 as b1=t1&t2, instead it should be "then there is no such t2".

На himanshujaju0-1 BFS [Tutorial], 8 лет назад
0

himanshujaju yes i can understand your intention its absolutely right.

It's just that i have come to above point of replacing this condition "if travelling e relaxes distance to u:" by just checking whether u vertex has been already visited or not, because this if condition is only true for any node (u) only once because since we are keeping the queue sorted by distance from source at every point of time, so after encountering true for the first time in if condition for a node u, thereafter it will not be possible for that node(u) to have minimum distance(it may be equal but not less than that) than that of what we have encountered when if condition was true for the first time.

Or can you give me some example/test case for which my above assumption fails?

На himanshujaju0-1 BFS [Tutorial], 8 лет назад
0

himanshujaju can we replace this condition in pseudocode "if travelling e relaxes distance to u:" by just checking whether u vertex has been already visited or not because i think only for this 0-1 BFS case it will always be atmost one time that this condition ("if travelling e relaxes distance to u:") will be true. Am i right?