← All problemsSign in

A Few Laughing Men

Balaji is a great person to hang out with. He tells really *amazing* jokes, though sometimes he also slips some very *boring* ones in between. Today, he told **N** jokes to Arjun. We have this information in an array **J** of size **N** recorded and given to us by Vaibhav, where each entry can be either 1 or -1. 1 denotes that the joke was amazing, whereas -1 signifies the joke was boring and too

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