Are These Equal
You are given an array $A$ consisting of $N$ Integers which are initially all $0$. You are also given an array $B$ consisting of $N$ Integers. You have to tell whether you can make $A$ equal to $B$ or not by performing the following operation any number of times. In one operation you can choose exactly $K$ distinct indices in the array A and increase the value at these indices by $1$. ###Input:
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