#1913
mr
Rică se joacă în fiecare seară The MazeRunnerVladVersion, joc pe care îl vom numi pentru simplitatea problemei MR. Jocul constă în găsirea unei căi de scăpare dintr-un labirint care conține:
p1(x1, y1)
și p2(x2, y2)
se face într-un minut, dacă se doreşte acest lucru;Rică pleacă din colțul stânga-sus al labirintului și doreşte să ajungă în colțul dreapta-jos.
El știe că are o teză în ziua următoare, așa că vă cere ajutorul vouă, programatorilor, și vă roagă să aflați timpul minim în care poate să ajungă din colțul stânga-sus în colțul dreapta-jos al labirintului.
Problema | mr | Operații I/O |
mr.in /mr.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #54960310 | Utilizator | |
Fișier | mr.cpp | Dimensiune | 1.52 KB |
Data încărcării | 13 Decembrie 2024, 17:10 | Scor / rezultat | Eroare de compilare |
mr.cpp:13:43: error: 'int y1' redeclared as different kind of symbol int x,n,m,v[101][101],b[101][101],t,x1,x2,y1,y2; ^ In file included from /usr/include/features.h:374:0, from /usr/include/assert.h:35, from /usr/include/c++/4.8/cassert:43, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:33, from mr.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:241:1: error: previous declaration of 'double y1(double)' __MATHCALL (y1,, (_Mdouble_)); ^ mr.cpp: In function 'int main()': mr.cpp:70:10: error: cannot bind 'std::basic_istream<char>::__istream_type {aka std::basic_istream<char>}' lvalue to 'std::basic_istream<char>&&' f>>x1>>y1>>x2>>y2; ^ In file included from /usr/include/c++/4.8/sstream:38:0, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from mr.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) ^ mr.cpp:71:19: error: invalid user-defined conversion from '<brace-enclosed initializer list>' to 'std::map<std::pair<int, int>, std::pair<int, int> >::key_type&& {aka std::pair<int, int>&&}' [-fpermissive] tp[{x1,y1}] = {x2,y2}; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from mr.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:112:26: note: candidate is: constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 = int; _T2 = int] <near match> _GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b) ^ /usr/include/c++/4.8/bits/stl_pair.h:112:26: note: no known conversion for argument 2 from 'double(double)throw ()' to 'const int&' mr.cpp:71:19: error: invalid conversion from 'double (*)(double)throw ()' to 'const int&' [-fpermissive] tp[{x1,y1}] = {x2,y2}; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from mr.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:112:26: error: initializing argument 2 of 'constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 = int; _T2 = int]' [-fpermissive] _GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b) ^ mr.cpp:71:19: error: conversion to non-const reference type 'std::map<std::pair<int, int>, std::pair<int, int> >::key_type&& {aka struct std::pair<int, int>&&}' from rvalue of type 'std::pair<int, int>' [-fpermissive] tp[{x1,y1}] = {x2,y2}; ^ mr.cpp:72:21: error: invalid user-defined conversion from '<brace-enclosed initializer list>' to 'std::pair<int, int>&&' [-fpermissive] tp[{x2,y2}] = {x1,y1}; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from mr.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:112:26: note: candidate is: constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 = int; _T2 = int] <near match> _GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b) ^ /usr/include/c++/4.8/bits/stl_pair.h:112:26: note: no known conversion for argument 2 from 'double(double)throw ()' to 'const int&' mr.cpp:72:21: error: invalid conversion from 'double (*)(double)throw ()' to 'const int&' [-fpermissive] tp[{x2,y2}] = {x1,y1}; ^ In file included from /usr/include/c++/4.8/bits/stl_algobase.h:64:0, from /usr/include/c++/4.8/bits/char_traits.h:39, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/istream:38, from /usr/include/c++/4.8/sstream:38, from /usr/include/c++/4.8/complex:45, from /usr/include/c++/4.8/ccomplex:38, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:52, from mr.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:112:26: error: initializing argument 2 of 'constexpr std::pair<_T1, _T2>::pair(const _T1&, const _T2&) [with _T1 = int; _T2 = int]' [-fpermissive] _GLIBCXX_CONSTEXPR pair(const _T1& __a, const _T2& __b) ^ mr.cpp:72:21: error: conversion to non-const reference type 'struct std::pair<int, int>&&' from rvalue of type 'std::pair<int, int>' [-fpermissive] tp[{x2,y2}] = {x1,y1}; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema mr 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ă.