Detalii evaluare #53914807

Rezumat problemă

#2749 tata

Se dă un vector t=(t[1], t[2], ..., t[n]) care memorează numere naturale cuprinse între 0 și n. Să se verifice dacă t este sau nu vector de tați asociat unui arbore cu rădăcină.

Detalii

Problema tata Operații I/O tastatură/ecran
Limita timp 0.2 secunde Limita memorie Total: 64 MB / Stivă 32 MB
Id soluție #53914807 Utilizator Popa David Bogdan (Popadavidbogdan)
Fișier tata.cpp Dimensiune 1.15 KB
Data încărcării 14 Noiembrie 2024, 17:05 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

tata.cpp:7:1: error: stray '\302' in program
     vizitat[n]=1;

 ^
tata.cpp:7:1: error: stray '\240' in program
tata.cpp:7:1: error: stray '\302' in program
tata.cpp:7:1: error: stray '\240' in program
tata.cpp:8:1: error: stray '\302' in program
     for(int i=0;i<lista[n].size();i++)

 ^
tata.cpp:8:1: error: stray '\240' in program
tata.cpp:8:1: error: stray '\302' in program
tata.cpp:8:1: error: stray '\240' in program
tata.cpp:9:1: error: stray '\302' in program
     {

 ^
tata.cpp:9:1: error: stray '\240' in program
tata.cpp:9:1: error: stray '\302' in program
tata.cpp:9:1: error: stray '\240' in program
tata.cpp:10:1: error: stray '\302' in program
         if(vizitat[lista[n][i]]==0)

 ^
tata.cpp:10:1: error: stray '\240' in program
tata.cpp:10:1: error: stray '\302' in program
tata.cpp:10:1: error: stray '\240' in program
tata.cpp:10:1: error: stray '\302' in program
tata.cpp:10:1: error: stray '\240' in program
tata.cpp:10:1: error: stray '\302' in program
tata.cpp:10:1: error: stray '\240' in program
tata.cpp:11:1: error: stray '\302' in program
         {

 ^
tata.cpp:11:1: error: stray '\240' in program
tata.cpp:11:1: error: stray '\302' in program
tata.cpp:11:1: error: stray '\240' in program
tata.cpp:11:1: error: stray '\302' in program
tata.cpp:11:1: error: stray '\240' in program
tata.cpp:11:1: error: stray '\302' in program
tata.cpp:11:1: error: stray '\240' in program
tata.cpp:12:1: error: stray '\302' in program
             dfs(lista[n][i]);

 ^
tata.cpp:12:1: error: stray '\240' in program
tata.cpp:12:1: error: stray '\302' in program
tata.cpp:12:1: error: stray '\240' in program
tata.cpp:12:1: error: stray '\302' in program
tata.cpp:12:1: error: stray '\240' in program
tata.cpp:12:1: error: stray '\302' in program
tata.cpp:12:1: error: stray '\240' in program
tata.cpp:12:1: error: stray '\302' in program
tata.cpp:12:1: error: stray '\240' in program
tata.cpp:12:1: error: stray '\302' in program
tata.cpp:12:1: error: stray '\240' in program
tata.cpp:13:1: error: stray '\302' in program
         }

 ^
tata.cpp:13:1: error: stray '\240' in program
tata.cpp:13:1: error: stray '\302' in program
tata.cpp:13:1: error: stray '\240' in program
tata.cpp:13:1: error: stray '\302' in program
tata.cpp:13:1: error: stray '\240' in program
tata.cpp:13:1: error: stray '\302' in program
tata.cpp:13:1: error: stray '\240' in program
tata.cpp:14:1: error: stray '\302' in program
     }

 ^
tata.cpp:14:1: error: stray '\240' in program
tata.cpp:14:1: error: stray '\302' in program
tata.cpp:14:1: error: stray '\240' in program
tata.cpp:18:1: error: stray '\302' in program
     int n,CntZero=0,Radacina,ok=0;

 ^
tata.cpp:18:1: error: stray '\240' in program
tata.cpp:18:1: error: stray '\302' in program
tata.cpp:18:1: error: stray '\240' in program
tata.cpp:19:1: error: stray '\302' in program
     cin>>n;

 ^
tata.cpp:19:1: error: stray '\240' in program
tata.cpp:19:1: error: stray '\302' in program
tata.cpp:19:1: error: stray '\240' in program
tata.cpp:20:1: error: stray '\302' in program
     for(int i=1;i<=n;i++)

 ^
tata.cpp:20:1: error: stray '\240' in program
tata.cpp:20:1: error: stray '\302' in program
tata.cpp:20:1: error: stray '\240' in program
tata.cpp:21:1: error: stray '\302' in program
     {

 ^
tata.cpp:21:1: error: stray '\240' in program
tata.cpp:21:1: error: stray '\302' in program
tata.cpp:21:1: error: stray '\240' in program
tata.cpp:22:1: error: stray '\302' in program
         int a;

 ^
tata.cpp:22:1: error: stray '\240' in program
tata.cpp:22:1: error: stray '\302' in program
tata.cpp:22:1: error: stray '\240' in program
tata.cpp:22:1: error: stray '\302' in program
tata.cpp:22:1: error: stray '\240' in program
tata.cpp:22:1: error: stray '\302' in program
tata.cpp:22:1: error: stray '\240' in program
tata.cpp:23:1: error: stray '\302' in program
         cin>>a;

 ^
tata.cpp:23:1: error: stray '\240' in program
tata.cpp:23:1: error: stray '\302' in program
tata.cpp:23:1: error: stray '\240' in program
tata.cpp:23:1: error: stray '\302' in program
tata.cpp:23:1: error: stray '\240' in program
tata.cpp:23:1: error: stray '\302' in program
tata.cpp:23:1: error: stray '\240' in program
tata.cpp:24:1: error: stray '\302' in program
         if(a==0)

 ^
tata.cpp:24:1: error: stray '\240' in program
tata.cpp:24:1: error: stray '\302' in program
tata.cpp:24:1: error: stray '\240' in program
tata.cpp:24:1: error: stray '\302' in program
tata.cpp:24:1: error: stray '\240' in program
tata.cpp:24:1: error: stray '\302' in program
tata.cpp:24:1: error: stray '\240' in program
tata.cpp:25:1: error: stray '\302' in program
         {

 ^
tata.cpp:25:1: error: stray '\240' in program
tata.cpp:25:1: error: stray '\302' in program
tata.cpp:25:1: error: stray '\240' in program
tata.cpp:25:1: error: stray '\302' in program
tata.cpp:25:1: error: stray '\240' in program
tata.cpp:25:1: error: stray '\302' in program
tata.cpp:25:1: error: stray '\240' in program
tata.cpp:26:1: error: stray '\302' in program
             Radacina=i;

 ^
tata.cpp:26:1: error: stray '\240' in program
tata.cpp:26:1: error: stray '\302' in program
tata.cpp:26:1: error: stray '\240' in program
tata.cpp:26:1: error: stray '\302' in program
tata.cpp:26:1: error: stray '\240' in program
tata.cpp:26:1: error: stray '\302' in program
tata.cpp:26:1: error: stray '\240' in program
tata.cpp:26:1: error: stray '\302' in program
tata.cpp:26:1: error: stray '\240' in program
tata.cpp:26:1: error: stray '\302' in program
tata.cpp:26:1: error: stray '\240' in program
tata.cpp:27:1: error: stray '\302' in program
             CntZero++;

 ^
tata.cpp:27:1: error: stray '\240' in program
tata.cpp:27:1: error: stray '\302' in program
tata.cpp:27:1: error: stray '\240' in program
tata.cpp:27:1: error: stray '\302' in program
tata.cpp:27:1: error: stray '\240' in program
tata.cpp:27:1: error: stray '\302' in program
tata.cpp:27:1: error: stray '\240' in program
tata.cpp:27:1: error: stray '\302' in program
tata.cpp:27:1: error: stray '\240' in program
tata.cpp:27:1: error: stray '\302' in program
tata.cpp:27:1: error: stray '\240' in program
tata.cpp:28:1: error: stray '\302' in program
         }

 ^
tata.cpp:28:1: error: stray '\240' in program
tata.cpp:28:1: error: stray '\302' in program
tata.cpp:28:1: error: stray '\240' in program
tata.cpp:28:1: error: stray '\302' in program
tata.cpp:28:1: error: stray '\240' in program
tata.cpp:28:1: error: stray '\302' in program
tata.cpp:28:1: error: stray '\240' in program
tata.cpp:29:1: error: stray '\302' in program
         else

 ^
tata.cpp:29:1: error: stray '\240' in program
tata.cpp:29:1: error: stray '\302' in program
tata.cpp:29:1: error: stray '\240' in program
tata.cpp:29:1: error: stray '\302' in program
tata.cpp:29:1: error: stray '\240' in program
tata.cpp:29:1: error: stray '\302' in program
tata.cpp:29:1: error: stray '\240' in program
tata.cpp:30:1: error: stray '\302' in program
         {

 ^
tata.cpp:30:1: error: stray '\240' in program
tata.cpp:30:1: error: stray '\302' in program
tata.cpp:30:1: error: stray '\240' in program
tata.cpp:30:1: error: stray '\302' in program
tata.cpp:30:1: error: stray '\240' in program
tata.cpp:30:1: error: stray '\302' in program
tata.cpp:30:1: error: stray '\240' in program
tata.cpp:31:1: error: stray '\302' in program
             lista[i].push_back(a);

 ^
tata.cpp:31:1: error: stray '\240' in program
tata.cpp:31:1: error: stray '\302' in program
tata.cpp:31:1: error: stray '\240' in program
tata.cpp:31:1: error: stray '\302' in program
tata.cpp:31:1: error: stray '\240' in program
tata.cpp:31:1: error: stray '\302' in program
tata.cpp:31:1: error: stray '\240' in program
tata.cpp:31:1: error: stray '\302' in program
tata.cpp:31:1: error: stray '\240' in program
tata.cpp:31:1: error: stray '\302' in program
tata.cpp:31:1: error: stray '\240' in program
tata.cpp:32:1: error: stray '\302' in program
             lista[a].push_back(i);

 ^
tata.cpp:32:1: error: stray '\240' in program
tata.cpp:32:1: error: stray '\302' in program
tata.cpp:32:1: error: stray '\240' in program
tata.cpp:32:1: error: stray '\302' in program
tata.cpp:32:1: error: stray '\240' in program
tata.cpp:32:1: error: stray '\302' in program
tata.cpp:32:1: error: stray '\240' in program
tata.cpp:32:1: error: stray '\302' in program
tata.cpp:32:1: error: stray '\240' in program
tata.cpp:32:1: error: stray '\302' in program
tata.cpp:32:1: error: stray '\240' in program
tata.cpp:33:1: error: stray '\302' in program
         }

 ^
tata.cpp:33:1: error: stray '\240' in program
tata.cpp:33:1: error: stray '\302' in program
tata.cpp:33:1: error: stray '\240' in program
tata.cpp:33:1: error: stray '\302' in program
tata.cpp:33:1: error: stray '\240' in program
tata.cpp:33:1: error: stray '\302' in program
tata.cpp:33:1: error: stray '\240' in program
tata.cpp:34:1: error: stray '\302' in program
     }

 ^
tata.cpp:34:1: error: stray '\240' in program
tata.cpp:34:1: error: stray '\302' in program
tata.cpp:34:1: error: stray '\240' in program
tata.cpp:35:1: error: stray '\302' in program
     if(CntZero==1)

 ^
tata.cpp:35:1: error: stray '\240' in program
tata.cpp:35:1: error: stray '\302' in program
tata.cpp:35:1: error: stray '\240' in program
tata.cpp:36:1: error: stray '\302' in program
     {

 ^
tata.cpp:36:1: error: stray '\240' in program
tata.cpp:36:1: error: stray '\302' in program
tata.cpp:36:1: error: stray '\240' in program
tata.cpp:37:1: error: stray '\302' in program
         dfs(Radacina);

 ^
tata.cpp:37:1: error: stray '\240' in program
tata.cpp:37:1: error: stray '\302' in program
tata.cpp:37:1: error: stray '\240' in program
tata.cpp:37:1: error: stray '\302' in program
tata.cpp:37:1: error: stray '\240' in program
tata.cpp:37:1: error: stray '\302' in program
tata.cpp:37:1: error: stray '\240' in program
tata.cpp:38:1: error: stray '\302' in program
         for(int i=1;i<=n;i++)

 ^
tata.cpp:38:1: error: stray '\240' in program
tata.cpp:38:1: error: stray '\302' in program
tata.cpp:38:1: error: stray '\240' in program
tata.cpp:38:1: error: stray '\302' in program
tata.cpp:38:1: error: stray '\240' in program
tata.cpp:38:1: error: stray '\302' in program
tata.cpp:38:1: error: stray '\240' in program
tata.cpp:39:1: error: stray '\302' in program
         {

 ^
tata.cpp:39:1: error: stray '\240' in program
tata.cpp:39:1: error: stray '\302' in program
tata.cpp:39:1: error: stray '\240' in program
tata.cpp:39:1: error: stray '\302' in program
tata.cpp:39:1: error: stray '\240' in program
tata.cpp:39:1: error: stray '\302' in program
tata.cpp:39:1: error: stray '\240' in program
tata.cpp:40:1: error: stray '\302' in program
             if(vizitat[i]==0)

 ^
tata.cpp:40:1: error: stray '\240' in program
tata.cpp:40:1: error: stray '\302' in program
tata.cpp:40:1: error: stray '\240' in program
tata.cpp:40:1: error: stray '\302' in program
tata.cpp:40:1: error: stray '\240' in program
tata.cpp:40:1: error: stray '\302' in program
tata.cpp:40:1: error: stray '\240' in program
tata.cpp:40:1: error: stray '\302' in program
tata.cpp:40:1: error: stray '\240' in program
tata.cpp:40:1: error: stray '\302' in program
tata.cpp:40:1: error: stray '\240' in program
tata.cpp:41:1: error: stray '\302' in program
             {

 ^
tata.cpp:41:1: error: stray '\240' in program
tata.cpp:41:1: error: stray '\302' in program
tata.cpp:41:1: error: stray '\240' in program
tata.cpp:41:1: error: stray '\302' in program
tata.cpp:41:1: error: stray '\240' in program
tata.cpp:41:1: error: stray '\302' in program
tata.cpp:41:1: error: stray '\240' in program
tata.cpp:41:1: error: stray '\302' in program
tata.cpp:41:1: error: stray '\240' in program
tata.cpp:41:1: error: stray '\302' in program
tata.cpp:41:1: error: stray '\240' in program
tata.cpp:42:1: error: stray '\302' in program
                 ok=1;

 ^
tata.cpp:42:1: error: stray '\240' in program
tata.cpp:42:1: error: stray '\302' in program
tata.cpp:42:1: error: stray '\240' in program
tata.cpp:42:1: error: stray '\302' in program
tata.cpp:42:1: error: stray '\240' in program
tata.cpp:42:1: error: stray '\302' in program
tata.cpp:42:1: error: stray '\240' in program
tata.cpp:42:1: error: stray '\302' in program
tata.cpp:42:1: error: stray '\240' in program
tata.cpp:42:1: error: stray '\302' in program
tata.cpp:42:1: error: stray '\240' in program
tata.cpp:42:1: error: stray '\302' in program
tata.cpp:42:1: error: stray '\240' in program
tata.cpp:42:1: error: stray '\302' in program
tata.cpp:42:1: error: stray '\240' in program
tata.cpp:43:1: error: stray '\302' in program
             }

 ^
tata.cpp:43:1: error: stray '\240' in program
tata.cpp:43:1: error: stray '\302' in program
tata.cpp:43:1: error: stray '\240' in program
tata.cpp:43:1: error: stray '\302' in program
tata.cpp:43:1: error: stray '\240' in program
tata.cpp:43:1: error: stray '\302' in program
tata.cpp:43:1: error: stray '\240' in program
tata.cpp:43:1: error: stray '\302' in program
tata.cpp:43:1: error: stray '\240' in program
tata.cpp:43:1: error: stray '\302' in program
tata.cpp:43:1: error: stray '\240' in program
tata.cpp:44:1: error: stray '\302' in program
         }

 ^
tata.cpp:44:1: error: stray '\240' in program
tata.cpp:44:1: error: stray '\302' in program
tata.cpp:44:1: error: stray '\240' in program
tata.cpp:44:1: error: stray '\302' in program
tata.cpp:44:1: error: stray '\240' in program
tata.cpp:44:1: error: stray '\302' in program
tata.cpp:44:1: error: stray '\240' in program
tata.cpp:45:1: error: stray '\302' in program
         if(ok==0)

 ^
tata.cpp:45:1: error: stray '\240' in program
tata.cpp:45:1: error: stray '\302' in program
tata.cpp:45:1: error: stray '\240' in program
tata.cpp:45:1: error: stray '\302' in program
tata.cpp:45:1: error: stray '\240' in program
tata.cpp:45:1: error: stray '\302' in program
tata.cpp:45:1: error: stray '\240' in program
tata.cpp:46:1: error: stray '\302' in program
         {

 ^
tata.cpp:46:1: error: stray '\240' in program
tata.cpp:46:1: error: stray '\302' in program
tata.cpp:46:1: error: stray '\240' in program
tata.cpp:46:1: error: stray '\302' in program
tata.cpp:46:1: error: stray '\240' in program
tata.cpp:46:1: error: stray '\302' in program
tata.cpp:46:1: error: stray '\240' in program
tata.cpp:47:1: error: stray '\302' in program
             cout<<"DA";

 ^
tata.cpp:47:1: error: stray '\240' in program
tata.cpp:47:1: error: stray '\302' in program
tata.cpp:47:1: error: stray '\240' in program
tata.cpp:47:1: error: stray '\302' in program
tata.cpp:47:1: error: stray '\240' in program
tata.cpp:47:1: error: stray '\302' in program
tata.cpp:47:1: error: stray '\240' in program
tata.cpp:47:1: error: stray '\302' in program
tata.cpp:47:1: error: stray '\240' in program
tata.cpp:47:1: error: stray '\302' in program
tata.cpp:47:1: error: stray '\240' in program
tata.cpp:48:1: error: stray '\302' in program
         }

 ^
tata.cpp:48:1: error: stray '\240' in program
tata.cpp:48:1: error: stray '\302' in program
tata.cpp:48:1: error: stray '\240' in program
tata.cpp:48:1: error: stray '\302' in program
tata.cpp:48:1: error: stray '\240' in program
tata.cpp:48:1: error: stray '\302' in program
tata.cpp:48:1: error: stray '\240' in program
tata.cpp:49:1: error: stray '\302' in program
     }

 ^
tata.cpp:49:1: error: stray '\240' in program
tata.cpp:49:1: error: stray '\302' in program
tata.cpp:49:1: error: stray '\240' in program
tata.cpp:50:1: error: stray '\302' in program
     else

 ^
tata.cpp:50:1: error: stray '\240' in program
tata.cpp:50:1: error: stray '\302' in program
tata.cpp:50:1: error: stray '\240' in program
tata.cpp:51:1: error: stray '\302' in program
     {

 ^
tata.cpp:51:1: error: stray '\240' in program
tata.cpp:51:1: error: stray '\302' in program
tata.cpp:51:1: error: stray '\240' in program
tata.cpp:52:1: error: stray '\302' in program
         ok=1;

 ^
tata.cpp:52:1: error: stray '\240' in program
tata.cpp:52:1: error: stray '\302' in program
tata.cpp:52:1: error: stray '\240' in program
tata.cpp:52:1: error: stray '\302' in program
tata.cpp:52:1: error: stray '\240' in program
tata.cpp:52:1: error: stray '\302' in program
tata.cpp:52:1: error: stray '\240' in program
tata.cpp:53:1: error: stray '\302' in program
     }

 ^
tata.cpp:53:1: error: stray '\240' in program
tata.cpp:53:1: error: stray '\302' in program
tata.cpp:53:1: error: stray '\240' in program
tata.cpp:54:1: error: stray '\302' in program
     if(ok==1)

 ^
tata.cpp:54:1: error: stray '\240' in program
tata.cpp:54:1: error: stray '\302' in program
tata.cpp:54:1: error: stray '\240' in program
tata.cpp:55:1: error: stray '\302' in program
     {

 ^
tata.cpp:55:1: error: stray '\240' in program
tata.cpp:55:1: error: stray '\302' in program
tata.cpp:55:1: error: stray '\240' in program
tata.cpp:56:1: error: stray '\302' in program
         cout<<"NU";

 ^
tata.cpp:56:1: error: stray '\240' in program
tata.cpp:56:1: error: stray '\302' in program
tata.cpp:56:1: error: stray '\240' in program
tata.cpp:56:1: error: stray '\302' in program
tata.cpp:56:1: error: stray '\240' in program
tata.cpp:56:1: error: stray '\302' in program
tata.cpp:56:1: error: stray '\240' in program
tata.cpp:57:1: error: stray '\302' in program
     }

 ^
tata.cpp:57:1: error: stray '\240' in program
tata.cpp:57:1: error: stray '\302' in program
tata.cpp:57:1: error: stray '\240' in program
tata.cpp:58:1: error: stray '\302' in program
     

 ^
tata.cpp:58:1: error: stray '\240' in program
tata.cpp:58:1: error: stray '\302' in program
tata.cpp:58:1: error: stray '\240' in program
tata.cpp:59:1: error: stray '\302' in program
     return 0;

 ^
tata.cpp:59:1: error: stray '\240' in program
tata.cpp:59:1: error: stray '\302' in program
tata.cpp:59:1: error: stray '\240' in program
tata.cpp: In function 'void dfs(int)':
tata.cpp:8:35: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     for(int i=0;i<lista[n].size();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 tata 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ă.