Detalii evaluare #64396293

Rezumat problemă

Detalii

Problema stergere Operații I/O tastatură/ecran
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #64396293 Utilizator Iosif Andrei (Andrei_iosif2010)
Fișier stergere.cpp Dimensiune 433 B
Data încărcării 05 Mai 2026, 09:34 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

stergere.cpp:1:2: error: invalid preprocessing directive #inlcude; did you mean #include?
    1 | #inlcude <iostream>
      |  ^~~~~~~
      |  include
stergere.cpp: In function ‘int main()’:
stergere.cpp:7:11: error: expected unqualified-id before ‘[’ token
    7 |     int n,[10001],d,j,h,i;
      |           ^
stergere.cpp:8:5: error: ‘cin’ was not declared in this scope
    8 |     cin>>n;
      |     ^~~
stergere.cpp:1:1: note: ‘std::cin’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
  +++ |+#include <iostream>
    1 | #inlcude <iostream>
stergere.cpp:9:9: error: ‘i’ was not declared in this scope
    9 |     for(i=1;i<=n;i++)
      |         ^
stergere.cpp:10:14: error: ‘a’ was not declared in this scope
   10 |         cin>>a[i];
      |              ^
stergere.cpp:11:5: error: ‘i’ was not declared in this scope
   11 |     i=1;
      |     ^
stergere.cpp:12:8: error: ‘d’ was not declared in this scope
   12 |     do{d=0;
      |        ^
stergere.cpp:13:12: error: ‘j’ was not declared in this scope
   13 |        for(j=1;j<=a[i];j++)
      |            ^
stergere.cpp:13:19: error: ‘a’ was not declared in this scope
   13 |        for(j=1;j<=a[i];j++)
      |                   ^
stergere.cpp:13:8: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
   13 |        for(j=1;j<=a[i];j++)
      |        ^~~
stergere.cpp:16:12: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
   16 |            if(d==2)
      |            ^~
stergere.cpp:17:13: error: ‘h’ was not declared in this scope
   17 |        {for(h=i+1lh<=n;h++)
      |             ^
stergere.cpp:17:17: error: unable to find numeric literal operator ‘operator""lh’
   17 |        {for(h=i+1lh<=n;h++)
      |                 ^~~
stergere.cpp:17:17: note: use ‘-fext-numeric-literals’ to enable more built-in suffixes
stergere.cpp:17:27: error: expected ‘;’ before ‘)’ token
   17 |        {for(h=i+1lh<=n;h++)
      |                           ^
      |                           ;
stergere.cpp:18:12: error: ‘a’ was not declared in this scope
   18 |            a[h-1]=a[h];
      |            ^
stergere.cpp:21:9: error: ‘cout’ was not declared in this scope
   21 |         cout<<a[i]<<" ";
      |         ^~~~
stergere.cpp:21:9: note: ‘std::cout’ is defined in header ‘<iostream>’; did you forget to ‘#include <iostream>’?
stergere.cpp:21:15: error: ‘a’ was not declared in this scope
   21 |         cout<<a[i]<<" ";
      |               ^

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