Dot It
There are two sequences $A_1, A_2, \dots, A_N$ and $B_1, B_2, \dots, B_N$. Answer $Q$ queries on these sequences. In each query, you should calculate the dot product of subsequences $A_x, A_{x+1}, \dots, A_{x+l-1}$ and $B_y, B_{y+1}, \dots, B_{y+l-1}$, i.e. the value of the expression $$\sum_{k=0}^{l-1} A_{x+k} B_{y+k} \,.$$ ### Input - The first line of the input contains a single integer $T$ d
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