#include <iostream>
#include <fstream>
#include <iterator>
#include <vector>
#include <algorithm>
#include <numeric>
int main()
{
std::ifstream inp("scores.dat");
std::vector<int> scores;
std::copy(std::istream_iterator<int>(std::cin), std::istream_iterator<int>(),
std::back_inserter(scores));
auto minmax(std::minmax_element(std::begin(scores), std::end(scores)));
int excellent(0), satisfactory(0), normal(0), needImprovement(0);
double average = std::accumulate(std::begin(scores), std::end(scores), 0,
[&](int x, int y)
{ if (y < 50) ++needImprovement;
else if (y < 80) ++normal;
else if (y < 95) ++satisfactory;
else ++excellent;
return x + y; });
average /= scores.size();
std::cout << "Maximum score is: " << *(minmax.second) << "\n" <<
"Minimum score is: " << *(minmax.first) << "\n" <<
"Average score is: " << average << "\n" <<
"There is:\n" << excellent << " Excellent scores\n" <<
satisfactory << " Satisfactory scores\n" << normal <<
" Normal scores\n" << needImprovement << " Needs improvement!";
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8ZnN0cmVhbT4KI2luY2x1ZGUgPGl0ZXJhdG9yPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8bnVtZXJpYz4KCmludCBtYWluKCkKewogICAgc3RkOjppZnN0cmVhbSBpbnAoInNjb3Jlcy5kYXQiKTsKICAgIHN0ZDo6dmVjdG9yPGludD4gc2NvcmVzOwogICAgc3RkOjpjb3B5KHN0ZDo6aXN0cmVhbV9pdGVyYXRvcjxpbnQ+KHN0ZDo6Y2luKSwgc3RkOjppc3RyZWFtX2l0ZXJhdG9yPGludD4oKSwKICAgICAgICAgICAgICBzdGQ6OmJhY2tfaW5zZXJ0ZXIoc2NvcmVzKSk7CiAgICBhdXRvIG1pbm1heChzdGQ6Om1pbm1heF9lbGVtZW50KHN0ZDo6YmVnaW4oc2NvcmVzKSwgc3RkOjplbmQoc2NvcmVzKSkpOwogICAgaW50IGV4Y2VsbGVudCgwKSwgc2F0aXNmYWN0b3J5KDApLCBub3JtYWwoMCksIG5lZWRJbXByb3ZlbWVudCgwKTsKICAgIGRvdWJsZSBhdmVyYWdlID0gc3RkOjphY2N1bXVsYXRlKHN0ZDo6YmVnaW4oc2NvcmVzKSwgc3RkOjplbmQoc2NvcmVzKSwgMCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsmXShpbnQgeCwgaW50IHkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ICAgICAgICBpZiAoeSA8IDUwKSArK25lZWRJbXByb3ZlbWVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICh5IDwgODApICsrbm9ybWFsOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKHkgPCA5NSkgKytzYXRpc2ZhY3Rvcnk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSAgICAgICAgICAgICArK2V4Y2VsbGVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geCArIHk7IH0pOwogICAgYXZlcmFnZSAvPSBzY29yZXMuc2l6ZSgpOwogICAgc3RkOjpjb3V0IDw8ICJNYXhpbXVtIHNjb3JlIGlzOiAiIDw8ICoobWlubWF4LnNlY29uZCkgPDwgIlxuIiA8PAogICAgICAgICAgICAgICAgICJNaW5pbXVtIHNjb3JlIGlzOiAiIDw8ICoobWlubWF4LmZpcnN0KSA8PCAiXG4iIDw8CiAgICAgICAgICAgICAgICAgIkF2ZXJhZ2Ugc2NvcmUgaXM6ICIgPDwgYXZlcmFnZSA8PCAiXG4iIDw8CiAgICAgICAgICAgICAgICAgIlRoZXJlIGlzOlxuIiA8PCBleGNlbGxlbnQgPDwgIiBFeGNlbGxlbnQgc2NvcmVzXG4iIDw8CiAgICAgICAgICAgICAgICAgc2F0aXNmYWN0b3J5IDw8ICIgU2F0aXNmYWN0b3J5IHNjb3Jlc1xuIiA8PCBub3JtYWwgPDwKICAgICAgICAgICAgICAgICAiIE5vcm1hbCBzY29yZXNcbiIgPDwgbmVlZEltcHJvdmVtZW50IDw8ICIgTmVlZHMgaW1wcm92ZW1lbnQhIjsKfQ==