ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Linear Data Structures: Arrays > задача:


51165 Question 1

Гость
• Вопросы к жюри (5)

Задачи раздела

• 51111 - Even Numbers
• 51115 - Pascal Triangle
• 51116 - The Star Triangle
• 51043 - Genome Sequencing
• 51042 - The most frequent k-mer
• 51165 Question 1
• 51171 Question 3
• 51175 Question 2
• 51093 - rgb2gray
• 51092 - Even and Odd
• 51095 - Normal and Trace
• 50382 - Parkside's Other Triangle
• 50383 - Noisy Mornings
• 51097 - Sum of Borders

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
bfs.

 

Class Statistics

One of the professors have a lot of students from three different departments taking the same course. He wants to do some computerized calculations. In the end of the semester he needs the averages of students for each department, the number of students whose average is greater than department’s average. The student average is calculated as 40% of midterm and 60% of final exam. All students information are stored in "input.txt" file.

Write a program that does this job.

Input Specification: In the first line you will be given the number of students 0<=n<=1000, then in the following n lines you will have the information for each student.

Each student information contains:

  • Student ID, 8 digits long
  • Student Name, at most 25 char long
  • Student Surname, at most 25 char long
  • Student department, there are three different departments: CEN, ECE, BINF.
  • Midterm Grade, (int)
  • Final Grade, (int).

Output Specification: In the first line show four floating point numbers, the averages of all CEN, ECE and BINF students and the class average with two digits after a floating point number.

In the second line show three integer numbers:

  • the number of CEN students whose average is greater than total CEN students average,
  • the number of ECE students whose average is greater than total ECE students average,
  • the number of BINF students whose average is greater than total BINF students average,
Sample Input
10
1202145 Andi Shehu CEN 89 95
1254564 Ahmet Koci ECE 84 99
1254565 Egi Shahu CEN 65 89
1254567 Ilir Kosiqi BINF 75 84
1254568 Albi Uka ECE 96 63
1254563 Alban Frati CEN 84 65
1254569 Ernest Limi ECE 85 73
1254562 Eni Ibrahimi CEN 95 94
1254561 Altin Hasa BINF 99 80
1254566 Indrit Hoxha BINF 72 63
Sample Output
84.75 82.33 78.20 82.06
2 1 2

 

 

Для отправки решений необходимо выполнить вход.

www.contester.ru