Sereja and Vectors
Sereja have N vectors v[1], v[2], ..., v[N]. Every vector is given by K numbers (x[1], x[2], ..., x[K]). Sereja want to choose few vectors, such that sum of those vectors will be smaller than or equal to vector A. In other word you should find such numbers: i[1] , such that v[i[1]]+v[i[2]]+...+v[i[m]] . Vector Q W when Q.x[1] . Help Sereja, find best subset of vectors in such way that all condi
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