Detalii evaluare #64272821

Rezumat problemă

Detalii

Problema esteArbore Operații I/O estearbore.in/estearbore.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #64272821 Utilizator Tofan Alessia-Ioana (admin2000)
Fișier estearbore.cpp Dimensiune 698 B
Data încărcării 27 Aprilie 2026, 13:56 Scor/rezultat Eroare de compilare

Evaluare

Mesaj compilare

estearbore.cpp:2:1: error: ‘uing’ does not name a type; did you mean ‘uint’?
    2 | uing namespace std;
      | ^~~~
      | uint
estearbore.cpp:3:1: error: ‘ifstream’ does not name a type
    3 | ifstream cin("estearbore.in")
      | ^~~~~~~~
estearbore.cpp: In function ‘void citire()’:
estearbore.cpp:7:5: error: ‘cin’ was not declared in this scope
    7 |     cin>>n;
      |     ^~~
estearbore.cpp:7:10: error: ‘n’ was not declared in this scope
    7 |     cin>>n;
      |          ^
estearbore.cpp:10:9: error: ‘a’ was not declared in this scope
   10 |         a[x][y]=a[y][x]=1;
      |         ^
estearbore.cpp:11:9: error: ‘m’ was not declared in this scope
   11 |         m++; } }
      |         ^
estearbore.cpp: In function ‘void dfs(int)’:
estearbore.cpp:13:9: error: ‘v’ was not declared in this scope
   13 |         v[k]=1;
      |         ^
estearbore.cpp:14:9: error: ‘cout’ was not declared in this scope
   14 |         cout<<k<<" ";
      |         ^~~~
estearbore.cpp:15:24: error: ‘n’ was not declared in this scope
   15 |         for(int i=1;i<=n;i++)
      |                        ^
estearbore.cpp:16:16: error: ‘a’ was not declared in this scope
   16 |             if(a[k][i]==1 && v[i]==0)
      |                ^
estearbore.cpp: In function ‘int main()’:
estearbore.cpp:19:8: error: ‘m’ was not declared in this scope; did you mean ‘tm’?
   19 |     if(m!=n-1)
      |        ^
      |        tm
estearbore.cpp:19:11: error: ‘n’ was not declared in this scope
   19 |     if(m!=n-1)
      |           ^
estearbore.cpp:20:9: error: ‘cout’ was not declared in this scope
   20 |         cout<<"NU";
      |         ^~~~
estearbore.cpp:21:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
   21 |     else  dfs(1);
      |     ^~~~
estearbore.cpp:22:11: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘else’
   22 |           int OK=1;
      |           ^~~
estearbore.cpp:23:26: error: ‘n’ was not declared in this scope
   23 |           for(int i=1;i<=n&&OK;i++)
      |                          ^
estearbore.cpp:24:18: error: ‘v’ was not declared in this scope
   24 |               if(v[i]==0)
      |                  ^
estearbore.cpp:25:17: warning: statement has no effect [-Wunused-value]
   25 |               OK==0;
      |               ~~^~~
estearbore.cpp:23:11: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation]
   23 |           for(int i=1;i<=n&&OK;i++)
      |           ^~~
estearbore.cpp:26:15: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’
   26 |               if(OK==1)
      |               ^~
estearbore.cpp:27:15: error: ‘cout’ was not declared in this scope
   27 |               cout<<"DA";
      |               ^~~~
estearbore.cpp:28:20: error: ‘cout’ was not declared in this scope
   28 |               else cout<<"NU"; }
      |                    ^~~~
estearbore.cpp: At global scope:
estearbore.cpp:29:5: error: expected unqualified-id before ‘return’
   29 |     return 0; }
      |     ^~~~~~
estearbore.cpp:29:15: error: expected declaration before ‘}’ token
   29 |     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 esteArbore 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!