← All problemsSign in

Tidu and frustrated teacher

As you already, know all the school teachers hate Tidu and their favourite passtime is to trouble and torture him for no reason. One day a teacher called Atsi gave him a problem to solve which she thought he couldn’t solve. The problem was, given 3 numbers n,x and k you need to tell the number of ways of making an array of size n with all numbers being positive Atsi got furious and googled for a

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start