Detalii evaluare #53856632

Rezumat problemă

Se dă lista muchiilor unui graf neorientat cu n vârfuri, etichetate de la 1 la n. Din acest graf se elimină toate vârfurile etichetate cu valori prime. Să se determine câte muchii va avea subgraful obținut.

Detalii

Problema Subgraf Operații I/O subgraf.in/subgraf.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #53856632 Utilizator Melinte Tudor (Melinte_Tudor)
Fișier subgraf.cpp Dimensiune 821 B
Data încărcării 13 Noiembrie 2024, 11:50 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

subgraf.cpp:7:1: error: stray '\302' in program
     if(n<2)

 ^
subgraf.cpp:7:1: error: stray '\240' in program
subgraf.cpp:7:1: error: stray '\302' in program
subgraf.cpp:7:1: error: stray '\240' in program
subgraf.cpp:8:1: error: stray '\302' in program
         return 0;

 ^
subgraf.cpp:8:1: error: stray '\240' in program
subgraf.cpp:8:1: error: stray '\302' in program
subgraf.cpp:8:1: error: stray '\240' in program
subgraf.cpp:8:1: error: stray '\302' in program
subgraf.cpp:8:1: error: stray '\240' in program
subgraf.cpp:8:1: error: stray '\302' in program
subgraf.cpp:8:1: error: stray '\240' in program
subgraf.cpp:9:1: error: stray '\302' in program
     if(n==2)

 ^
subgraf.cpp:9:1: error: stray '\240' in program
subgraf.cpp:9:1: error: stray '\302' in program
subgraf.cpp:9:1: error: stray '\240' in program
subgraf.cpp:10:1: error: stray '\302' in program
         return 1;

 ^
subgraf.cpp:10:1: error: stray '\240' in program
subgraf.cpp:10:1: error: stray '\302' in program
subgraf.cpp:10:1: error: stray '\240' in program
subgraf.cpp:10:1: error: stray '\302' in program
subgraf.cpp:10:1: error: stray '\240' in program
subgraf.cpp:10:1: error: stray '\302' in program
subgraf.cpp:10:1: error: stray '\240' in program
subgraf.cpp:11:1: error: stray '\302' in program
     if(n%2==0)

 ^
subgraf.cpp:11:1: error: stray '\240' in program
subgraf.cpp:11:1: error: stray '\302' in program
subgraf.cpp:11:1: error: stray '\240' in program
subgraf.cpp:12:1: error: stray '\302' in program
         return 0;

 ^
subgraf.cpp:12:1: error: stray '\240' in program
subgraf.cpp:12:1: error: stray '\302' in program
subgraf.cpp:12:1: error: stray '\240' in program
subgraf.cpp:12:1: error: stray '\302' in program
subgraf.cpp:12:1: error: stray '\240' in program
subgraf.cpp:12:1: error: stray '\302' in program
subgraf.cpp:12:1: error: stray '\240' in program
subgraf.cpp:13:1: error: stray '\302' in program
     for(int i=3;i*i<=n;i+=2)

 ^
subgraf.cpp:13:1: error: stray '\240' in program
subgraf.cpp:13:1: error: stray '\302' in program
subgraf.cpp:13:1: error: stray '\240' in program
subgraf.cpp:14:1: error: stray '\302' in program
         if(n%i==0)

 ^
subgraf.cpp:14:1: error: stray '\240' in program
subgraf.cpp:14:1: error: stray '\302' in program
subgraf.cpp:14:1: error: stray '\240' in program
subgraf.cpp:14:1: error: stray '\302' in program
subgraf.cpp:14:1: error: stray '\240' in program
subgraf.cpp:14:1: error: stray '\302' in program
subgraf.cpp:14:1: error: stray '\240' in program
subgraf.cpp:15:1: error: stray '\302' in program
         return 0;

 ^
subgraf.cpp:15:1: error: stray '\240' in program
subgraf.cpp:15:1: error: stray '\302' in program
subgraf.cpp:15:1: error: stray '\240' in program
subgraf.cpp:15:1: error: stray '\302' in program
subgraf.cpp:15:1: error: stray '\240' in program
subgraf.cpp:15:1: error: stray '\302' in program
subgraf.cpp:15:1: error: stray '\240' in program
subgraf.cpp:16:1: error: stray '\302' in program
     return 1;

 ^
subgraf.cpp:16:1: error: stray '\240' in program
subgraf.cpp:16:1: error: stray '\302' in program
subgraf.cpp:16:1: error: stray '\240' in program
subgraf.cpp:20:1: error: stray '\302' in program
    int n,m,k,a[101][101],x,y,s=0;

 ^
subgraf.cpp:20:1: error: stray '\240' in program
subgraf.cpp:20:1: error: stray '\302' in program
subgraf.cpp:20:1: error: stray '\240' in program
subgraf.cpp:21:1: error: stray '\302' in program
    fin>>n;

 ^
subgraf.cpp:21:1: error: stray '\240' in program
subgraf.cpp:21:1: error: stray '\302' in program
subgraf.cpp:21:1: error: stray '\240' in program
subgraf.cpp:22:1: error: stray '\302' in program
        while(fin>>x>>y)

 ^
subgraf.cpp:22:1: error: stray '\240' in program
subgraf.cpp:22:1: error: stray '\302' in program
subgraf.cpp:22:1: error: stray '\240' in program
subgraf.cpp:22:1: error: stray '\302' in program
subgraf.cpp:22:1: error: stray '\240' in program
subgraf.cpp:22:1: error: stray '\302' in program
subgraf.cpp:22:1: error: stray '\240' in program
subgraf.cpp:23:1: error: stray '\302' in program
        a[x][y]=a[y][x]=1;

 ^
subgraf.cpp:23:1: error: stray '\240' in program
subgraf.cpp:23:1: error: stray '\302' in program
subgraf.cpp:23:1: error: stray '\240' in program
subgraf.cpp:23:1: error: stray '\302' in program
subgraf.cpp:23:1: error: stray '\240' in program
subgraf.cpp:23:1: error: stray '\302' in program
subgraf.cpp:23:1: error: stray '\240' in program
subgraf.cpp:26:1: error: stray '\302' in program
    for(int i=1;i<=n;i++)

 ^
subgraf.cpp:26:1: error: stray '\240' in program
subgraf.cpp:26:1: error: stray '\302' in program
subgraf.cpp:26:1: error: stray '\240' in program
subgraf.cpp:27:1: error: stray '\302' in program
         for(int j=1;j<=n;j++)

 ^
subgraf.cpp:27:1: error: stray '\240' in program
subgraf.cpp:27:1: error: stray '\302' in program
subgraf.cpp:27:1: error: stray '\240' in program
subgraf.cpp:27:1: error: stray '\302' in program
subgraf.cpp:27:1: error: stray '\240' in program
subgraf.cpp:27:1: error: stray '\302' in program
subgraf.cpp:27:1: error: stray '\240' in program
subgraf.cpp:28:1: error: stray '\302' in program
         {

 ^
subgraf.cpp:28:1: error: stray '\240' in program
subgraf.cpp:28:1: error: stray '\302' in program
subgraf.cpp:28:1: error: stray '\240' in program
subgraf.cpp:28:1: error: stray '\302' in program
subgraf.cpp:28:1: error: stray '\240' in program
subgraf.cpp:28:1: error: stray '\302' in program
subgraf.cpp:28:1: error: stray '\240' in program
subgraf.cpp:29:1: error: stray '\302' in program
             if(prim(i)==1 or prim(j)==1)

 ^
subgraf.cpp:29:1: error: stray '\240' in program
subgraf.cpp:29:1: error: stray '\302' in program
subgraf.cpp:29:1: error: stray '\240' in program
subgraf.cpp:29:1: error: stray '\302' in program
subgraf.cpp:29:1: error: stray '\240' in program
subgraf.cpp:29:1: error: stray '\302' in program
subgraf.cpp:29:1: error: stray '\240' in program
subgraf.cpp:29:1: error: stray '\302' in program
subgraf.cpp:29:1: error: stray '\240' in program
subgraf.cpp:29:1: error: stray '\302' in program
subgraf.cpp:29:1: error: stray '\240' in program
subgraf.cpp:30:1: error: stray '\302' in program
         a[i][j]=a[j][i]=0;

 ^
subgraf.cpp:30:1: error: stray '\240' in program
subgraf.cpp:30:1: error: stray '\302' in program
subgraf.cpp:30:1: error: stray '\240' in program
subgraf.cpp:30:1: error: stray '\302' in program
subgraf.cpp:30:1: error: stray '\240' in program
subgraf.cpp:30:1: error: stray '\302' in program
subgraf.cpp:30:1: error: stray '\240' in program
subgraf.cpp:31:1: error: stray '\302' in program
         }

 ^
subgraf.cpp:31:1: error: stray '\240' in program
subgraf.cpp:31:1: error: stray '\302' in program
subgraf.cpp:31:1: error: stray '\240' in program
subgraf.cpp:31:1: error: stray '\302' in program
subgraf.cpp:31:1: error: stray '\240' in program
subgraf.cpp:31:1: error: stray '\302' in program
subgraf.cpp:31:1: error: stray '\240' in program
subgraf.cpp:34:1: error: stray '\302' in program
    for(int i=1;i<=n;i++)

 ^
subgraf.cpp:34:1: error: stray '\240' in program
subgraf.cpp:34:1: error: stray '\302' in program
subgraf.cpp:34:1: error: stray '\240' in program
subgraf.cpp:35:1: error: stray '\302' in program
    {

 ^
subgraf.cpp:35:1: error: stray '\240' in program
subgraf.cpp:35:1: error: stray '\302' in program
subgraf.cpp:35:1: error: stray '\240' in program
subgraf.cpp:36:1: error: stray '\302' in program
        for(int j=i+1;j<=n;j++)

 ^
subgraf.cpp:36:1: error: stray '\240' in program
subgraf.cpp:36:1: error: stray '\302' in program
subgraf.cpp:36:1: error: stray '\240' in program
subgraf.cpp:36:1: error: stray '\302' in program
subgraf.cpp:36:1: error: stray '\240' in program
subgraf.cpp:36:1: error: stray '\302' in program
subgraf.cpp:36:1: error: stray '\240' in program
subgraf.cpp:37:1: error: stray '\302' in program
         if(a[i][j]==1)

 ^
subgraf.cpp:37:1: error: stray '\240' in program
subgraf.cpp:37:1: error: stray '\302' in program
subgraf.cpp:37:1: error: stray '\240' in program
subgraf.cpp:37:1: error: stray '\302' in program
subgraf.cpp:37:1: error: stray '\240' in program
subgraf.cpp:37:1: error: stray '\302' in program
subgraf.cpp:37:1: error: stray '\240' in program
subgraf.cpp:38:1: error: stray '\302' in program
             s++;

 ^
subgraf.cpp:38:1: error: stray '\240' in program
subgraf.cpp:38:1: error: stray '\302' in program
subgraf.cpp:38:1: error: stray '\240' in program
subgraf.cpp:38:1: error: stray '\302' in program
subgraf.cpp:38:1: error: stray '\240' in program
subgraf.cpp:38:1: error: stray '\302' in program
subgraf.cpp:38:1: error: stray '\240' in program
subgraf.cpp:38:1: error: stray '\302' in program
subgraf.cpp:38:1: error: stray '\240' in program
subgraf.cpp:38:1: error: stray '\302' in program
subgraf.cpp:38:1: error: stray '\240' in program
subgraf.cpp:39:1: error: stray '\302' in program
    }

 ^
subgraf.cpp:39:1: error: stray '\240' in program
subgraf.cpp:39:1: error: stray '\302' in program
subgraf.cpp:39:1: error: stray '\240' in program
subgraf.cpp:40:1: error: stray '\302' in program
    fout<<s;

 ^
subgraf.cpp:40:1: error: stray '\240' in program
subgraf.cpp:40:1: error: stray '\302' in program
subgraf.cpp:40:1: error: stray '\240' in program
subgraf.cpp:41:1: error: stray '\302' in program
    return 0;

 ^
subgraf.cpp:41:1: error: stray '\240' in program
subgraf.cpp:41:1: error: stray '\302' in program
subgraf.cpp:41:1: error: stray '\240' in program
subgraf.cpp: In function 'int main()':
subgraf.cpp:20:12: warning: unused variable 'm' [-Wunused-variable]
    int n,m,k,a[101][101],x,y,s=0;

            ^
subgraf.cpp:20:14: warning: unused variable 'k' [-Wunused-variable]
    int n,m,k,a[101][101],x,y,s=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 Subgraf 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ă.