Carnival
CodeChefOpen on judge ↗
A carnival has been hosted in Tihor's neighborhood and he wants to take his friend Odnab with him. The carnival will be hosted for $N$ days and each day is given a coefficient of fun $F_i$. However odnab has some conditions: - He will only vist the carnival for $3$ consecutive days. - He wants the sum of coefficients of fun on the days he visited to be maximum. Please help Tihor find that sum.
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