← All problemsSign in

Assignment Grading Problem

There are $N$ assignments in the assignment grading queue, Sam’s assignment is in the $P_{th}$ position from the front of the queue. It takes $X$ minutes to grade a freshmen assignment and $Y$ minutes to grade a senior assignment. Assume that Sam is a senior. You are given a binary array $A_{1}$,$A_{2}$,…,$A_{n}$ of length $N$, where $A_{i}$=1 denotes there is a freshmen assignment on the $i_{th}$

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