Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Sa wants to go to a movie with her friends. There are totally friends including Shilpa. M different offers were available based on the number
Sa wants to go to a movie with her friends. There are totally friends including Shilpa. M different offers were available based on the number erent number of tickets are sold at different group booking rates. For example, a single ticket may cost 10 rupees ned tickets way com 15 pet inge 40 rupees together Language Coding 2 Master 20 The ticket seller always introduces Moffers which are always equal to the number of friends N. Ticket seller would like to maximize the near from Shvipar to determine how can he do it given M and the M costs for k tickets together, k1, 2, N Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings while reading the put or white grinding Sed Yestcates will fail Constrainte 1-N-1000 All Format The last line of input consists of N, the number of friends, and the number of ticket possible combinations aviable 24 The second line has Nintegere, which are costs for k tickets together, k = 1,2 N Dapur Rames The upper consists of ingl
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started