All Tracks Problem

Vanya and Students

Muito fácil, Muy fácil, Very-Easy, とてもやさしい, 非常に簡単, 非常简单


Vanya is a Competitive Programming teacher at Berland International School, and she needs to prepare an end-semester report for each of the students studying in her class.

Each of the students of her class gave 3 papers, one in Algorithms, one in Math, and one in Data-structures. Each paper has a maximum of \(40\) marks, and the minimum score to pass a single paper is \(10\).

Now, she knows that each student of her class has passed in all 3 papers, She has been given the 'Name' , 'ID' and 'Total' of each student. Now, the following problem comes to her mind :

What is the maximum number of students that may have obtained atleast \(15\) marks in atleast 2 papers?

She being a busy woman, wants you to help her with this, so that she can solve some problems during this time. Can you do it?

For better understanding of the problem, refer to the sample explanation given below.

Input Format:

Table : Students

Field Type
Name text
ID text
total int


Sample Students table

Name ID Total
Micro 12abcd 39
Vanya 13abcd 31
Rhezo 14abcd 41


Time Limit: 5 sec(s) for each input file.
Memory Limit: 256 MB
Source Limit: 1024 KB
Marking Scheme: Marks are awarded when all the testcases pass.
Allowed Languages: MySQL, PostgreSQL, MSSQL, Oracle_Db


Initializing Code Editor...
Your Rating:


View All Notifications