Detalii evaluare #64162189

Rezumat problemă

Se citesc n numere naturale reprezentând înălțimile a n clădiri. Cerința problemei este de a realiza un proiect de arhitectură în care clădirile sunt ordonate descrescător după înălțimea lor.

Detalii

Problema Arhitectura Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #64162189 Utilizator Sim Alessia (sim_alessia)
Fișier arhitectura.cpp Dimensiune 692 B
Data încărcării 21 Aprilie 2026, 09:40 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

arhitectura.cpp:7:1: error: extended character   is not valid in an identifier
    7 |     cin>>n;
      | ^
arhitectura.cpp:7:1: error: extended character   is not valid in an identifier
arhitectura.cpp:7:1: error: extended character   is not valid in an identifier
arhitectura.cpp:8:1: error: extended character   is not valid in an identifier
    8 |     for (int i=1; i<=n; i++)
      | ^
arhitectura.cpp:8:1: error: extended character   is not valid in an identifier
arhitectura.cpp:8:1: error: extended character   is not valid in an identifier
arhitectura.cpp:9:1: error: extended character   is not valid in an identifier
    9 |     cin>>h[i];
      | ^
arhitectura.cpp:9:1: error: extended character   is not valid in an identifier
arhitectura.cpp:9:1: error: extended character   is not valid in an identifier
arhitectura.cpp:13:1: error: extended character   is not valid in an identifier
   13 |     bool ok;
      | ^
arhitectura.cpp:13:1: error: extended character   is not valid in an identifier
arhitectura.cpp:13:1: error: extended character   is not valid in an identifier
arhitectura.cpp:14:1: error: extended character   is not valid in an identifier
   14 |     int i, aux; 
      | ^
arhitectura.cpp:14:1: error: extended character   is not valid in an identifier
arhitectura.cpp:14:1: error: extended character   is not valid in an identifier
arhitectura.cpp:14:16: error: extended character   is not valid in an identifier
   14 |     int i, aux; 
      |                ^
arhitectura.cpp:15:1: error: extended character   is not valid in an identifier
   15 |     do 
      | ^
arhitectura.cpp:15:1: error: extended character   is not valid in an identifier
arhitectura.cpp:15:1: error: extended character   is not valid in an identifier
arhitectura.cpp:15:5: error: extended character   is not valid in an identifier
   15 |     do 
      |     ^
arhitectura.cpp:16:1: error: extended character   is not valid in an identifier
   16 |     {
      | ^
arhitectura.cpp:16:1: error: extended character   is not valid in an identifier
arhitectura.cpp:16:1: error: extended character   is not valid in an identifier
arhitectura.cpp:17:1: error: extended character   is not valid in an identifier
   17 |         ok=true; 
      | ^
arhitectura.cpp:17:1: error: extended character   is not valid in an identifier
arhitectura.cpp:17:1: error: extended character   is not valid in an identifier
arhitectura.cpp:17:1: error: extended character   is not valid in an identifier
arhitectura.cpp:17:1: error: extended character   is not valid in an identifier
arhitectura.cpp:17:1: error: extended character   is not valid in an identifier
arhitectura.cpp:17:1: error: extended character   is not valid in an identifier
arhitectura.cpp:17:17: error: extended character   is not valid in an identifier
   17 |         ok=true; 
      |                 ^
arhitectura.cpp:18:1: error: extended character   is not valid in an identifier
   18 |         for (i=1; i<n; i++)
      | ^
arhitectura.cpp:18:1: error: extended character   is not valid in an identifier
arhitectura.cpp:18:1: error: extended character   is not valid in an identifier
arhitectura.cpp:18:1: error: extended character   is not valid in an identifier
arhitectura.cpp:18:1: error: extended character   is not valid in an identifier
arhitectura.cpp:18:1: error: extended character   is not valid in an identifier
arhitectura.cpp:18:1: error: extended character   is not valid in an identifier
arhitectura.cpp:19:1: error: extended character   is not valid in an identifier
   19 |         if (h[i]<h[i+1])
      | ^
arhitectura.cpp:19:1: error: extended character   is not valid in an identifier
arhitectura.cpp:19:1: error: extended character   is not valid in an identifier
arhitectura.cpp:19:1: error: extended character   is not valid in an identifier
arhitectura.cpp:19:1: error: extended character   is not valid in an identifier
arhitectura.cpp:19:1: error: extended character   is not valid in an identifier
arhitectura.cpp:19:1: error: extended character   is not valid in an identifier
arhitectura.cpp:20:1: error: extended character   is not valid in an identifier
   20 |         {
      | ^
arhitectura.cpp:20:1: error: extended character   is not valid in an identifier
arhitectura.cpp:20:1: error: extended character   is not valid in an identifier
arhitectura.cpp:20:1: error: extended character   is not valid in an identifier
arhitectura.cpp:20:1: error: extended character   is not valid in an identifier
arhitectura.cpp:20:1: error: extended character   is not valid in an identifier
arhitectura.cpp:20:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
   21 |             aux=h[i];
      | ^
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:21:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
   22 |             h[i]=h[i+1];
      | ^
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:22:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
   23 |             h[i+1]=aux; 
      | ^
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:1: error: extended character   is not valid in an identifier
arhitectura.cpp:23:24: error: extended character   is not valid in an identifier
   23 |             h[i+1]=aux; 
      |                        ^
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
   24 |             ok=false;
      | ^
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:24:1: error: extended character   is not valid in an identifier
arhitectura.cpp:25:1: error: extended character   is not valid in an identifier
   25 |         }
      | ^
arhitectura.cpp:25:1: error: extended character   is not valid in an identifier
arhitectura.cpp:25:1: error: extended character   is not valid in an identifier
arhitectura.cpp:25:1: error: extended character   is not valid in an identifier
arhitectura.cpp:25:1: error: extended character   is not valid in an identifier
arhitectura.cpp:25:1: error: extended character   is not valid in an identifier
arhitectura.cpp:25:1: error: extended character   is not valid in an identifier
arhitectura.cpp:26:1: error: extended character   is not valid in an identifier
   26 |     }
      | ^
arhitectura.cpp:26:1: error: extended character   is not valid in an identifier
arhitectura.cpp:26:1: error: extended character   is not valid in an identifier
arhitectura.cpp:27:1: error: extended character   is not valid in an identifier
   27 |     while (!ok);
      | ^
arhitectura.cpp:27:1: error: extended character   is not valid in an identifier
arhitectura.cpp:27:1: error: extended character   is not valid in an identifier
arhitectura.cpp:31:1: error: extended character   is not valid in an identifier
   31 |     for ( int i=1; i<=n; i++)
      | ^
arhitectura.cpp:31:1: error: extended character   is not valid in an identifier
arhitectura.cpp:31:1: error: extended character   is not valid in an identifier
arhitectura.cpp:32:1: error: extended character   is not valid in an identifier
   32 |     cout<<h[i]<<" ";
      | ^
arhitectura.cpp:32:1: error: extended character   is not valid in an identifier
arhitectura.cpp:32:1: error: extended character   is not valid in an identifier
arhitectura.cpp:39:1: error: extended character   is not valid in an identifier
   39 |     return 0;
      | ^
arhitectura.cpp:39:1: error: extended character   is not valid in an identifier
arhitectura.cpp:39:1: error: extended character   is not valid in an identifier
arhitectura.cpp: In function ‘void citire()’:
arhitectura.cpp:7:1: error: ‘   ’ was not declared in this scope
    7 |     cin>>n;
      | ^~~
arhitectura.cpp:8:4: error: expected ‘;’ before ‘for’
    8 |     for (int i=1; i<=n; i++)
      |    ^~~~
      |    ;
arhitectura.cpp:8:19: error: ‘i’ was not declared in this scope
    8 |     for (int i=1; i<=n; i++)
      |                   ^
arhitectura.cpp: In function ‘void ordonare()’:
arhitectura.cpp:13:1: error: ‘   ’ was not declared in this scope
   13 |     bool ok;
      | ^~~
arhitectura.cpp:14:4: error: expected ‘;’ before ‘int’
   14 |     int i, aux; 
      |    ^~~~
      |    ;
arhitectura.cpp:14:16: error: ‘ ’ was not declared in this scope
   14 |     int i, aux; 
      |                ^
arhitectura.cpp:27:4: error: expected ‘;’ before ‘while’
   27 |     while (!ok);
      |    ^~~~~~
      |    ;
arhitectura.cpp: In function ‘void afis()’:
arhitectura.cpp:31:1: error: ‘   ’ was not declared in this scope
   31 |     for ( int i=1; i<=n; i++)
      | ^~~
arhitectura.cpp:31:20: error: ‘i’ was not declared in this scope
   31 |     for ( int i=1; i<=n; i++)
      |                    ^
arhitectura.cpp: In function ‘int main()’:
arhitectura.cpp:39:1: error: ‘   ’ was not declared in this scope
   39 |     return 0;
      | ^~~

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

Du-te sus!