← All problemsSign in

3 Arrays

Given three arrays A, B and C of size n, m and m respectively (1-based indexing). A function F(i) is defined as - F(i) = minimum_of( ⌈ Ai/ B1 ⌉ * C1 , ⌈ Ai / B2 ⌉ * C2 , ⌈ Ai / B3 ⌉ * C3, ... , ⌈ Ai / Bm ⌉* Cm) where ⌈x⌉ is defined as the ceiling function. For example : ⌈2.3⌉=3 and ⌈3⌉=3 Find the value of F(1) + F(2) + F(3) +....+ F(n). ### Input - The first line of input contains two integer

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