← All problemsSign in

Cool Checker

CodeChefRating 2785Open on judge ↗

*Pritesh was assigned to write the checker for problem Cool Subsequences. He found this to be an interesting problem on its own.* You are given two arrays $A$ and $B$ of lengths $N$ and $M$, respectively. A non-empty [subsequence](https://en.wikipedia.org/wiki/Subsequence) $S$ of the array $A$ is said to be *legal* if $\mathrm{AVG}(S) \in B$, where $\mathrm{AVG}(S)$ is the average of the elemen

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