#include<iostream>
#include<iomanip>
#include<string>
#define N 25
using namespace std;
void read(int grades[], string names[]){ // Συνάρτηση read
for(int i=0; i<N; i++)
cin >> grades[i] >> names[i];
}
float average(int grades[]){ // Συνάρτηση average
int sum=0; // Τοπική μετβλητή sum
for(int i=0; i<N; i++)
sum += grades[i];
return (float)sum/N;
}
string max_grade(int grades[],string names[]){ //Συνάρτηση max_grade
int maxg = grades[0]; // Τοπικές μεταβλητές
string maxn;
for(int i=1; i<N; i++){ // Υπολογισμός μέγιστου βαθμού
if(grades[i] > maxg){
maxg = grades[i];
maxn = names[i];
}
}
return maxn;
}
int main(){ // Κύρια συνάρτηση (main)
int vathmoi[N]; // Δήλωση πινάκων
string onomata[N];
read(vathmoi,onomata); // Κλήση συναρτήσεων
cout<<"avg="<<fixed<<setprecision(1)<<average(vathmoi)<<endl;
cout<<"best student="<<max_grade(vathmoi,onomata)<<endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CiNpbmNsdWRlPGlvbWFuaXA+CiNpbmNsdWRlPHN0cmluZz4KI2RlZmluZSBOIDI1CnVzaW5nIG5hbWVzcGFjZSBzdGQ7Cgp2b2lkIHJlYWQoaW50IGdyYWRlc1tdLCBzdHJpbmcgbmFtZXNbXSl7CS8vIM6jz4XOvc6sz4HPhM63z4POtyByZWFkCiAgICBmb3IoaW50IGk9MDsgaTxOOyBpKyspCiAgICAgICBjaW4gPj4gZ3JhZGVzW2ldID4+IG5hbWVzW2ldOwp9CmZsb2F0IGF2ZXJhZ2UoaW50IGdyYWRlc1tdKXsJCQkvLyDOo8+Fzr3OrM+Bz4TOt8+DzrcgYXZlcmFnZQogIGludCBzdW09MDsJCQkJCQkJLy8gzqTOv8+AzrnOus6uIM68zrXPhM6yzrvOt8+Ezq4gc3VtCiAgICBmb3IoaW50IGk9MDsgaTxOOyBpKyspCiAgICAgICAgc3VtICs9IGdyYWRlc1tpXTsKcmV0dXJuIChmbG9hdClzdW0vTjsKfQpzdHJpbmcgbWF4X2dy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hcG9zdG9sb3MKMTcgY29zdGFzCjE4IGFuZHJlYXMKMTkgdmFzbwoxOSBjaHJpc3RpbmEKMTkgZWxlbmEKMTkgdGhlb2Rvcm9zCjEzIG5pa29sYXMKMTYgYW5keXMKMTcgY2hyaXN0b3MKMTUgYW50b25pcw==
15 andreas
16 kiki
11 giorgos
12 marios
13 stathis
16 makis
20 pantelis
19 nikos
18 savvas
11 niki
13 vasilis
15 mimis
16 maria
16 takis
10 apostolos
17 costas
18 andreas
19 vaso
19 christina
19 elena
19 theodoros
13 nikolas
16 andys
17 christos
15 antonis