#4411
veri
Se dă un graf orientat cu n
noduri și m
muchii. Fiecare muchie are costul 1
(poate fi parcursă într-un minut). Doi “prieteni” (veri) pornesc din nodul S
. Unul dintre ei vrea să ajungă în nodul A
, iar celălalt vrea să ajungă în nodul B
. Care este numărul minim de minute necesar, astfel încât să fie posibil ca amândoi să ajungă la destinațiile lor, în timpul alocat, în A
, respectiv B
?
OJI 2023, clasele XI-XII
Problema | veri | Operații I/O |
veri.in /veri.out
|
---|---|---|---|
Limita timp | 1.6 secunde | Limita memorie |
Total: 256 MB
/
Stivă 256 MB
|
Id soluție | #52382394 | Utilizator | |
Fișier | veri.cpp | Dimensiune | 2.49 KB |
Data încărcării | 28 Septembrie 2024, 12:58 | Scor / rezultat | Eroare de compilare |
veri.cpp: In function 'std::vector<int> path1(int, int, std::vector<std::vector<int> >&)': veri.cpp:18:26: error: 'ranges' has not been declared if(i != f && ranges::count(cur,i) != 0) continue; ^ veri.cpp: In function 'std::vector<int> path(int, int, std::vector<std::vector<int> >&)': veri.cpp:34:26: error: 'ranges' has not been declared if(i != f && ranges::count(cur,i) != 0) continue; ^ veri.cpp: In function 'void printv(std::vector<int>)': veri.cpp:44:5: error: reference to 'cout' is ambiguous cout<<a.size() - 1<<endl; ^ veri.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("veri.out"); ^ In file included from veri.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ veri.cpp:46:9: error: reference to 'cout' is ambiguous cout<<i<<" "; ^ veri.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("veri.out"); ^ In file included from veri.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ veri.cpp:48:5: error: reference to 'cout' is ambiguous cout<<endl; ^ veri.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("veri.out"); ^ In file included from veri.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^ veri.cpp: In function 'int main()': veri.cpp:53:5: error: reference to 'cin' is ambiguous cin>>c>>n>>m; ^ veri.cpp:8:10: note: candidates are: std::ifstream cin ifstream cin("veri.in"); ^ In file included from veri.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ veri.cpp:54:5: error: reference to 'cin' is ambiguous cin>>s>>a>>b; ^ veri.cpp:8:10: note: candidates are: std::ifstream cin ifstream cin("veri.in"); ^ In file included from veri.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ veri.cpp:55:44: error: missing template arguments before '(' token vector<vector<int>> nodes(n + 1, vector(0,0)); ^ veri.cpp:58:10: error: reference to 'cin' is ambiguous cin>>cur>>cur1; ^ veri.cpp:8:10: note: candidates are: std::ifstream cin ifstream cin("veri.in"); ^ In file included from veri.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: std::istream std::cin extern istream cin; /// Linked to standard input ^ veri.cpp:73:68: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if(cur1.size() + cur2.size() + cur3.size() + cur4.size() < minSize) { ^ veri.cpp:81:32: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i = 1; i < d2.size(); i++) { ^ veri.cpp:90:5: error: reference to 'cout' is ambiguous cout << d1.size() + max(d3.size(), d4.size()) - 2; ^ veri.cpp:9:10: note: candidates are: std::ofstream cout ofstream cout("veri.out"); ^ In file included from veri.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: std::ostream std::cout extern ostream cout; /// Linked to standard output ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema veri 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ă.