Maximize Relation
CodeChefOpen on judge ↗
Basil is a pro when it comes to solving mathematical problems. You being his homeroom teacher, decided to give Basil the following task: Given two sequences X and Y of integers, each of which is of size M, and given relation of X and Y to be the summation of X[k]*Y[k] for each k ranging from 1 till M, Basil needs to maximize the value of relation among the two sequences, provided Basil is only al
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