#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 | #49196439 | Utilizator | |
Fișier | veri.cpp | Dimensiune | 2.92 KB |
Data încărcării | 19 Februarie 2024, 19:02 | Scor / rezultat | Eroare de compilare |
veri.cpp: In function 'int main()': veri.cpp:119:38: error: no match for call to '(std::function<void(int*, int)>) (ll [5001], ll&)' outputRoad(dtat[s],dtat[s][z]); ^ In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from veri.cpp:1: /usr/include/c++/4.8/functional:2174:11: note: candidate is: class function<_Res(_ArgTypes...)> ^ /usr/include/c++/4.8/functional:2466:5: note: _Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {int*, int}] function<_Res(_ArgTypes...)>:: ^ /usr/include/c++/4.8/functional:2466:5: note: no known conversion for argument 1 from 'll [5001] {aka long long int [5001]}' to 'int*' veri.cpp:120:36: error: no match for call to '(std::function<void(int*, int)>) (ll [5001], ll&)' outputRoad(dtat[z],ciclu[z]); ^ In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from veri.cpp:1: /usr/include/c++/4.8/functional:2174:11: note: candidate is: class function<_Res(_ArgTypes...)> ^ /usr/include/c++/4.8/functional:2466:5: note: _Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {int*, int}] function<_Res(_ArgTypes...)>:: ^ /usr/include/c++/4.8/functional:2466:5: note: no known conversion for argument 1 from 'll [5001] {aka long long int [5001]}' to 'int*' veri.cpp:123:29: error: no match for call to '(std::function<void(int*, int)>) (ll [5001], ll&)' outputRoad(dtat[z],a); ^ In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from veri.cpp:1: /usr/include/c++/4.8/functional:2174:11: note: candidate is: class function<_Res(_ArgTypes...)> ^ /usr/include/c++/4.8/functional:2466:5: note: _Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {int*, int}] function<_Res(_ArgTypes...)>:: ^ /usr/include/c++/4.8/functional:2466:5: note: no known conversion for argument 1 from 'll [5001] {aka long long int [5001]}' to 'int*' veri.cpp:126:29: error: no match for call to '(std::function<void(int*, int)>) (ll [5001], ll&)' outputRoad(dtat[z],b); ^ In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from veri.cpp:1: /usr/include/c++/4.8/functional:2174:11: note: candidate is: class function<_Res(_ArgTypes...)> ^ /usr/include/c++/4.8/functional:2466:5: note: _Res std::function<_Res(_ArgTypes ...)>::operator()(_ArgTypes ...) const [with _Res = void; _ArgTypes = {int*, int}] function<_Res(_ArgTypes...)>:: ^ /usr/include/c++/4.8/functional:2466:5: note: no known conversion for argument 1 from 'll [5001] {aka long long int [5001]}' to 'int*'
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ă.