#3346
pestelee
În arhipelagul X
, ajunge un peşte de aur. După drumul obositor parcurs de peşte, el vrea să se relaxeze într-o anumită zonă din acest arhipelag (cu coordonatele x2
, y2
). Totodată, acest peşte este curios să afle câte modalităţi sunt ca să ajungă în acea zonă.
Problema | pestelee | Operații I/O |
pestelee.in /pestelee.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54794955 | Utilizator | |
Fișier | pestelee.cpp | Dimensiune | 2.98 KB |
Data încărcării | 09 Decembrie 2024, 08:13 | Scor / rezultat | Eroare de compilare |
pestelee.cpp:17:9: error: 'int y1' redeclared as different kind of symbol int x1, y1, x2, y2; ^ In file included from /usr/include/features.h:374:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/os_defines.h:39, from /usr/include/i386-linux-gnu/c++/4.8/bits/c++config.h:426, from /usr/include/c++/4.8/iostream:38, from pestelee.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:241:1: error: previous declaration of 'double y1(double)' __MATHCALL (y1,, (_Mdouble_)); ^ pestelee.cpp: In function 'int rezolvareC1()': pestelee.cpp:26:29: error: no matching function for call to 'std::queue<std::pair<int, int> >::push(std::pair<int, double (*)(double)throw ()>)' Q.push(make_pair(x1, y1)); ^ pestelee.cpp:26:29: note: candidates are: In file included from /usr/include/c++/4.8/queue:64:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:85, from pestelee.cpp:3: /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>] push(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: no known conversion for argument 1 from 'std::pair<int, double (*)(double)throw ()>' to 'const value_type& {aka const std::pair<int, int>&}' /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>] push(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: no known conversion for argument 1 from 'std::pair<int, double (*)(double)throw ()>' to 'std::queue<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}' pestelee.cpp:27:13: error: invalid types 'int [101][double(double)throw ()]' for array subscript b[x1][y1] = 1; ^ pestelee.cpp:28:17: error: invalid types 'bool [101][double(double)throw ()]' for array subscript verif[x1][y1] = true; ^ pestelee.cpp: In function 'int rezolvareC2()': pestelee.cpp:64:29: error: no matching function for call to 'std::queue<std::pair<int, int> >::push(std::pair<int, double (*)(double)throw ()>)' Q.push(make_pair(x1, y1)); ^ pestelee.cpp:64:29: note: candidates are: In file included from /usr/include/c++/4.8/queue:64:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:85, from pestelee.cpp:3: /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: void std::queue<_Tp, _Sequence>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>] push(const value_type& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:212:7: note: no known conversion for argument 1 from 'std::pair<int, double (*)(double)throw ()>' to 'const value_type& {aka const std::pair<int, int>&}' /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: void std::queue<_Tp, _Sequence>::push(std::queue<_Tp, _Sequence>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::deque<std::pair<int, int>, std::allocator<std::pair<int, int> > >; std::queue<_Tp, _Sequence>::value_type = std::pair<int, int>] push(value_type&& __x) ^ /usr/include/c++/4.8/bits/stl_queue.h:217:7: note: no known conversion for argument 1 from 'std::pair<int, double (*)(double)throw ()>' to 'std::queue<std::pair<int, int> >::value_type&& {aka std::pair<int, int>&&}' pestelee.cpp:65:13: error: invalid types 'int [101][double(double)throw ()]' for array subscript b[x1][y1] = 1; ^ pestelee.cpp:66:17: error: invalid types 'bool [101][double(double)throw ()]' for array subscript verif[x1][y1] = true; ^ pestelee.cpp: In function 'void citire()': pestelee.cpp:110:9: error: cannot bind 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&' fin >> x1 >> y1 >> x2 >> y2; ^ In file included from /usr/include/c++/4.8/iostream:40:0, from pestelee.cpp:1: /usr/include/c++/4.8/istream:872:5: error: initializing argument 1 of 'std::basic_istream<_CharT, _Traits>& std::operator>>(std::basic_istream<_CharT, _Traits>&&, _Tp&) [with _CharT = char; _Traits = std::char_traits<char>; _Tp = double(double)throw ()]' operator>>(basic_istream<_CharT, _Traits>&& __is, _Tp& __x) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema pestelee 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ă.