#meet-in-the-middle
CF 1558E - Down Below
CF 1558E - Down Below Rating: 3000 Tags: binary search, dfs and similar, graphs, greedy, meet-in-the-middle, shortest paths Solve time: 1m 49s Verified: no Solution Problem Understanding We are given a graph of caves connected by tunnels, and a hero who starts at cave 1 with some initial power. Every other cave initially contains a monster. The hero’s task is to visit and defeat the monster in every cave at...
CF 1609F - Interesting Sections
CF 1609F - Interesting Sections Rating: 2800 Tags: data structures, divide and conquer, meet-in-the-middle, two pointers Solve time: 1m 40s Verified: no Solution Problem Understanding We are given a long array of non-negative integers. The task is to count how many contiguous subarrays have a specific property that depends on two extreme values inside the subarray: its minimum and its maximum. For any segment, we compute the smallest value and...
CF 2002G - Lattice Optimizing
CF 2002G - Lattice Optimizing Rating: 3400 Tags: bitmasks, brute force, hashing, meet-in-the-middle Solve time: 39s Verified: no Solution Exploration The problem asks only for existence or nonexistence in three classes. For part (1), it suffices to exhibit a tetrahedron that tiles space by congruent copies. For part (2), we must decide whether a congruent tiling by equifacial tetrahedra exists. An equifacial tetrahedron is a disphenoid, that is, a tetrahedron...