#3283
Se dă o matrice cu n linii și m coloane. Pentru k poziții date, se cere să se determine drumul de lungime minimă care pleacă de la poziția i1 și j1 și trece prin toate cele k poziții (nu contează în ce ordine), ajungând în final în poziția i2 si j2.
| Problema | Lee1 | Operații I/O |
lee1.in/lee1.out
|
|---|---|---|---|
| Limita timp | 0.5 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64217739 | Utilizator | |
| Fișier | lee1.cpp | Dimensiune | 4.22 KB |
| Data încărcării | 23 Aprilie 2026, 13:16 | Scor/rezultat | Eroare de compilare |
In file included from /usr/include/c++/13/bits/stl_algobase.h:71, from /usr/include/c++/13/algorithm:60, from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51, from lee1.cpp:1: /usr/include/c++/13/bits/predefined_ops.h: In instantiation of ‘bool __gnu_cxx::__ops::_Iter_less_iter::operator()(_Iterator1, _Iterator2) const [with _Iterator1 = const Point*; _Iterator2 = const Point*]’: /usr/include/c++/13/bits/stl_algobase.h:1303:14: required from ‘bool std::__lexicographical_compare_impl(_II1, _II1, _II2, _II2, _Compare) [with _II1 = const Point*; _II2 = const Point*; _Compare = __gnu_cxx::__ops::_Iter_less_iter]’ /usr/include/c++/13/bits/stl_algobase.h:1320:46: required from ‘static bool std::__lexicographical_compare<_BoolType>::__lc(_II1, _II1, _II2, _II2) [with _II1 = const Point*; _II2 = const Point*; bool _BoolType = false]’ /usr/include/c++/13/bits/stl_algobase.h:1391:60: required from ‘bool std::__lexicographical_compare_aux1(_II1, _II1, _II2, _II2) [with _II1 = const Point*; _II2 = const Point*]’ /usr/include/c++/13/bits/stl_algobase.h:1425:49: required from ‘bool std::__lexicographical_compare_aux(_II1, _II1, _II2, _II2) [with _II1 = __gnu_cxx::__normal_iterator<const Point*, vector<Point> >; _II2 = __gnu_cxx::__normal_iterator<const Point*, vector<Point> >]’ /usr/include/c++/13/bits/stl_algobase.h:1748:48: required from ‘bool std::lexicographical_compare(_II1, _II1, _II2, _II2) [with _II1 = __gnu_cxx::__normal_iterator<const Point*, vector<Point> >; _II2 = __gnu_cxx::__normal_iterator<const Point*, vector<Point> >]’ /usr/include/c++/13/bits/stl_vector.h:2080:42: required from ‘bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&) [with _Tp = Point; _Alloc = allocator<Point>]’ lee1.cpp:144:67: required from here /usr/include/c++/13/bits/predefined_ops.h:45:23: error: no match for ‘operator<’ (operand types are ‘const Point’ and ‘const Point’) 45 | { return *__it1 < *__it2; } | ~~~~~~~^~~~~~~~ In file included from /usr/include/c++/13/bits/stl_algobase.h:67: /usr/include/c++/13/bits/stl_iterator.h:1250:5: note: candidate: ‘template<class _IteratorL, class _IteratorR, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_IteratorL, _Container>&, const __normal_iterator<_IteratorR, _Container>&)’ 1250 | operator<(const __normal_iterator<_IteratorL, _Container>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1250:5: note: template argument deduction/substitution failed: /usr/include/c++/13/bits/predefined_ops.h:45:23: note: ‘const Point’ is not derived from ‘const __gnu_cxx::__normal_iterator<_IteratorL, _Container>’ 45 | { return *__it1 < *__it2; } | ~~~~~~~^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1258:5: note: candidate: ‘template<class _Iterator, class _Container> bool __gnu_cxx::operator<(const __normal_iterator<_Iterator, _Container>&, const __normal_iterator<_Iterator, _Container>&)’ 1258 | operator<(const __normal_iterator<_Iterator, _Container>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1258:5: note: template argument deduction/substitution failed: /usr/include/c++/13/bits/predefined_ops.h:45:23: note: ‘const Point’ is not derived from ‘const __gnu_cxx::__normal_iterator<_Iterator, _Container>’ 45 | { return *__it1 < *__it2; } | ~~~~~~~^~~~~~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Lee1 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ă.