Detalii evaluare #12607064

Rezumat problemă

#437 Conex

Se dă lista muchiilor unui graf neorientat. Să se verifice dacă graful este sau nu conex.

Detalii

Problema Conex Operații I/O conex.in/conex.out
Limita timp 0.1 secunde Limita memorie Total: 64 MB / Stivă 8 MB
Id soluție #12607064 Utilizator Stirban George Florin (Florin122001)
Fișier conex.cpp Dimensiune 756 B
Data încărcării 06 Decembrie 2018, 17:25 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

conex.cpp:1:9: error: #include expects "FILENAME" or <FILENAME>
 #include <iostream>

         ^
conex.cpp:2:9: error: #include expects "FILENAME" or <FILENAME>
 #include <fstream>

         ^
conex.cpp:3:1: error: stray '\302' in program
 using namespace std;

 ^
conex.cpp:3:1: error: stray '\240' in program
conex.cpp:3:1: error: stray '\302' in program
conex.cpp:3:1: error: stray '\240' in program
conex.cpp:5:1: error: stray '\302' in program
 ifstream fin("conex.in");

 ^
conex.cpp:5:1: error: stray '\240' in program
conex.cpp:6:1: error: stray '\302' in program
 ofstream fout("conex.out");

 ^
conex.cpp:6:1: error: stray '\240' in program
conex.cpp:8:1: error: stray '\302' in program
 int n , a[105][105];

 ^
conex.cpp:8:1: error: stray '\240' in program
conex.cpp:8:1: error: stray '\302' in program
conex.cpp:8:1: error: stray '\240' in program
conex.cpp:8:1: error: stray '\302' in program
conex.cpp:8:1: error: stray '\240' in program
conex.cpp:9:1: error: stray '\302' in program
 int x[105], v[105]; 

 ^
conex.cpp:9:1: error: stray '\240' in program
conex.cpp:9:1: error: stray '\302' in program
conex.cpp:9:1: error: stray '\240' in program
conex.cpp:9:1: error: stray '\302' in program
conex.cpp:9:1: error: stray '\240' in program
conex.cpp:12:1: error: stray '\302' in program
 int conex()

 ^
conex.cpp:12:1: error: stray '\240' in program
conex.cpp:14:1: error: stray '\302' in program
 int st, dr;

 ^
conex.cpp:14:1: error: stray '\240' in program
conex.cpp:14:1: error: stray '\302' in program
conex.cpp:14:1: error: stray '\240' in program
conex.cpp:15:1: error: stray '\302' in program
 st = dr = 1;

 ^
conex.cpp:15:1: error: stray '\240' in program
conex.cpp:15:1: error: stray '\302' in program
conex.cpp:15:1: error: stray '\240' in program
conex.cpp:15:1: error: stray '\302' in program
conex.cpp:15:1: error: stray '\240' in program
conex.cpp:15:1: error: stray '\302' in program
conex.cpp:15:1: error: stray '\240' in program
conex.cpp:16:1: error: stray '\302' in program
 v[1] = 1;

 ^
conex.cpp:16:1: error: stray '\240' in program
conex.cpp:16:1: error: stray '\302' in program
conex.cpp:16:1: error: stray '\240' in program
conex.cpp:17:1: error: stray '\302' in program
 x[1] = 1;

 ^
conex.cpp:17:1: error: stray '\240' in program
conex.cpp:17:1: error: stray '\302' in program
conex.cpp:17:1: error: stray '\240' in program
conex.cpp:18:1: error: stray '\302' in program
 while(st <= dr)

 ^
conex.cpp:18:1: error: stray '\240' in program
conex.cpp:18:1: error: stray '\302' in program
conex.cpp:18:1: error: stray '\240' in program
conex.cpp:20:1: error: stray '\302' in program
 int k = x[st];

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

 ^
conex.cpp:21:1: error: stray '\240' in program
conex.cpp:21:1: error: stray '\302' in program
conex.cpp:21:1: error: stray '\240' in program
conex.cpp:21:1: error: stray '\302' in program
conex.cpp:21:1: error: stray '\240' in program
conex.cpp:21:1: error: stray '\302' in program
conex.cpp:21:1: error: stray '\240' in program
conex.cpp:21:1: error: stray '\302' in program
conex.cpp:21:1: error: stray '\240' in program
conex.cpp:21:1: error: stray '\302' in program
conex.cpp:21:1: error: stray '\240' in program
conex.cpp:21:1: error: stray '\302' in program
conex.cpp:21:1: error: stray '\240' in program
conex.cpp:21:1: error: stray '\302' in program
conex.cpp:21:1: error: stray '\240' in program
conex.cpp:22:1: error: stray '\302' in program
 if(v[i] == 0 && a[k][i] == 1)

 ^
conex.cpp:22:1: error: stray '\240' in program
conex.cpp:22:1: error: stray '\302' in program
conex.cpp:22:1: error: stray '\240' in program
conex.cpp:22:1: error: stray '\302' in program
conex.cpp:22:1: error: stray '\240' in program
conex.cpp:22:1: error: stray '\302' in program
conex.cpp:22:1: error: stray '\240' in program
conex.cpp:22:1: error: stray '\302' in program
conex.cpp:22:1: error: stray '\240' in program
conex.cpp:22:1: error: stray '\302' in program
conex.cpp:22:1: error: stray '\240' in program
conex.cpp:24:1: error: stray '\302' in program
 dr ++;

 ^
conex.cpp:24:1: error: stray '\240' in program
conex.cpp:25:1: error: stray '\302' in program
 v[i] = 1;

 ^
conex.cpp:25:1: error: stray '\240' in program
conex.cpp:25:1: error: stray '\302' in program
conex.cpp:25:1: error: stray '\240' in program
conex.cpp:26:1: error: stray '\302' in program
 x[dr] = i;

 ^
conex.cpp:26:1: error: stray '\240' in program
conex.cpp:26:1: error: stray '\302' in program
conex.cpp:26:1: error: stray '\240' in program
conex.cpp:28:1: error: stray '\302' in program
 st ++;

 ^
conex.cpp:28:1: error: stray '\240' in program
conex.cpp:30:1: error: stray '\302' in program
 for(int i = 1 ; i <= n ; ++i)

 ^
conex.cpp:30:1: error: stray '\240' in program
conex.cpp:30:1: error: stray '\302' in program
conex.cpp:30:1: error: stray '\240' in program
conex.cpp:30:1: error: stray '\302' in program
conex.cpp:30:1: error: stray '\240' in program
conex.cpp:30:1: error: stray '\302' in program
conex.cpp:30:1: error: stray '\240' in program
conex.cpp:30:1: error: stray '\302' in program
conex.cpp:30:1: error: stray '\240' in program
conex.cpp:30:1: error: stray '\302' in program
conex.cpp:30:1: error: stray '\240' in program
conex.cpp:30:1: error: stray '\302' in program
conex.cpp:30:1: error: stray '\240' in program
conex.cpp:30:1: error: stray '\302' in program
conex.cpp:30:1: error: stray '\240' in program
conex.cpp:30:1: error: stray '\302' in program
conex.cpp:30:1: error: stray '\240' in program
conex.cpp:31:1: error: stray '\302' in program
 if(v[i] == 0)

 ^
conex.cpp:31:1: error: stray '\240' in program
conex.cpp:31:1: error: stray '\302' in program
conex.cpp:31:1: error: stray '\240' in program
conex.cpp:32:1: error: stray '\302' in program
 return 0;

 ^
conex.cpp:32:1: error: stray '\240' in program
conex.cpp:33:1: error: stray '\302' in program
 return 1;

 ^
conex.cpp:33:1: error: stray '\240' in program
conex.cpp:36:1: error: stray '\302' in program
 int main()

 ^
conex.cpp:36:1: error: stray '\240' in program
conex.cpp:38:1: error: stray '\302' in program
     int i , j;

 ^
conex.cpp:38:1: error: stray '\240' in program
conex.cpp:38:1: error: stray '\302' in program
conex.cpp:38:1: error: stray '\240' in program
conex.cpp:38:1: error: stray '\302' in program
conex.cpp:38:1: error: stray '\240' in program
conex.cpp:38:1: error: stray '\302' in program
conex.cpp:38:1: error: stray '\240' in program
conex.cpp:38:1: error: stray '\302' in program
conex.cpp:38:1: error: stray '\240' in program
conex.cpp:38:1: error: stray '\302' in program
conex.cpp:38:1: error: stray '\240' in program
conex.cpp:38:1: error: stray '\302' in program
conex.cpp:38:1: error: stray '\240' in program
conex.cpp:39:1: error: stray '\302' in program
     fin >> n;

 ^
conex.cpp:39:1: error: stray '\240' in program
conex.cpp:39:1: error: stray '\302' in program
conex.cpp:39:1: error: stray '\240' in program
conex.cpp:39:1: error: stray '\302' in program
conex.cpp:39:1: error: stray '\240' in program
conex.cpp:39:1: error: stray '\302' in program
conex.cpp:39:1: error: stray '\240' in program
conex.cpp:39:1: error: stray '\302' in program
conex.cpp:39:1: error: stray '\240' in program
conex.cpp:39:1: error: stray '\302' in program
conex.cpp:39:1: error: stray '\240' in program
conex.cpp:40:1: error: stray '\302' in program
     while(fin >> i >> j)

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

 ^
conex.cpp:41:1: error: stray '\240' in program
conex.cpp:41:1: error: stray '\302' in program
conex.cpp:41:1: error: stray '\240' in program
conex.cpp:41:1: error: stray '\302' in program
conex.cpp:41:1: error: stray '\240' in program
conex.cpp:41:1: error: stray '\302' in program
conex.cpp:41:1: error: stray '\240' in program
conex.cpp:42:1: error: stray '\302' in program
      a[i][j] = a[j][i] = 1;

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

 ^
conex.cpp:43:1: error: stray '\240' in program
conex.cpp:43:1: error: stray '\302' in program
conex.cpp:43:1: error: stray '\240' in program
conex.cpp:43:1: error: stray '\302' in program
conex.cpp:43:1: error: stray '\240' in program
conex.cpp:43:1: error: stray '\302' in program
conex.cpp:43:1: error: stray '\240' in program
conex.cpp:45:1: error: stray '\302' in program
     if(conex())

 ^
conex.cpp:45:1: error: stray '\240' in program
conex.cpp:45:1: error: stray '\302' in program
conex.cpp:45:1: error: stray '\240' in program
conex.cpp:45:1: error: stray '\302' in program
conex.cpp:45:1: error: stray '\240' in program
conex.cpp:45:1: error: stray '\302' in program
conex.cpp:45:1: error: stray '\240' in program
conex.cpp:46:1: error: stray '\302' in program
 fout <<"DA";

 ^
conex.cpp:46:1: error: stray '\240' in program
conex.cpp:48:1: error: stray '\302' in program
 fout << "NU";

 ^
conex.cpp:48:1: error: stray '\240' in program
conex.cpp:48:1: error: stray '\302' in program
conex.cpp:48:1: error: stray '\240' in program
conex.cpp:50:1: error: stray '\302' in program
     return 0;

 ^
conex.cpp:50:1: error: stray '\240' in program
conex.cpp:50:1: error: stray '\302' in program
conex.cpp:50:1: error: stray '\240' in program
conex.cpp:50:1: error: stray '\302' in program
conex.cpp:50:1: error: stray '\240' in program
conex.cpp:50:1: error: stray '\302' in program
conex.cpp:50:1: error: stray '\240' in program
conex.cpp:50:1: error: stray '\302' in program
conex.cpp:50:1: error: stray '\240' in program
conex.cpp:5:1: error: 'ifstream' does not name a type
 ifstream fin("conex.in");

 ^
conex.cpp:6:1: error: 'ofstream' does not name a type
 ofstream fout("conex.out");

 ^
conex.cpp: In function 'int main()':
conex.cpp:39:9: error: 'fin' was not declared in this scope
     fin >> n;

         ^
conex.cpp:46:1: error: 'fout' was not declared in this scope
 fout <<"DA";

 ^
conex.cpp:48:1: error: 'fout' was not declared in this scope
 fout << "NU";

 ^

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 Conex 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ă.