Doge vs Cate
CodeChefOpen on judge ↗
Doge and Cate can no longer coexist in the same planet. Time has finally come to decide once and for all, who will reign over this planet. They agreed on a non violent way to settle this. Both are given an array of N integers and a positive integer K. In a single operation, one can change an element of the array to any value. The task is to transform the array such that there exists an integer X,
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start