PAIRCLST - Editorial

The first part of the solution is really nice. I think you can leave out the random part by choosing the sets appropriately. log(k)+1 should be enough by e.g using the ith special point for the starting set in round j if the jth digit in the binary representation of i is one.

1 Like

@ceilks Yeah, thatā€™s true, good point! Iā€™m not sure why I defaulted to random, but I guess itā€™s kind of nice since you could see it as log(# of tests) with the full feedback.

That is because handling of 64 bit integers is slower than 32 bit integers. Thus, you should avoid long long whenever you donā€™t really need it.

1 Like

because using long long increases time consumption so i think your solution got tle

Can anybody explain how does the radius of search become half ?

Can we transform the initial graph into minimum spanning tree and using dynamic programming to figure out the minimum distance between two special nodes?Iā€™ve tried that but get WA and I cannot think of any test case that can prove my idea is wrong.Can you guys please help me?

my approach is same as the editorialā€¦ what is wrong with the solution: https://paste.ubuntu.com/p/bfQccvhGhd/
:frowning: