#474
VerifLant
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 | #16012771 | Utilizator | |
Fișier | veriflant.cpp | Dimensiune | 660 B |
Data încărcării | 28 Mai 2019, 09:51 | Scor / rezultat | Eroare de compilare |
veriflant.cpp:4:15: warning: missing terminating " character [enabled by default] ofstream fout("veriflant.out); ^ veriflant.cpp:4:1: error: missing terminating " character ofstream fout("veriflant.out); ^ veriflant.cpp:5:8: error: 'm' has not been declared int n, m, i, j, a[101][101], ok, ok1, k, x[201]; ^ veriflant.cpp:5:11: error: 'i' has not been declared int n, m, i, j, a[101][101], ok, ok1, k, x[201]; ^ veriflant.cpp:5:14: error: 'j' has not been declared int n, m, i, j, a[101][101], ok, ok1, k, x[201]; ^ veriflant.cpp:5:17: error: 'a' has not been declared int n, m, i, j, a[101][101], ok, ok1, k, x[201]; ^ veriflant.cpp:5:30: error: 'ok' has not been declared int n, m, i, j, a[101][101], ok, ok1, k, x[201]; ^ veriflant.cpp:5:34: error: 'ok1' has not been declared int n, m, i, j, a[101][101], ok, ok1, k, x[201]; ^ veriflant.cpp:5:39: error: 'k' has not been declared int n, m, i, j, a[101][101], ok, ok1, k, x[201]; ^ veriflant.cpp:5:42: error: 'x' has not been declared int n, m, i, j, a[101][101], ok, ok1, k, x[201]; ^ veriflant.cpp:5:48: error: expected ')' before ';' token int n, m, i, j, a[101][101], ok, ok1, k, x[201]; ^ veriflant.cpp: In function 'int main()': veriflant.cpp:7:7: error: 'n' was not declared in this scope {fin>>n>>m; ^ veriflant.cpp:7:10: error: 'm' was not declared in this scope {fin>>n>>m; ^ veriflant.cpp:9:7: error: 'i' was not declared in this scope {fin>>i>>j; ^ veriflant.cpp:9:10: error: 'j' was not declared in this scope {fin>>i>>j; ^ veriflant.cpp:10:2: error: 'a' was not declared in this scope a[i][j]=a[j][i]=1; ^ veriflant.cpp:16:2: error: 'ok' was not declared in this scope ok=ok1=1; ^ veriflant.cpp:16:5: error: 'ok1' was not declared in this scope ok=ok1=1; ^ veriflant.cpp:17:6: error: 'k' was not declared in this scope fin>>k; ^ veriflant.cpp:18:6: error: 'i' was not declared in this scope for(i=1; i<=k; i++) ^ veriflant.cpp:19:8: error: 'x' was not declared in this scope {fin>>x[i]; ^ veriflant.cpp:22:5: error: 'i' was not declared in this scope for(i=1; i<k; i++) ^ veriflant.cpp:23:5: error: 'a' was not declared in this scope if(a[x[i]][x[i+1]]==0) ^ veriflant.cpp:23:7: error: 'x' was not declared in this scope if(a[x[i]][x[i+1]]==0) ^ veriflant.cpp:25:5: error: 'i' was not declared in this scope for(i=1; i<=n; i++) ^ veriflant.cpp:29:7: error: invalid operands of types 'std::ofstream(int, int, int, int, int (*)[101], int, int, int, int*) {aka std::basic_ofstream<char>(int, int, int, int, int (*)[101], int, int, int, int*)}' and 'const char [4]' to binary 'operator<<' fout<<"NU\n"; ^ veriflant.cpp:32:8: error: invalid operands of types 'std::ofstream(int, int, int, int, int (*)[101], int, int, int, int*) {aka std::basic_ofstream<char>(int, int, int, int, int (*)[101], int, int, int, int*)}' and 'const char [11]' to binary 'operator<<' fout<<"ELEMENTAR\n"; ^ veriflant.cpp:34:8: error: invalid operands of types 'std::ofstream(int, int, int, int, int (*)[101], int, int, int, int*) {aka std::basic_ofstream<char>(int, int, int, int, int (*)[101], int, int, int, int*)}' and 'const char [13]' to binary 'operator<<' fout<<"NEELEMENTAR\n"; ^
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ă.