Detalii evaluare #64919485

Rezumat problemă

Să se verifice dacă in șir este: șir constant, șir strict crescător, șir crescător, șir strict descrescător, șir descrescător, șir neordonat.

Detalii

Problema ordonat_neordonat Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #64919485 Utilizator Trandafirescu stefan (stefan_trandafirescu)
Fișier ordonat_neordonat.cpp Dimensiune 930 B
Data încărcării 13 Iunie 2026, 14:01 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

ordonat_neordonat.cpp:5:1: error: expected initializer before ‘bool’
    5 | bool cres = 1, desc = 1, sCres = 1, Sdesc = 1, cons = 1, neordonat = 1;
      | ^~~~
ordonat_neordonat.cpp: In function ‘int main()’:
ordonat_neordonat.cpp:11:16: error: ‘v’ was not declared in this scope
   11 |         cin >> v[i];
      |                ^
ordonat_neordonat.cpp:15:13: error: ‘v’ was not declared in this scope
   15 |         if (v[i] == v[i+1])
      |             ^
ordonat_neordonat.cpp:17:13: error: ‘cons’ was not declared in this scope; did you mean ‘const’?
   17 |             cons = 1;
      |             ^~~~
      |             const
ordonat_neordonat.cpp:18:13: error: ‘neordonat’ was not declared in this scope
   18 |             neordonat = 0;
      |             ^~~~~~~~~
ordonat_neordonat.cpp:19:13: error: ‘cres’ was not declared in this scope
   19 |             cres = 0;
      |             ^~~~
ordonat_neordonat.cpp:20:13: error: ‘Sdesc’ was not declared in this scope
   20 |             Sdesc = 0;
      |             ^~~~~
ordonat_neordonat.cpp:21:13: error: ‘sCres’ was not declared in this scope
   21 |             sCres = 0;
      |             ^~~~~
ordonat_neordonat.cpp:22:13: error: ‘desc’ was not declared in this scope
   22 |             desc = 0
      |             ^~~~
ordonat_neordonat.cpp:24:12: error: ‘v’ was not declared in this scope
   24 |         if(v[i] >= v[i+1])
      |            ^
ordonat_neordonat.cpp:26:13: error: ‘cons’ was not declared in this scope; did you mean ‘const’?
   26 |             cons = 0;
      |             ^~~~
      |             const
ordonat_neordonat.cpp:27:13: error: ‘neordonat’ was not declared in this scope
   27 |             neordonat = 0;
      |             ^~~~~~~~~
ordonat_neordonat.cpp:28:13: error: ‘cres’ was not declared in this scope
   28 |             cres = 0;
      |             ^~~~
ordonat_neordonat.cpp:29:13: error: ‘Sdesc’ was not declared in this scope
   29 |             Sdesc = 0;
      |             ^~~~~
ordonat_neordonat.cpp:30:13: error: ‘sCres’ was not declared in this scope
   30 |             sCres = 0;
      |             ^~~~~
ordonat_neordonat.cpp:31:13: error: ‘desc’ was not declared in this scope
   31 |             desc = 1;
      |             ^~~~
ordonat_neordonat.cpp:33:12: error: ‘v’ was not declared in this scope
   33 |         if(v[i] > v[i+1])
      |            ^
ordonat_neordonat.cpp:35:13: error: ‘cons’ was not declared in this scope; did you mean ‘const’?
   35 |             cons = 0;
      |             ^~~~
      |             const
ordonat_neordonat.cpp:36:13: error: ‘neordonat’ was not declared in this scope
   36 |             neordonat = 0;
      |             ^~~~~~~~~
ordonat_neordonat.cpp:37:13: error: ‘cres’ was not declared in this scope
   37 |             cres = 0;
      |             ^~~~
ordonat_neordonat.cpp:38:13: error: ‘Sdesc’ was not declared in this scope
   38 |             Sdesc = 1;
      |             ^~~~~
ordonat_neordonat.cpp:39:13: error: ‘sCres’ was not declared in this scope
   39 |             sCres = 0;
      |             ^~~~~
ordonat_neordonat.cpp:40:13: error: ‘desc’ was not declared in this scope
   40 |             desc = 0
      |             ^~~~
ordonat_neordonat.cpp:42:12: error: ‘v’ was not declared in this scope
   42 |         if(v[i] <= v[i+1])
      |            ^
ordonat_neordonat.cpp:47:2: error: expected ‘}’ at end of input
   47 | }
      |  ^
ordonat_neordonat.cpp:7:1: note: to match this ‘{’
    7 | {
      | ^

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 ordonat_neordonat 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!