#474
Se dă lista muchiilor unui graf neorientat cu n
vârfuri și o succesiune de k
vârfuri. Să se verifice dacă vârfurile din succesiune formează un lanț.
Problema | VerifLant | Operații I/O |
![]() veriflant.in /veriflant.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #57539855 | Utilizator | |
Fișier | veriflant.cpp | Dimensiune | 1.49 KB |
Data încărcării | 03 Aprilie 2025, 19:44 | Scor / rezultat | Eroare de compilare |
veriflant.cpp:45:1: error: stray '\310' in program Lanț maxim (pbinfo, #479) ^ veriflant.cpp:45:1: error: stray '\233' in program veriflant.cpp:45:22: error: stray '#' in program Lanț maxim (pbinfo, #479) ^ veriflant.cpp:46:1: error: stray '\304' in program Se dă lista muchiilor unui graf neorienta#include <fstream> ^ veriflant.cpp:46:1: error: stray '\203' in program veriflant.cpp:46:43: error: stray '#' in program Se dă lista muchiilor unui graf neorienta#include <fstream> ^ veriflant.cpp:90:1: error: stray '\310' in program Lanț maxim (pbinfo, #479) ^ veriflant.cpp:90:1: error: stray '\233' in program veriflant.cpp:90:22: error: stray '#' in program Lanț maxim (pbinfo, #479) ^ veriflant.cpp:91:1: error: stray '\304' in program Se dă lista muchiilor unui graf neorienta ^ veriflant.cpp:91:1: error: stray '\203' in program veriflant.cpp:2:13: error: unable to find numeric literal operator 'operator"" a' #define DIM 101a ^ veriflant.cpp:4:7: note: in expansion of macro 'DIM' int a[DIM][DIM], v[DIM], f[DIM]; ^ veriflant.cpp:2:13: error: unable to find numeric literal operator 'operator"" a' #define DIM 101a ^ veriflant.cpp:4:12: note: in expansion of macro 'DIM' int a[DIM][DIM], v[DIM], f[DIM]; ^ veriflant.cpp:2:13: error: unable to find numeric literal operator 'operator"" a' #define DIM 101a ^ veriflant.cpp:4:20: note: in expansion of macro 'DIM' int a[DIM][DIM], v[DIM], f[DIM]; ^ veriflant.cpp:2:13: error: unable to find numeric literal operator 'operator"" a' #define DIM 101a ^ veriflant.cpp:4:28: note: in expansion of macro 'DIM' int a[DIM][DIM], v[DIM], f[DIM]; ^ veriflant.cpp: In function 'int main()': veriflant.cpp:12:1: error: 'a' was not declared in this scope a[x][y] = a[y][x] = 1; ^ veriflant.cpp:18:6: error: 'v' was not declared in this scope fin>>v[i]; ^ veriflant.cpp:21:6: error: 'a' was not declared in this scope if ( a[ v[i-1] ][ v[i] ] == 0) { ^ veriflant.cpp:21:9: error: 'v' was not declared in this scope if ( a[ v[i-1] ][ v[i] ] == 0) { ^ veriflant.cpp:30:1: error: 'f' was not declared in this scope f[i] = 0; ^ veriflant.cpp:33:1: error: 'f' was not declared in this scope f[ v[i] ]++; ^ veriflant.cpp:33:4: error: 'v' was not declared in this scope f[ v[i] ]++; ^ veriflant.cpp: At global scope: veriflant.cpp:45:1: error: 'Lan' does not name a type Lanț maxim (pbinfo, #479) ^ veriflant.cpp:47:13: error: unable to find numeric literal operator 'operator"" a' #define DIM 101a ^ veriflant.cpp:49:7: note: in expansion of macro 'DIM' int a[DIM][DIM], v[DIM], f[DIM]; ^ veriflant.cpp:47:13: error: unable to find numeric literal operator 'operator"" a' #define DIM 101a ^ veriflant.cpp:49:12: note: in expansion of macro 'DIM' int a[DIM][DIM], v[DIM], f[DIM]; ^ veriflant.cpp:47:13: error: unable to find numeric literal operator 'operator"" a' #define DIM 101a ^ veriflant.cpp:49:20: note: in expansion of macro 'DIM' int a[DIM][DIM], v[DIM], f[DIM]; ^ veriflant.cpp:47:13: error: unable to find numeric literal operator 'operator"" a' #define DIM 101a ^ veriflant.cpp:49:28: note: in expansion of macro 'DIM' int a[DIM][DIM], v[DIM], f[DIM]; ^ veriflant.cpp:50:5: error: redefinition of 'int n' int n, m, x, y, i, j, k, t; ^ veriflant.cpp:5:5: error: 'int n' previously declared here int n, m, x, y, i, j, k, t; ^ veriflant.cpp:50:8: error: redefinition of 'int m' int n, m, x, y, i, j, k, t; ^ veriflant.cpp:5:8: error: 'int m' previously declared here int n, m, x, y, i, j, k, t; ^ veriflant.cpp:50:11: error: redefinition of 'int x' int n, m, x, y, i, j, k, t; ^ veriflant.cpp:5:11: error: 'int x' previously declared here int n, m, x, y, i, j, k, t; ^ veriflant.cpp:50:14: error: redefinition of 'int y' int n, m, x, y, i, j, k, t; ^ veriflant.cpp:5:14: error: 'int y' previously declared here int n, m, x, y, i, j, k, t; ^ veriflant.cpp:50:17: error: redefinition of 'int i' int n, m, x, y, i, j, k, t; ^ veriflant.cpp:5:17: error: 'int i' previously declared here int n, m, x, y, i, j, k, t; ^ veriflant.cpp:50:20: error: redefinition of 'int j' int n, m, x, y, i, j, k, t; ^ veriflant.cpp:5:20: error: 'int j' previously declared here int n, m, x, y, i, j, k, t; ^ veriflant.cpp:50:23: error: redefinition of 'int k' int n, m, x, y, i, j, k, t; ^ veriflant.cpp:5:23: error: 'int k' previously declared here int n, m, x, y, i, j, k, t; ^ veriflant.cpp:50:26: error: redefinition of 'int t' int n, m, x, y, i, j, k, t; ^ veriflant.cpp:5:26: error: 'int t' previously declared here int n, m, x, y, i, j, k, t; ^ veriflant.cpp:51:14: error: redefinition of 'std::ifstream fin' ifstream fin ("veriflant.in"); ^ veriflant.cpp:6:10: error: 'std::ifstream fin' previously declared here ifstream fin ("veriflant.in"); ^ veriflant.cpp:52:14: error: redefinition of 'std::ofstream fout' ofstream fout("veriflant.out"); ^ veriflant.cpp:7:10: error: 'std::ofstream fout' previously declared here ofstream fout("veriflant.out"); ^ veriflant.cpp: In function 'int main()': veriflant.cpp:53:5: error: redefinition of 'int main()' int main () { ^ veriflant.cpp:8:5: error: 'int main()' previously defined here int main () { ^ veriflant.cpp:57:1: error: 'a' was not declared in this scope a[x][y] = a[y][x] = 1; ^ veriflant.cpp:63:6: error: 'v' was not declared in this scope fin>>v[i]; ^ veriflant.cpp:66:6: error: 'a' was not declared in this scope if ( a[ v[i-1] ][ v[i] ] == 0) { ^ veriflant.cpp:66:9: error: 'v' was not declared in this scope if ( a[ v[i-1] ][ v[i] ] == 0) { ^ veriflant.cpp:75:1: error: 'f' was not declared in this scope f[i] = 0; ^ veriflant.cpp:78:1: error: 'f' was not declared in this scope f[ v[i] ]++; ^ veriflant.cpp:78:4: error: 'v' was not declared in this scope f[ v[i] ]++; ^ veriflant.cpp: At global scope: veriflant.cpp:90:1: error: 'Lan' does not name a type Lanț maxim (pbinfo, #479) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema VerifLant face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
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ă.