Detalii evaluare #19679550

Rezumat problemă

#2802 Clasa

Se citește de la tastatură numărul n și un număr p cu valoarea 1 sau 2 și apoi n șiruri de tip nume prenume media1 media2 media3 separate prin spații.

Pentru p=1, se va afișa numărul elevilor care au media generală mai mare sau egală decât media clasei.

Pentru p=2, se va afișa pe primul rând media clasei și pe următoarele n rânduri, numele, prenumele și media generală a fiecărui elev, separate printr-un singur spațiu, sortat descrescător după medie; la medii egale se sortează crescător după nume, iar la nume egale crescător după prenume.

Detalii

Problema Clasa Operații I/O tastatură/ecran
Limita timp 0.01 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #19679550 Utilizator Toderas Vlad (vladrazvan2002)
Fișier clasa.cpp Dimensiune 1.28 KB
Data încărcării 17 Decembrie 2019, 12:25 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

clasa.cpp:13:1: error: stray '\302' in program
     double  NotaFinala;

 ^
clasa.cpp:13:1: error: stray '\240' in program
clasa.cpp:13:1: error: stray '\302' in program
clasa.cpp:13:1: error: stray '\240' in program
clasa.cpp:13:1: error: stray '\302' in program
clasa.cpp:13:1: error: stray '\240' in program
clasa.cpp:15:1: error: stray '\302' in program
    string Nume,Prenume;

 ^
clasa.cpp:15:1: error: stray '\240' in program
clasa.cpp:15:1: error: stray '\302' in program
clasa.cpp:15:1: error: stray '\240' in program
clasa.cpp:23:1: error: stray '\302' in program
    if(rhs.NotaFinala == lhs.NotaFinala)

 ^
clasa.cpp:23:1: error: stray '\240' in program
clasa.cpp:23:1: error: stray '\302' in program
clasa.cpp:23:1: error: stray '\240' in program
clasa.cpp:25:1: error: stray '\302' in program
        return rhs.Nume > lhs.Nume;

 ^
clasa.cpp:25:1: error: stray '\240' in program
clasa.cpp:25:1: error: stray '\302' in program
clasa.cpp:25:1: error: stray '\240' in program
clasa.cpp:25:1: error: stray '\302' in program
clasa.cpp:25:1: error: stray '\240' in program
clasa.cpp:25:1: error: stray '\302' in program
clasa.cpp:25:1: error: stray '\240' in program
clasa.cpp:27:1: error: stray '\302' in program
    return rhs.NotaFinala < lhs.NotaFinala;

 ^
clasa.cpp:27:1: error: stray '\240' in program
clasa.cpp:27:1: error: stray '\302' in program
clasa.cpp:27:1: error: stray '\240' in program
clasa.cpp:35:1: error: stray '\302' in program
 double Mg ,  N1,N2,N3;

 ^
clasa.cpp:35:1: error: stray '\240' in program
clasa.cpp:43:1: error: stray '\302' in program
    cin >> n >> cer;

 ^
clasa.cpp:43:1: error: stray '\240' in program
clasa.cpp:43:1: error: stray '\302' in program
clasa.cpp:43:1: error: stray '\240' in program
clasa.cpp:45:1: error: stray '\302' in program
    for(int i = 1; i <= n; i++)

 ^
clasa.cpp:45:1: error: stray '\240' in program
clasa.cpp:45:1: error: stray '\302' in program
clasa.cpp:45:1: error: stray '\240' in program
clasa.cpp:47:1: error: stray '\302' in program
    {

 ^
clasa.cpp:47:1: error: stray '\240' in program
clasa.cpp:47:1: error: stray '\302' in program
clasa.cpp:47:1: error: stray '\240' in program
clasa.cpp:49:1: error: stray '\302' in program
        cin >> v[i].Nume;

 ^
clasa.cpp:49:1: error: stray '\240' in program
clasa.cpp:49:1: error: stray '\302' in program
clasa.cpp:49:1: error: stray '\240' in program
clasa.cpp:49:1: error: stray '\302' in program
clasa.cpp:49:1: error: stray '\240' in program
clasa.cpp:49:1: error: stray '\302' in program
clasa.cpp:49:1: error: stray '\240' in program
clasa.cpp:51:1: error: stray '\302' in program
        cin.get();

 ^
clasa.cpp:51:1: error: stray '\240' in program
clasa.cpp:51:1: error: stray '\302' in program
clasa.cpp:51:1: error: stray '\240' in program
clasa.cpp:51:1: error: stray '\302' in program
clasa.cpp:51:1: error: stray '\240' in program
clasa.cpp:51:1: error: stray '\302' in program
clasa.cpp:51:1: error: stray '\240' in program
clasa.cpp:53:1: error: stray '\302' in program
        cin  >> v[i].Prenume;

 ^
clasa.cpp:53:1: error: stray '\240' in program
clasa.cpp:53:1: error: stray '\302' in program
clasa.cpp:53:1: error: stray '\240' in program
clasa.cpp:53:1: error: stray '\302' in program
clasa.cpp:53:1: error: stray '\240' in program
clasa.cpp:53:1: error: stray '\302' in program
clasa.cpp:53:1: error: stray '\240' in program
clasa.cpp:53:1: error: stray '\302' in program
clasa.cpp:53:1: error: stray '\240' in program
clasa.cpp:55:1: error: stray '\302' in program
        cin.get();

 ^
clasa.cpp:55:1: error: stray '\240' in program
clasa.cpp:55:1: error: stray '\302' in program
clasa.cpp:55:1: error: stray '\240' in program
clasa.cpp:55:1: error: stray '\302' in program
clasa.cpp:55:1: error: stray '\240' in program
clasa.cpp:55:1: error: stray '\302' in program
clasa.cpp:55:1: error: stray '\240' in program
clasa.cpp:57:1: error: stray '\302' in program
        cin >> N1 >> N2 >> N3;

 ^
clasa.cpp:57:1: error: stray '\240' in program
clasa.cpp:57:1: error: stray '\302' in program
clasa.cpp:57:1: error: stray '\240' in program
clasa.cpp:57:1: error: stray '\302' in program
clasa.cpp:57:1: error: stray '\240' in program
clasa.cpp:57:1: error: stray '\302' in program
clasa.cpp:57:1: error: stray '\240' in program
clasa.cpp:59:1: error: stray '\302' in program
        Mg = (N1 + N2 + N3) / 3;

 ^
clasa.cpp:59:1: error: stray '\240' in program
clasa.cpp:59:1: error: stray '\302' in program
clasa.cpp:59:1: error: stray '\240' in program
clasa.cpp:59:1: error: stray '\302' in program
clasa.cpp:59:1: error: stray '\240' in program
clasa.cpp:59:1: error: stray '\302' in program
clasa.cpp:59:1: error: stray '\240' in program
clasa.cpp:61:1: error: stray '\302' in program
        v[i].NotaFinala = Mg;

 ^
clasa.cpp:61:1: error: stray '\240' in program
clasa.cpp:61:1: error: stray '\302' in program
clasa.cpp:61:1: error: stray '\240' in program
clasa.cpp:61:1: error: stray '\302' in program
clasa.cpp:61:1: error: stray '\240' in program
clasa.cpp:61:1: error: stray '\302' in program
clasa.cpp:61:1: error: stray '\240' in program
clasa.cpp:63:1: error: stray '\302' in program
        MgFinal += Mg;

 ^
clasa.cpp:63:1: error: stray '\240' in program
clasa.cpp:63:1: error: stray '\302' in program
clasa.cpp:63:1: error: stray '\240' in program
clasa.cpp:63:1: error: stray '\302' in program
clasa.cpp:63:1: error: stray '\240' in program
clasa.cpp:63:1: error: stray '\302' in program
clasa.cpp:63:1: error: stray '\240' in program
clasa.cpp:65:1: error: stray '\302' in program
    }

 ^
clasa.cpp:65:1: error: stray '\240' in program
clasa.cpp:65:1: error: stray '\302' in program
clasa.cpp:65:1: error: stray '\240' in program
clasa.cpp:67:1: error: stray '\302' in program
    int contor = 0;

 ^
clasa.cpp:67:1: error: stray '\240' in program
clasa.cpp:67:1: error: stray '\302' in program
clasa.cpp:67:1: error: stray '\240' in program
clasa.cpp:69:1: error: stray '\302' in program
    for(int i = 1; i <= n; i++)

 ^
clasa.cpp:69:1: error: stray '\240' in program
clasa.cpp:69:1: error: stray '\302' in program
clasa.cpp:69:1: error: stray '\240' in program
clasa.cpp:71:1: error: stray '\302' in program
    {

 ^
clasa.cpp:71:1: error: stray '\240' in program
clasa.cpp:71:1: error: stray '\302' in program
clasa.cpp:71:1: error: stray '\240' in program
clasa.cpp:73:1: error: stray '\302' in program
        if((v[i].NotaFinala) >=(MgFinal / n))

 ^
clasa.cpp:73:1: error: stray '\240' in program
clasa.cpp:73:1: error: stray '\302' in program
clasa.cpp:73:1: error: stray '\240' in program
clasa.cpp:73:1: error: stray '\302' in program
clasa.cpp:73:1: error: stray '\240' in program
clasa.cpp:73:1: error: stray '\302' in program
clasa.cpp:73:1: error: stray '\240' in program
clasa.cpp:75:1: error: stray '\302' in program
            contor += 1;

 ^
clasa.cpp:75:1: error: stray '\240' in program
clasa.cpp:75:1: error: stray '\302' in program
clasa.cpp:75:1: error: stray '\240' in program
clasa.cpp:75:1: error: stray '\302' in program
clasa.cpp:75:1: error: stray '\240' in program
clasa.cpp:75:1: error: stray '\302' in program
clasa.cpp:75:1: error: stray '\240' in program
clasa.cpp:75:1: error: stray '\302' in program
clasa.cpp:75:1: error: stray '\240' in program
clasa.cpp:75:1: error: stray '\302' in program
clasa.cpp:75:1: error: stray '\240' in program
clasa.cpp:77:1: error: stray '\302' in program
    }

 ^
clasa.cpp:77:1: error: stray '\240' in program
clasa.cpp:77:1: error: stray '\302' in program
clasa.cpp:77:1: error: stray '\240' in program
clasa.cpp:79:1: error: stray '\302' in program
    if(cer == 1)

 ^
clasa.cpp:79:1: error: stray '\240' in program
clasa.cpp:79:1: error: stray '\302' in program
clasa.cpp:79:1: error: stray '\240' in program
clasa.cpp:81:1: error: stray '\302' in program
        cout << contor;

 ^
clasa.cpp:81:1: error: stray '\240' in program
clasa.cpp:81:1: error: stray '\302' in program
clasa.cpp:81:1: error: stray '\240' in program
clasa.cpp:81:1: error: stray '\302' in program
clasa.cpp:81:1: error: stray '\240' in program
clasa.cpp:81:1: error: stray '\302' in program
clasa.cpp:81:1: error: stray '\240' in program
clasa.cpp:83:1: error: stray '\302' in program
    else

 ^
clasa.cpp:83:1: error: stray '\240' in program
clasa.cpp:83:1: error: stray '\302' in program
clasa.cpp:83:1: error: stray '\240' in program
clasa.cpp:85:1: error: stray '\302' in program
    {

 ^
clasa.cpp:85:1: error: stray '\240' in program
clasa.cpp:85:1: error: stray '\302' in program
clasa.cpp:85:1: error: stray '\240' in program
clasa.cpp:87:1: error: stray '\302' in program
        cout << fixed << setprecision(2) << MgFinal / n << endl;

 ^
clasa.cpp:87:1: error: stray '\240' in program
clasa.cpp:87:1: error: stray '\302' in program
clasa.cpp:87:1: error: stray '\240' in program
clasa.cpp:87:1: error: stray '\302' in program
clasa.cpp:87:1: error: stray '\240' in program
clasa.cpp:87:1: error: stray '\302' in program
clasa.cpp:87:1: error: stray '\240' in program
clasa.cpp:89:1: error: stray '\302' in program
        sort(v + 1, v + 1 + n,  compar);

 ^
clasa.cpp:89:1: error: stray '\240' in program
clasa.cpp:89:1: error: stray '\302' in program
clasa.cpp:89:1: error: stray '\240' in program
clasa.cpp:89:1: error: stray '\302' in program
clasa.cpp:89:1: error: stray '\240' in program
clasa.cpp:89:1: error: stray '\302' in program
clasa.cpp:89:1: error: stray '\240' in program
clasa.cpp:89:1: error: stray '\302' in program
clasa.cpp:89:1: error: stray '\240' in program
clasa.cpp:91:1: error: stray '\302' in program
        for(int i = n ; i >= 1; i--)

 ^
clasa.cpp:91:1: error: stray '\240' in program
clasa.cpp:91:1: error: stray '\302' in program
clasa.cpp:91:1: error: stray '\240' in program
clasa.cpp:91:1: error: stray '\302' in program
clasa.cpp:91:1: error: stray '\240' in program
clasa.cpp:91:1: error: stray '\302' in program
clasa.cpp:91:1: error: stray '\240' in program
clasa.cpp:93:1: error: stray '\302' in program
            cout << v[i].Nume <<" "<<v[i].Prenume <<" "<<v[i].NotaFinala << endl;

 ^
clasa.cpp:93:1: error: stray '\240' in program
clasa.cpp:93:1: error: stray '\302' in program
clasa.cpp:93:1: error: stray '\240' in program
clasa.cpp:93:1: error: stray '\302' in program
clasa.cpp:93:1: error: stray '\240' in program
clasa.cpp:93:1: error: stray '\302' in program
clasa.cpp:93:1: error: stray '\240' in program
clasa.cpp:93:1: error: stray '\302' in program
clasa.cpp:93:1: error: stray '\240' in program
clasa.cpp:93:1: error: stray '\302' in program
clasa.cpp:93:1: error: stray '\240' in program
clasa.cpp:95:1: error: stray '\302' in program
    }

 ^
clasa.cpp:95:1: error: stray '\240' in program
clasa.cpp:95:1: error: stray '\302' in program
clasa.cpp:95:1: error: stray '\240' in program

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema Clasa face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.