ME

Live Q&A

Closed
4 JUL
Admin (Host)10:25 pmBe ready for Myntra we for She TMRW šŸ’«
5 JUL
Admin (Host)12:20 pmStart uploading questions with clear and proper constraintsšŸ‘‡
Admin (Host)12:21 pmWe are available to help you here🩷
GU
Guest12:54 pmSir pls solve my qs
Admin (Host)12:57 pmOk, solving Q1
Admin (Host)01:09 pmDone
Admin (Host)01:09 pmPlease Check
GU
Guest02:07 pmi have slot of 3pm
GU
Guest02:08 pmplease be there at that time
Admin (Host)04:05 pmSolving Q2 and Q3
Admin (Host)04:12 pmQ2 Done
Admin (Host)04:38 pmQ3 Done
Admin (Host)06:27 pmClosing this scene
Admin (Host)06:30 pmThnx for your kind support
Session EndedChat is closed.
ENDED
šŸ‘ 0
Queue

Live Problems

3 Items
Submitted by GuestSolved

Maximum Clicks Within Limit

Given N advertisements with click costs and a limit L, find the maximum number of clicks that can be used to select exactly X advertisements such that the total number of clicks is strictly less than L.

Examples

Example 1:

Input:3 1 2 3 2 5
Output:4

Example 2:

Input:5 1 2 3 4 5 3 10
Output:6

Example 3:

Input:1 1 1 1
Output:0

Constraints

  • 1 ≤ N < 10
  • 1 ≤ S ≤ N
  • 1 < L < 10^6
  • 1 ≤ a < L
q1_solved.cpp
q2_solved.cpp
q3_solved.cpp
Loading...
Host uploads the public C++ solution

Myntra we for She

ENDED
•0 watching