Detalii evaluare #54810534

Rezumat problemă

Se dau datele de naștere a n persoane, numerotate de la 1 la n, în forma an luna zi. Să se determine numărul de ordine al celei mai tinere și al celei mai în vârstă persoană dintre cele date.

Detalii

Problema Aniversari Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #54810534 Utilizator Micu Octavian (Karma32)
Fișier aniversari.cpp Dimensiune 640 B
Data încărcării 09 Decembrie 2024, 12:48 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

aniversari.cpp:8:1: error: expected ';' after struct definition
 }int v[1001];

 ^
aniversari.cpp: In function 'int main()':
aniversari.cpp:14:15: error: request for member 'an' in 'v[1]', which is of non-class type 'int'
     cin>>v[1].an>>v[1].luna>>v[1].zi;

               ^
aniversari.cpp:14:24: error: request for member 'luna' in 'v[1]', which is of non-class type 'int'
     cin>>v[1].an>>v[1].luna>>v[1].zi;

                        ^
aniversari.cpp:14:35: error: request for member 'zi' in 'v[1]', which is of non-class type 'int'
     cin>>v[1].an>>v[1].luna>>v[1].zi;

                                   ^
aniversari.cpp:17:19: error: request for member 'an' in 'v[i]', which is of non-class type 'int'
         cin>>v[i].an>>v[i].luna>>v[i].zi;

                   ^
aniversari.cpp:17:28: error: request for member 'luna' in 'v[i]', which is of non-class type 'int'
         cin>>v[i].an>>v[i].luna>>v[i].zi;

                            ^
aniversari.cpp:17:39: error: request for member 'zi' in 'v[i]', which is of non-class type 'int'
         cin>>v[i].an>>v[i].luna>>v[i].zi;

                                       ^
aniversari.cpp:18:17: error: request for member 'an' in 'v[i]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                 ^
aniversari.cpp:18:25: error: request for member 'an' in 'v[t]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                         ^
aniversari.cpp:18:34: error: request for member 'an' in 'v[i]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                  ^
aniversari.cpp:18:43: error: request for member 'an' in 'v[t]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                           ^
aniversari.cpp:18:53: error: request for member 'luna' in 'v[i]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                                     ^
aniversari.cpp:18:63: error: request for member 'luna' in 'v[t]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                                               ^
aniversari.cpp:18:74: error: request for member 'an' in 'v[i]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                                                          ^
aniversari.cpp:18:83: error: request for member 'an' in 'v[t]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                                                                   ^
aniversari.cpp:18:93: error: request for member 'luna' in 'v[i]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                                                                             ^
aniversari.cpp:18:104: error: request for member 'luna' in 'v[t]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                                                                                        ^
aniversari.cpp:18:115: error: request for member 'zi' in 'v[i]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                                                                                                   ^
aniversari.cpp:18:123: error: request for member 'zi' in 'v[t]', which is of non-class type 'int'
         if(v[i].an>v[t].an||v[i].an==v[t].an&& v[i].luna>v[t].luna||v[i].an==v[t].an&& v[i].luna==v[t].luna&&v[i].zi>v[t].zi)

                                                                                                                           ^
aniversari.cpp:20:17: error: request for member 'an' in 'v[i]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                 ^
aniversari.cpp:20:25: error: request for member 'an' in 'v[b]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                         ^
aniversari.cpp:20:34: error: request for member 'an' in 'v[i]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                  ^
aniversari.cpp:20:43: error: request for member 'an' in 'v[b]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                           ^
aniversari.cpp:20:53: error: request for member 'luna' in 'v[i]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                                     ^
aniversari.cpp:20:63: error: request for member 'luna' in 'v[b]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                                               ^
aniversari.cpp:20:74: error: request for member 'an' in 'v[i]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                                                          ^
aniversari.cpp:20:83: error: request for member 'an' in 'v[b]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                                                                   ^
aniversari.cpp:20:93: error: request for member 'luna' in 'v[i]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                                                                             ^
aniversari.cpp:20:104: error: request for member 'luna' in 'v[b]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                                                                                        ^
aniversari.cpp:20:115: error: request for member 'zi' in 'v[i]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                                                                                                   ^
aniversari.cpp:20:123: error: request for member 'zi' in 'v[b]', which is of non-class type 'int'
         if(v[i].an<v[b].an||v[i].an==v[b].an&& v[i].luna<v[b].luna||v[i].an==v[b].an&& v[i].luna==v[b].luna&&v[i].zi<v[b].zi)

                                                                                                                           ^

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 Aniversari 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ă.