#478
Ciclu
Se dă lista muchiilor unui graf neorientat cu n
vârfuri și un vârf p
. Să se determine un ciclu elementar care conține vârful p
.
Problema | Ciclu | Operații I/O |
ciclu.in /ciclu.out
|
---|---|---|---|
Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53952518 | Utilizator | |
Fișier | ciclu.cpp | Dimensiune | 1.26 KB |
Data încărcării | 15 Noiembrie 2024, 17:28 | Scor / rezultat | Eroare de compilare |
ciclu.cpp:1:2: error: invalid preprocessing directive #inlcude #inlcude <bits/stdc++.h> ^ ciclu.cpp:3:1: error: 'ifstream' does not name a type ifstream fin("ciclu.in"); ^ ciclu.cpp:4:1: error: 'ofstream' does not name a type ofstream fout("ciclu.out"); ^ ciclu.cpp:10:2: error: 'unordered_map' does not name a type unordered_map<int, bool>used; ^ ciclu.cpp:11:2: error: 'vector' does not name a type vector<int>lant; ^ ciclu.cpp:23:15: error: 'vector' has not been declared void afisare(vector<int>v) ^ ciclu.cpp:23:21: error: expected ',' or '...' before '<' token void afisare(vector<int>v) ^ ciclu.cpp:29:20: error: 'unordered_map' has not been declared void backtracking(unordered_map<int, bool>& used, vector<int>& lant, bool &ok) ^ ciclu.cpp:29:33: error: expected ',' or '...' before '<' token void backtracking(unordered_map<int, bool>& used, vector<int>& lant, bool &ok) ^ ciclu.cpp: In member function 'void<anonymous class>::citire()': ciclu.cpp:14:3: error: 'fin' was not declared in this scope fin >> n >> m; ^ ciclu.cpp: In member function 'void<anonymous class>::afisare(int)': ciclu.cpp:25:18: error: 'v' was not declared in this scope for (auto it : v) ^ ciclu.cpp:26:4: error: 'fout' was not declared in this scope fout << it << ' ' ; ^ ciclu.cpp:27:3: error: 'fout' was not declared in this scope fout << '\n'; ^ ciclu.cpp: In member function 'void<anonymous class>::backtracking(int)': ciclu.cpp:31:7: error: 'lant' was not declared in this scope if (lant.back() == p) ^ ciclu.cpp:34:4: error: 'ok' was not declared in this scope ok = true; ^ ciclu.cpp:39:8: error: 'used' was not declared in this scope if (used[i] == false && graph[lant.back()][i]) ^ ciclu.cpp:39:34: error: 'lant' was not declared in this scope if (used[i] == false && graph[lant.back()][i]) ^ ciclu.cpp:43:29: error: 'ok' was not declared in this scope backtracking(used, lant,ok); ^ ciclu.cpp:47:8: error: 'ok' was not declared in this scope if (ok) ^ ciclu.cpp: In member function 'void<anonymous class>::second_element()': ciclu.cpp:58:5: error: 'lant' was not declared in this scope lant.push_back(i); ^ ciclu.cpp:59:5: error: 'used' was not declared in this scope used[i] = 1; ^ ciclu.cpp: In member function 'void<anonymous class>::problema()': ciclu.cpp:72:3: error: 'lant' was not declared in this scope lant.push_back(p); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Ciclu 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ă.