dominique11 dipierro
Repovive Pre-Opening Contest/ Discussion
December 2, 2025 • 2 min read • 1 views
dominique11 dipierro
December 2, 2025 • 2 min read • 1 views
Sign in to join the conversation
Just sort both arrays and then take the absolute sum of the differences between corresponding elements. This is optimal because any swap from this configuration will only increase the cost.
Iterate through every subarray in O(n^2). Within the loop, keep track of the frequency using a count[] array and its maximum value using an mx variable.
We have a graph composed of sparse roads and dense teleport-devices. We can model the dense edges using pseudo nodes for every type. A pseudo node of type t will only be joined with nodes of type t in such a way that:
t will have zero weight.C_t, and it will be connected to every node of the same type.This construction results in m+2n edges and 2n nodes. We can then use Dijkstra's algorithm to find the shortest path.
?
?
For D, we want, obviously, to calculate Grundy numbers for all N -- it is trivial that each number will be in {0, 1, 2}. By a...
what do you mean by the states of 0,1,2 like what do they signify? Also after that how do you arrive at the catagorisation in...
If anyone has solved D or E, please share some ideas. It will be really helpful for the community.
For D, we want, obviously, to calculate Grundy numbers for all N -- it is trivial that each number will be in {0, 1, 2}. By a...
what do you mean by the states of 0,1,2 like what do they signify? Also after that how do you arrive at the catagorisation in...
If anyone has solved D or E, please share some ideas. It will be really helpful for the community.