King and Queen
CodeChefOpen on judge ↗
Problem description. Queen loves to play games with King. As she always wins over King, he got frustrated. So he decided to give her a complex challenge. King gives an array of N non-negative numbers and an integer K . He want Queen to check if the array has a continuous subarray of size at least 2 that sums up to the multiple of K , that is, sums up to N*K As Queen don't have all day she asks y
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