Detalii evaluare #22674246

Rezumat problemă

#1861 TopSort

Se dă un graf orientat aciclic cu N noduri numerotate de la 1 la N. Să se realizeze o sortare topologică a nodurilor.

Detalii

Problema TopSort Operații I/O topsort.in/topsort.out
Limita timp 0.5 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #22674246 Utilizator Popa Razvan George (poparazvan2002)
Fișier topsort.cpp Dimensiune 747 B
Data încărcării 29 Aprilie 2020, 14:40 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

topsort.cpp:19:1: error: stray '\302' in program
    f[nod]=1;

 ^
topsort.cpp:19:1: error: stray '\240' in program
topsort.cpp:19:1: error: stray '\302' in program
topsort.cpp:19:1: error: stray '\240' in program
topsort.cpp:21:1: error: stray '\302' in program
    for (int i=0;i<L[nod].size();i++) {

 ^
topsort.cpp:21:1: error: stray '\240' in program
topsort.cpp:21:1: error: stray '\302' in program
topsort.cpp:21:1: error: stray '\240' in program
topsort.cpp:23:1: error: stray '\302' in program
        int vecin=L[nod][i];

 ^
topsort.cpp:23:1: error: stray '\240' in program
topsort.cpp:23:1: error: stray '\302' in program
topsort.cpp:23:1: error: stray '\240' in program
topsort.cpp:23:1: error: stray '\302' in program
topsort.cpp:23:1: error: stray '\240' in program
topsort.cpp:23:1: error: stray '\302' in program
topsort.cpp:23:1: error: stray '\240' in program
topsort.cpp:25:1: error: stray '\302' in program
        if (f[vecin]==0)

 ^
topsort.cpp:25:1: error: stray '\240' in program
topsort.cpp:25:1: error: stray '\302' in program
topsort.cpp:25:1: error: stray '\240' in program
topsort.cpp:25:1: error: stray '\302' in program
topsort.cpp:25:1: error: stray '\240' in program
topsort.cpp:25:1: error: stray '\302' in program
topsort.cpp:25:1: error: stray '\240' in program
topsort.cpp:27:1: error: stray '\302' in program
            dfs(vecin);

 ^
topsort.cpp:27:1: error: stray '\240' in program
topsort.cpp:27:1: error: stray '\302' in program
topsort.cpp:27:1: error: stray '\240' in program
topsort.cpp:27:1: error: stray '\302' in program
topsort.cpp:27:1: error: stray '\240' in program
topsort.cpp:27:1: error: stray '\302' in program
topsort.cpp:27:1: error: stray '\240' in program
topsort.cpp:27:1: error: stray '\302' in program
topsort.cpp:27:1: error: stray '\240' in program
topsort.cpp:27:1: error: stray '\302' in program
topsort.cpp:27:1: error: stray '\240' in program
topsort.cpp:29:1: error: stray '\302' in program
    }

 ^
topsort.cpp:29:1: error: stray '\240' in program
topsort.cpp:29:1: error: stray '\302' in program
topsort.cpp:29:1: error: stray '\240' in program
topsort.cpp:31:1: error: stray '\302' in program
    sol[k++]=nod;

 ^
topsort.cpp:31:1: error: stray '\240' in program
topsort.cpp:31:1: error: stray '\302' in program
topsort.cpp:31:1: error: stray '\240' in program
topsort.cpp:37:1: error: stray '\302' in program
    fin>>n>>m;

 ^
topsort.cpp:37:1: error: stray '\240' in program
topsort.cpp:37:1: error: stray '\302' in program
topsort.cpp:37:1: error: stray '\240' in program
topsort.cpp:39:1: error: stray '\302' in program
    for (i=1;i<=m;i++) {

 ^
topsort.cpp:39:1: error: stray '\240' in program
topsort.cpp:39:1: error: stray '\302' in program
topsort.cpp:39:1: error: stray '\240' in program
topsort.cpp:41:1: error: stray '\302' in program
        fin>>x>>y;

 ^
topsort.cpp:41:1: error: stray '\240' in program
topsort.cpp:41:1: error: stray '\302' in program
topsort.cpp:41:1: error: stray '\240' in program
topsort.cpp:41:1: error: stray '\302' in program
topsort.cpp:41:1: error: stray '\240' in program
topsort.cpp:41:1: error: stray '\302' in program
topsort.cpp:41:1: error: stray '\240' in program
topsort.cpp:43:1: error: stray '\302' in program
        L[x].push_back(y);

 ^
topsort.cpp:43:1: error: stray '\240' in program
topsort.cpp:43:1: error: stray '\302' in program
topsort.cpp:43:1: error: stray '\240' in program
topsort.cpp:43:1: error: stray '\302' in program
topsort.cpp:43:1: error: stray '\240' in program
topsort.cpp:43:1: error: stray '\302' in program
topsort.cpp:43:1: error: stray '\240' in program
topsort.cpp:45:1: error: stray '\302' in program
        t[y]=x;

 ^
topsort.cpp:45:1: error: stray '\240' in program
topsort.cpp:45:1: error: stray '\302' in program
topsort.cpp:45:1: error: stray '\240' in program
topsort.cpp:45:1: error: stray '\302' in program
topsort.cpp:45:1: error: stray '\240' in program
topsort.cpp:45:1: error: stray '\302' in program
topsort.cpp:45:1: error: stray '\240' in program
topsort.cpp:47:1: error: stray '\302' in program
    }

 ^
topsort.cpp:47:1: error: stray '\240' in program
topsort.cpp:47:1: error: stray '\302' in program
topsort.cpp:47:1: error: stray '\240' in program
topsort.cpp:49:1: error: stray '\302' in program
    for (i=1;i<=n;i++)

 ^
topsort.cpp:49:1: error: stray '\240' in program
topsort.cpp:49:1: error: stray '\302' in program
topsort.cpp:49:1: error: stray '\240' in program
topsort.cpp:51:1: error: stray '\302' in program
        if (f[i]==0)

 ^
topsort.cpp:51:1: error: stray '\240' in program
topsort.cpp:51:1: error: stray '\302' in program
topsort.cpp:51:1: error: stray '\240' in program
topsort.cpp:51:1: error: stray '\302' in program
topsort.cpp:51:1: error: stray '\240' in program
topsort.cpp:51:1: error: stray '\302' in program
topsort.cpp:51:1: error: stray '\240' in program
topsort.cpp:53:1: error: stray '\302' in program
            dfs(i);

 ^
topsort.cpp:53:1: error: stray '\240' in program
topsort.cpp:53:1: error: stray '\302' in program
topsort.cpp:53:1: error: stray '\240' in program
topsort.cpp:53:1: error: stray '\302' in program
topsort.cpp:53:1: error: stray '\240' in program
topsort.cpp:53:1: error: stray '\302' in program
topsort.cpp:53:1: error: stray '\240' in program
topsort.cpp:53:1: error: stray '\302' in program
topsort.cpp:53:1: error: stray '\240' in program
topsort.cpp:53:1: error: stray '\302' in program
topsort.cpp:53:1: error: stray '\240' in program
topsort.cpp:55:1: error: stray '\302' in program
    while (k--)

 ^
topsort.cpp:55:1: error: stray '\240' in program
topsort.cpp:55:1: error: stray '\302' in program
topsort.cpp:55:1: error: stray '\240' in program
topsort.cpp:57:1: error: stray '\302' in program
        fout<<sol[k]<<" ";

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

 ^
topsort.cpp:59:1: error: stray '\240' in program
topsort.cpp:59:1: error: stray '\302' in program
topsort.cpp:59:1: error: stray '\240' in program
topsort.cpp: In function 'void dfs(int)':
topsort.cpp:21:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (int i=0;i<L[nod].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 TopSort 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ă.