Tough Question? Ask it Here!


Get Help 24/7!

90% of Questions are answered in under 15 minutes!

START HELPING OTHERS

New Questions

 

8 months ago   Accountancy

 

1 year ago   English

 

1 year ago   English

Alysia Thompson

1 year ago   Art

Alysia Thompson

1 year ago   English

Alysia Thompson

1 year ago   English

 

2 years ago   French

Vandana

2 years ago   Math

Vandana

2 years ago   Math

Vandana

2 years ago   Math

Vandana

2 years ago   Math

Vandana

2 years ago   Math

Vandana

2 years ago   Math

Vandana

2 years ago   Math

 

2 years ago   Math

 

2 years ago   Social Sciences

 

2 years ago   Chemistry

 

2 years ago   Chemistry

 

2 years ago   Chemistry

 

2 years ago   Chemistry

 

2 years ago   Computer Science

Nishtha Joshi

2 years ago   Political Science

 

2 years ago   Accountancy

 

2 years ago   Math

 

2 years ago   Math

 

2 years ago   Math

Captionless Image

Prabesh Rai

2 years ago   Math

Prabesh Rai

2 years ago   Math

Prabesh Rai

2 years ago   Math

 

2 years ago   Math

 

2 years ago   Geography

 

2 years ago   Geography

 

2 years ago   Geography

 

2 years ago   Geography

Bernike Ayu

2 years ago   Biology

Bernike Ayu

2 years ago   Biology

 

2 years ago   Accountancy

 

2 years ago   Accountancy

 

2 years ago   Computer Science

 

2 years ago   India Languages

 

2 years ago   Physics

 

2 years ago   Physics

 

2 years ago   Chemistry

 

2 years ago   Science

 

2 years ago   Science

Kashish Priya

2 years ago   Physics

 

2 years ago   Computer Science

Imagine a pandemic situation that happened in the middle of a session and results in an immediate closure of offline education. In such a scenario universities have to come up with some solution so as to finish with the evaluation process of the current semester. They decided to end the semester not by giving grades based on marks, instead proposed to just declare if a student has passed the subject or not.

The process they adopted is as detailed here. As its mid of the running semester each subject has already finished with a few of the sessional components comprising of some marks out of the maximum marks in that subject. In addition, the maximum marks that can be scored in a subject may vary from one subject to another. Therefore, each subject has to decide the minimum marks, say MINMARKSMINMARKS, which should be greater than the total marks of the sessional components that are completed by now in offline mode for the subject. Every student has to score at least MINMARKSMINMARKS to pass that subject. Once decided, for each subject, inform students about the MINMARKSMINMARKS and also declare the marks obtained in the sessional finished so far.

One assignment per subject is given to students so that they can score the remaining marks. The pattern of the assignment remains same for all the subjects. An assignment consists of a set of questions and students are free to attempt as many questions as they want, i.e. all questions are not mandatory. Each assignment question has a maximum score and some number of sub-parts. The difficulty level of a question is based on the following criteria:

  • More is the number of sub-parts easier is the question irrespective of the maximum score of that question.
  • In case two or more questions have same number of sub-parts then difficulty level is decided via ratio of maximum score and number of sub-parts. Lesser is the ratio easier is the question.

Knowing the assignment pattern and the fact that one just has to score MINMARKSMINMARKS, students decided to score only the remaining marks by selecting the easiest assignment questions. You have to help these students in this selection by proposing the strategy to be followed.

Input:

  • Line 1 contains three space separated integers MINMARKSMINMARKSSS, and NN, i.e. minimum marks to pass the subject, total number of students, and total number of assignment questions, respectively.
  • Line 2 contains SS integers separated by space. These are the sessional marks of SS students.
  • Following NN lines contain space separated 2 integers, representing the maximum score and the number of sub-parts in a question.

Output:

  • There will be SS lines in the output. The first number in each line, say xx, represents the count of questions a student has to attempt to score at least MINMARKSMINMARKS. It is followed by space separated xx integers, sorted in increasing order, representing the question numbers to be attempted.
Karan Bhardwaj

2 years ago   Computer Science

Charan Kumar

2 years ago   Physics

 

2 years ago   Math

 

3 years ago   Computer Science

 

3 years ago   Chemistry

Yash Rocky

3 years ago   Computer Science

Kritisha Magar

3 years ago   Math

0.2

Kritisha Magar

3 years ago   Math

0.2

Jay Kumar

3 years ago   Business Studies

No New Questions !

© 2024 Zoylu. All Rights Reserved.