#1622
Elicoptere
Arhipelagul Zopopan este format din n
insule de formă triunghiulară numerotate de la 1
la n
. Fiecare insulă este localizată prin coordonatele carteziene ale vârfurilor.
Administrația dorește să cumpere elicoptere pentru a realiza transportul între insule. Un elicopter va putea să asigure o rută între două insule pe distanța minimă obținută pe orizontală sau verticală (paralel cu axele de coordonate). În plus, datorită capacității rezervorului o astfel de rută nu poate să depășească o valoare k
– număr natural. Elicopterele parcurg rutele în ambele sensuri.
Investiția trebuie să îndeplinească următoarele condiții:
Să se scrie un program care pentru n
, k
şi coordonatele vârfurilor insulelor cunoscute, determină:
OJI 2016, Clasele XI-XII
Problema | Elicoptere | Operații I/O |
elicoptere.in /elicoptere.out
|
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 4 MB
/
Stivă 4 MB
|
Id soluție | #53944974 | Utilizator | |
Fișier | elicoptere.cpp | Dimensiune | 3.26 KB |
Data încărcării | 15 Noiembrie 2024, 13:16 | Scor / rezultat | Eroare de compilare |
elicoptere.cpp: In function 'double distX(punct, punct, punct)': elicoptere.cpp:37:39: error: call of overloaded 'abs(double)' is ambiguous double dist = 1.0*abs(xp - 1.0*p.x); ^ elicoptere.cpp:37:39: note: candidates are: In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/ext/string_conversions.h:41, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/stdlib.h:775:12: note: int abs(int) extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^ In file included from /usr/include/c++/4.8/ext/string_conversions.h:41:0, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/cstdlib:174:3: note: long long int std::abs(long long int) abs(long long __x) { return __builtin_llabs (__x); } ^ /usr/include/c++/4.8/cstdlib:166:3: note: long int std::abs(long int) abs(long __i) { return __builtin_labs(__i); } ^ elicoptere.cpp: In function 'double distY(punct, punct, punct)': elicoptere.cpp:52:39: error: call of overloaded 'abs(double)' is ambiguous double dist = 1.0*abs(yp - 1.0*p.y); ^ elicoptere.cpp:52:39: note: candidates are: In file included from /usr/include/c++/4.8/cstdlib:72:0, from /usr/include/c++/4.8/ext/string_conversions.h:41, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/stdlib.h:775:12: note: int abs(int) extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur; ^ In file included from /usr/include/c++/4.8/ext/string_conversions.h:41:0, from /usr/include/c++/4.8/bits/basic_string.h:2815, from /usr/include/c++/4.8/string:52, from /usr/include/c++/4.8/bits/locale_classes.h:40, from /usr/include/c++/4.8/bits/ios_base.h:41, from /usr/include/c++/4.8/ios:42, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/cstdlib:174:3: note: long long int std::abs(long long int) abs(long long __x) { return __builtin_llabs (__x); } ^ /usr/include/c++/4.8/cstdlib:166:3: note: long int std::abs(long int) abs(long __i) { return __builtin_labs(__i); } ^ elicoptere.cpp: In function 'double calcDist(int, int)': elicoptere.cpp:61:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distX(trg[i].A, trg[j].A, trg[j].B)); ^ elicoptere.cpp:61:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:61:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].A, trg[j].A, trg[j].B)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:61:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].A, trg[j].A, trg[j].B)); ^ elicoptere.cpp:62:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distX(trg[i].A, trg[j].B, trg[j].C)); ^ elicoptere.cpp:62:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:62:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].A, trg[j].B, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:62:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].A, trg[j].B, trg[j].C)); ^ elicoptere.cpp:63:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distX(trg[i].A, trg[j].A, trg[j].C)); ^ elicoptere.cpp:63:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:63:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].A, trg[j].A, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:63:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].A, trg[j].A, trg[j].C)); ^ elicoptere.cpp:65:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distX(trg[i].B, trg[j].A, trg[j].B)); ^ elicoptere.cpp:65:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:65:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].B, trg[j].A, trg[j].B)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:65:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].B, trg[j].A, trg[j].B)); ^ elicoptere.cpp:66:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distX(trg[i].B, trg[j].B, trg[j].C)); ^ elicoptere.cpp:66:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:66:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].B, trg[j].B, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:66:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].B, trg[j].B, trg[j].C)); ^ elicoptere.cpp:67:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distX(trg[i].B, trg[j].A, trg[j].C)); ^ elicoptere.cpp:67:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:67:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].B, trg[j].A, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:67:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].B, trg[j].A, trg[j].C)); ^ elicoptere.cpp:69:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distX(trg[i].C, trg[j].A, trg[j].B)); ^ elicoptere.cpp:69:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:69:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].C, trg[j].A, trg[j].B)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:69:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].C, trg[j].A, trg[j].B)); ^ elicoptere.cpp:70:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distX(trg[i].C, trg[j].B, trg[j].C)); ^ elicoptere.cpp:70:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:70:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].C, trg[j].B, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:70:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].C, trg[j].B, trg[j].C)); ^ elicoptere.cpp:71:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distX(trg[i].C, trg[j].A, trg[j].C)); ^ elicoptere.cpp:71:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:71:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].C, trg[j].A, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:71:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distX(trg[i].C, trg[j].A, trg[j].C)); ^ elicoptere.cpp:74:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distY(trg[i].A, trg[j].A, trg[j].B)); ^ elicoptere.cpp:74:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:74:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].A, trg[j].A, trg[j].B)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:74:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].A, trg[j].A, trg[j].B)); ^ elicoptere.cpp:75:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distY(trg[i].A, trg[j].B, trg[j].C)); ^ elicoptere.cpp:75:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:75:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].A, trg[j].B, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:75:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].A, trg[j].B, trg[j].C)); ^ elicoptere.cpp:76:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distY(trg[i].A, trg[j].A, trg[j].C)); ^ elicoptere.cpp:76:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:76:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].A, trg[j].A, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:76:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].A, trg[j].A, trg[j].C)); ^ elicoptere.cpp:78:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distY(trg[i].B, trg[j].A, trg[j].B)); ^ elicoptere.cpp:78:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:78:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].B, trg[j].A, trg[j].B)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:78:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].B, trg[j].A, trg[j].B)); ^ elicoptere.cpp:79:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distY(trg[i].B, trg[j].B, trg[j].C)); ^ elicoptere.cpp:79:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:79:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].B, trg[j].B, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:79:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].B, trg[j].B, trg[j].C)); ^ elicoptere.cpp:80:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distY(trg[i].B, trg[j].A, trg[j].C)); ^ elicoptere.cpp:80:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:80:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].B, trg[j].A, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:80:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].B, trg[j].A, trg[j].C)); ^ elicoptere.cpp:82:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distY(trg[i].C, trg[j].A, trg[j].B)); ^ elicoptere.cpp:82:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:82:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].C, trg[j].A, trg[j].B)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:82:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].C, trg[j].A, trg[j].B)); ^ elicoptere.cpp:83:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distY(trg[i].C, trg[j].B, trg[j].C)); ^ elicoptere.cpp:83:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:83:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].C, trg[j].B, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:83:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].C, trg[j].B, trg[j].C)); ^ elicoptere.cpp:84:51: error: no matching function for call to 'min(long double&, double)' d = min(d, distY(trg[i].C, trg[j].A, trg[j].C)); ^ elicoptere.cpp:84:51: note: candidates are: In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template<class _Tp> const _Tp& std::min(const _Tp&, const _Tp&) min(const _Tp& __a, const _Tp& __b) ^ /usr/include/c++/4.8/bits/stl_algobase.h:193:5: note: template argument deduction/substitution failed: elicoptere.cpp:84:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].C, trg[j].A, trg[j].C)); ^ In file included from /usr/include/c++/4.8/bits/char_traits.h:39:0, from /usr/include/c++/4.8/ios:40, from /usr/include/c++/4.8/ostream:38, from /usr/include/c++/4.8/iostream:39, from elicoptere.cpp:1: /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template<class _Tp, class _Compare> const _Tp& std::min(const _Tp&, const _Tp&, _Compare) min(const _Tp& __a, const _Tp& __b, _Compare __comp) ^ /usr/include/c++/4.8/bits/stl_algobase.h:239:5: note: template argument deduction/substitution failed: elicoptere.cpp:84:51: note: deduced conflicting types for parameter 'const _Tp' ('long double' and 'double') d = min(d, distY(trg[i].C, trg[j].A, trg[j].C)); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Elicoptere 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ă.