#1856
Într-o ţară în care corupţia este în floare şi economia la pământ, pentru a obţine toate aprobările necesare în scopul demarării unei afaceri, investitorul trebuie să treacă prin mai multe camere ale unei clădiri în care se află birouri.
Clădirea are un singur nivel în care birourile sunt lipite unele de altele formând un caroiaj pătrat de dimensiune n•n. Pentru a facilita accesul în birouri, toate camerele vecine au uşi între ele. În fiecare birou se află un funcţionar care pretinde o taxă de trecere prin cameră (taxă ce poate fi, pentru unele camere, egală cu 0). Investitorul intră încrezător prin colţul din stânga-sus al clădirii (cum se vede de sus planul clădirii) şi doreşte să ajungă în colţul opus al clădirii, unde este ieşirea, plătind o taxă totală cât mai mică.
Ştiind că el are în buzunar S euro şi că fiecare funcţionar îi ia taxa de cum intră în birou, se cere să se determine dacă el poate primi aprobările necesare şi, în caz afirmativ, care este suma maximă de bani care îi rămâne în buzunar la ieşirea din clădire.
| Problema | Taxe2 | Operații I/O |
taxe2.in/taxe2.out
|
|---|---|---|---|
| Limita timp | 0.05 secunde | Limita memorie |
Total: 0.7 MB
/
Stivă 8 MB
|
| Id soluție | #64890286 | Utilizator | |
| Fișier | taxe2.cpp | Dimensiune | 1.53 KB |
| Data încărcării | 09 Iunie 2026, 20:47 | Scor/rezultat | Eroare de compilare |
taxe2.cpp:11:44: error: ‘ll’ was not declared in this scope 11 | vector<vector<long long>> matrix(n, vector<ll>(n)); | ^~ taxe2.cpp:11:46: error: template argument 1 is invalid 11 | vector<vector<long long>> matrix(n, vector<ll>(n)); | ^ taxe2.cpp:11:46: error: template argument 2 is invalid taxe2.cpp: In function ‘int main()’: taxe2.cpp:19:8: error: no match for ‘operator<<’ (operand types are ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} and ‘int’) 19 | fin<<S<<n; | ~~~^~~ | | | | | int | std::ifstream {aka std::basic_ifstream<char>} taxe2.cpp:19:8: note: candidate: ‘operator<<(int, int)’ (built-in) 19 | fin<<S<<n; | ~~~^~~ taxe2.cpp:19:8: note: no known conversion for argument 1 from ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} to ‘int’ In file included from /usr/include/c++/13/string:54, from /usr/include/c++/13/bits/locale_classes.h:40, from /usr/include/c++/13/bits/ios_base.h:41, from /usr/include/c++/13/ios:44, from /usr/include/c++/13/ostream:40, from /usr/include/c++/13/iostream:41, from taxe2.cpp:1: /usr/include/c++/13/bits/basic_string.h:4032:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 4032 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:4032:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 19 | fin<<S<<n; | ^ In file included from /usr/include/c++/13/bits/ios_base.h:46: /usr/include/c++/13/system_error:339:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)’ 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/13/system_error:339:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:554:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)’ 554 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/13/ostream:554:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:564:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)’ 564 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/13/ostream:564:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:570:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)’ 570 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/13/ostream:570:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:581:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)’ 581 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/13/ostream:581:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:586:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)’ 586 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/13/ostream:586:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:645:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)’ 645 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/13/ostream:645:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 19 | fin<<S<<n; | ^ In file included from /usr/include/c++/13/ostream:880: /usr/include/c++/13/bits/ostream.tcc:307:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)’ 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/13/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:662:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)’ 662 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/13/ostream:662:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:675:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)’ 675 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/13/ostream:675:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:680:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)’ 680 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/13/ostream:680:5: note: template argument deduction/substitution failed: taxe2.cpp:19:10: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 19 | fin<<S<<n; | ^ /usr/include/c++/13/ostream:801:5: note: candidate: ‘template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)’ 801 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/13/ostream:801:5: note: template argument deduction/substitution failed: /usr/include/c++/13/ostream: In substitution of ‘template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ifstream<char>&; _Tp = int]’: taxe2.cpp:19:10: required from here /usr/include/c++/13/ostream:801:5: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ taxe2.cpp:22:16: error: no match for ‘operator<<’ (operand types are ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} and ‘__gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type’ {aka ‘long long int’}) 22 | fin<<matrix[i][j]; taxe2.cpp:22:16: note: candidate: ‘operator<<(int, __gnu_cxx::__alloc_traits<std::allocator<long long int>, long long int>::value_type {aka long long int})’ (built-in) taxe2.cpp:22:16: note: no known conversion for argument 1 from ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} to ‘int’ /usr/include/c++/13/bits/basic_string.h:4032:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 4032 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:4032:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/system_error:339:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)’ 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/13/system_error:339:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:554:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)’ 554 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/13/ostream:554:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:564:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)’ 564 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/13/ostream:564:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:570:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)’ 570 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/13/ostream:570:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:581:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)’ 581 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/13/ostream:581:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:586:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)’ 586 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/13/ostream:586:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:645:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)’ 645 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/13/ostream:645:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/bits/ostream.tcc:307:5: note: candidate: ‘template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)’ 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/13/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<_CharT, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:662:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)’ 662 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/13/ostream:662:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:675:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)’ 675 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/13/ostream:675:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:680:5: note: candidate: ‘template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)’ 680 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/13/ostream:680:5: note: template argument deduction/substitution failed: taxe2.cpp:22:29: note: ‘std::ifstream’ {aka ‘std::basic_ifstream<char>’} is not derived from ‘std::basic_ostream<char, _Traits>’ 22 | fin<<matrix[i][j]; | ^ /usr/include/c++/13/ostream:801:5: note: candidate: ‘template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)’ 801 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/13/ostream:801:5: note: template argument deduction/substitution failed: /usr/include/c++/13/ostream: In substitution of ‘template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_ifstream<char>&; _Tp = long long int]’: taxe2.cpp:22:29: required from here /usr/include/c++/13/ostream:801:5: error: no type named ‘type’ in ‘struct std::enable_if<false, void>’ taxe2.cpp:28:5: error: ‘priority_queue’ was not declared in this scope 28 | priority_queue<pair<long long,int>, vector<pair<long long,int>>, greater<pair<long long,int>>> pq; | ^~~~~~~~~~~~~~ taxe2.cpp:4:1: note: ‘std::priority_queue’ is defined in header ‘<queue>’; did you forget to ‘#include <queue>’? 3 | #include <vector> +++ |+#include <queue> 4 | taxe2.cpp:28:39: error: expected primary-expression before ‘,’ token 28 | priority_queue<pair<long long,int>, vector<pair<long long,int>>, greater<pair<long long,int>>> pq; | ^ taxe2.cpp:28:68: error: expected primary-expression before ‘,’ token 28 | priority_queue<pair<long long,int>, vector<pair<long long,int>>, greater<pair<long long,int>>> pq; | ^ taxe2.cpp:28:98: error: expected primary-expression before ‘>’ token 28 | priority_queue<pair<long long,int>, vector<pair<long long,int>>, greater<pair<long long,int>>> pq; | ^ taxe2.cpp:28:100: error: ‘pq’ was not declared in this scope 28 | priority_queue<pair<long long,int>, vector<pair<long long,int>>, greater<pair<long long,int>>> pq; | ^~ taxe2.cpp:30:31: error: redeclaration of ‘std::vector<std::vector<long long int> > dist’ 30 | vector<vector<long long>> dist(n, vector<long long>(n, INF)); | ^~~~ taxe2.cpp:26:31: note: ‘std::vector<std::vector<long long int> > dist’ previously declared here 26 | vector<vector<long long>> dist(n, vector<long long>(n, INF)); | ^~~~ taxe2.cpp:50:19: error: no match for ‘operator<’ (operand types are ‘long long int’ and ‘__gnu_cxx::__alloc_traits<std::allocator<std::vector<long long int> >, std::vector<long long int> >::value_type’ {aka ‘std::vector<long long int>’}) 50 | if( nd< dist[ni * n + nj]){ In file included from /usr/include/c++/13/string:48: /usr/include/c++/13/bits/stl_iterator.h:455:5: note: candidate: ‘template<class _Iterator> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)’ 455 | operator<(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed: taxe2.cpp:50:37: note: mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘long long int’ 50 | if( nd< dist[ni * n + nj]){ | ^ /usr/include/c++/13/bits/stl_iterator.h:500:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator<(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)’ 500 | operator<(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed: taxe2.cpp:50:37: note: mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘long long int’ 50 | if( nd< dist[ni * n + nj]){ | ^ /usr/include/c++/13/bits/stl_iterator.h:1705:5: note: candidate: ‘template<class _IteratorL, class _IteratorR> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)’ 1705 | operator<(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1705:5: note: template argument deduction/substitution failed: taxe2.cpp:50:37: note: mismatched types ‘const std::move_iterator<_IteratorL>’ and ‘long long int’ 50 | if( nd< dist[ni * n + nj]){ | ^ /usr/include/c++/13/bits/stl_iterator.h:1770:5: note: candidate: ‘template<class _Iterator> bool std::operator<(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)’ 1770 | operator<(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/13/bits/stl_iterator.h:1770:5: note: template argument deduction/substitution failed: taxe2.cpp:50:37: note: mismatched types ‘const std::move_iterator<_IteratorL>’ and ‘long long int’ 50 | if( nd< dist[ni * n + nj]){ | ^ In file included from /usr/include/c++/13/bits/stl_algobase.h:64, from /usr/include/c++/13/string:51: /usr/include/c++/13/bits/stl_pair.h:835:5: note: candidate: ‘template<class _T1, class _T2> constexpr bool std::operator<(const pair<_T1, _T2>&, const pair<_T1, _T2>&)’ 835 | operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/13/bits/stl_pair.h:835:5: note: template argument deduction/substitution failed: taxe2.cpp:50:37: note: mismatched types ‘const std::pair<_T1, _T2>’ and ‘long long int’ 50 | if( nd< dist[ni * n + nj]){ | ^ /usr/include/c++/13/bits/basic_string.h:3829:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 3829 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3829:5: note: template argument deduction/substitution failed: taxe2.cpp:50:37: note: mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘long long int’ 50 | if( nd< dist[ni * n + nj]){ | ^ /usr/include/c++/13/bits/basic_string.h:3843:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const __cxx11::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)’ 3843 | operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3843:5: note: template argument deduction/substitution failed: taxe2.cpp:50:37: note: mismatched types ‘const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>’ and ‘long long int’ 50 | if( nd< dist[ni * n + nj]){ | ^ /usr/include/c++/13/bits/basic_string.h:3856:5: note: candidate: ‘template<class _CharT, class _Traits, class _Alloc> bool std::operator<(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Alloc>&)’ 3856 | operator<(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/13/bits/basic_string.h:3856:5: note: template argument deduction/substitution failed: taxe2.cpp:50:37: note: mismatched types ‘const _CharT*’ and ‘long long int’ 50 | if( nd< dist[ni * n + nj]){ | ^ In file included from /usr/include/c++/13/vector:66, from taxe2.cpp:3: /usr/include/c++/13/bits/stl_vector.h:2079:5: note: candidate: ‘template<class _Tp, class _Alloc> bool std::operator<(const vector<_Tp, _Alloc>&, const vector<_Tp, _Alloc>&)’ 2079 | operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) | ^~~~~~~~ /usr/include/c++/13/bits/stl_vector.h:2079:5: note: template argument deduction/substitution failed: taxe2.cpp:50:37: note: mismatched types ‘const std::vector<_Tp, _Alloc>’ and ‘long long int’ 50 | if( nd< dist[ni * n + nj]){ | ^ /usr/include/c++/13/system_error:324:3: note: candidate: ‘bool std::operator<(const error_code&, const error_code&)’ 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ^~~~~~~~ /usr/include/c++/13/system_error:324:31: note: no known conversion for argument 1 from ‘long long int’ to ‘const std::error_code&’ 324 | operator<(const error_code& __lhs, const error_code& __rhs) noexcept | ~~~~~~~~~~~~~~~~~~^~~~~ /usr/include/c++/13/system_error:507:3: note: candidate: ‘bool std::operator<(const error_condition&, const error_condition&)’ 507 | operator<(const error_condition& __lhs, | ^~~~~~~~ /usr/include/c++/13/system_error:507:36: note: no known conversion for argument 1 from ‘long long int’ to ‘const std::error_condition&’ 507 | operator<(const error_condition& __lhs, | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~ taxe2.cpp:52:28: error: expected ‘}’ before ‘;’ token 52 | pq.push({nd; ni+ nj}); | ~ ^ taxe2.cpp:52:28: error: expected ‘)’ before ‘;’ token 52 | pq.push({nd; ni+ nj}); | ~ ^ | ) taxe2.cpp:52:36: error: expected ‘;’ before ‘}’ token 52 | pq.push({nd; ni+ nj}); | ^ | ; taxe2.cpp:52:32: warning: statement has no effect [-Wunused-value] 52 | pq.push({nd; ni+ nj}); | ~~^~~~ taxe2.cpp:52:37: error: expected primary-expression before ‘)’ token 52 | pq.push({nd; ni+ nj}); | ^ taxe2.cpp: At global scope: taxe2.cpp:57:20: error: ‘dist’ was not declared in this scope 57 | long long need=dist[n*n-1]; | ^~~~ taxe2.cpp:59:5: error: expected unqualified-id before ‘if’ 59 | if(need>INF || need>S){ | ^~ taxe2.cpp:62:5: error: expected unqualified-id before ‘else’ 62 | else{ | ^~~~ taxe2.cpp:66:5: error: expected unqualified-id before ‘return’ 66 | return 0; | ^~~~~~ taxe2.cpp:67:1: error: expected declaration before ‘}’ token 67 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Taxe2 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ă.