#785
ElimMinMax
Se dă o matrice cu n
linii şi m
coloane şi elemente numere naturale distincte două câte două. Să se elimine din matrice linia și coloana pe care se află elementul maxim și linia și coloana pe care se află elementul minim.
Problema | ElimMinMax | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58518225 | Utilizator | |
Fișier | elimminmax.cpp | Dimensiune | 1.15 KB |
Data încărcării | 13 Iunie 2025, 12:00 | Scor / rezultat | Eroare de compilare |
elimminmax.cpp:4:63: error: 'long long int j1' redeclared as different kind of symbol long long n,i,j,m,a[101][101],minn=INT_MAX,maxx=INT_MIN,i1,i2,j1,j2; ^ 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 elimminmax.cpp:1: /usr/include/i386-linux-gnu/bits/mathcalls.h:238:1: error: previous declaration of 'double j1(double)' __MATHCALL (j1,, (_Mdouble_)); ^ elimminmax.cpp: In function 'int main()': elimminmax.cpp:16:57: error: assignment of function 'double j1(double)' if(a[i][j]<minn) {minn=a[i][j]; i1=i; j1=j;} ^ elimminmax.cpp:16:57: error: cannot convert 'long long int' to 'double(double)throw ()' in assignment elimminmax.cpp:22:11: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(j1>j2) ^ elimminmax.cpp:23:19: error: no matching function for call to 'swap(double (&)(double)throw (), long long int&)' swap(j1,j2); ^ elimminmax.cpp:23:19: note: candidates are: In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0, from /usr/include/c++/4.8/bits/stl_algobase.h:64, 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 elimminmax.cpp:1: /usr/include/c++/4.8/bits/move.h:166:5: note: template<class _Tp> void std::swap(_Tp&, _Tp&) swap(_Tp& __a, _Tp& __b) ^ /usr/include/c++/4.8/bits/move.h:166:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: deduced conflicting types for parameter '_Tp' ('double(double)throw ()' and 'long long int') swap(j1,j2); ^ In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0, from /usr/include/c++/4.8/bits/stl_algobase.h:64, 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 elimminmax.cpp:1: /usr/include/c++/4.8/bits/move.h:185:5: note: template<class _Tp, unsigned int _Nm> void std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm]) swap(_Tp (&__a)[_Nm], _Tp (&__b)[_Nm]) ^ /usr/include/c++/4.8/bits/move.h:185:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types '_Tp [_Nm]' and 'double(double)throw ()' swap(j1,j2); ^ 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 elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_pair.h:254:5: note: template<class _T1, class _T2> void std::swap(std::pair<_T1, _T2>&, std::pair<_T1, _T2>&) swap(pair<_T1, _T2>& __x, pair<_T1, _T2>& __y) ^ /usr/include/c++/4.8/bits/stl_pair.h:254:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::pair<_T1, _T2>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/string:52:0, 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/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 elimminmax.cpp:1: /usr/include/c++/4.8/bits/basic_string.h:2717:5: note: template<class _CharT, class _Traits, class _Alloc> void std::swap(std::basic_string<_CharT, _Traits, _Alloc>&, std::basic_string<_CharT, _Traits, _Alloc>&) swap(basic_string<_CharT, _Traits, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/basic_string.h:2717:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::basic_string<_CharT, _Traits, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/vector:64:0, from /usr/include/c++/4.8/bits/random.h:34, from /usr/include/c++/4.8/random:50, from /usr/include/c++/4.8/bits/stl_algo.h:65, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_vector.h:1452:5: note: template<class _Tp, class _Alloc> void std::swap(std::vector<_Tp, _Alloc>&, std::vector<_Tp, _Alloc>&) swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y) ^ /usr/include/c++/4.8/bits/stl_vector.h:1452:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::vector<_Tp, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/vector:65:0, from /usr/include/c++/4.8/bits/random.h:34, from /usr/include/c++/4.8/random:50, from /usr/include/c++/4.8/bits/stl_algo.h:65, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_bvector.h:112:3: note: void std::swap(std::_Bit_reference, std::_Bit_reference) swap(_Bit_reference __x, _Bit_reference __y) noexcept ^ /usr/include/c++/4.8/bits/stl_bvector.h:112:3: note: no known conversion for argument 1 from 'double(double)throw ()' to 'std::_Bit_reference' /usr/include/c++/4.8/bits/stl_bvector.h:120:3: note: void std::swap(std::_Bit_reference, bool&) swap(_Bit_reference __x, bool& __y) noexcept ^ /usr/include/c++/4.8/bits/stl_bvector.h:120:3: note: no known conversion for argument 1 from 'double(double)throw ()' to 'std::_Bit_reference' /usr/include/c++/4.8/bits/stl_bvector.h:128:3: note: void std::swap(bool&, std::_Bit_reference) swap(bool& __x, _Bit_reference __y) noexcept ^ /usr/include/c++/4.8/bits/stl_bvector.h:128:3: note: no known conversion for argument 1 from 'double(double)throw ()' to 'bool&' In file included from /usr/include/c++/4.8/tuple:39:0, from /usr/include/c++/4.8/functional:55, from /usr/include/c++/4.8/bits/stl_algo.h:66, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from elimminmax.cpp:1: /usr/include/c++/4.8/array:262:5: note: template<class _Tp, unsigned int _Nm> void std::swap(std::array<_Tp, _Nm>&, std::array<_Tp, _Nm>&) swap(array<_Tp, _Nm>& __one, array<_Tp, _Nm>& __two) ^ /usr/include/c++/4.8/array:262:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::array<_Tp, _Nm>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/functional:55:0, from /usr/include/c++/4.8/bits/stl_algo.h:66, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from elimminmax.cpp:1: /usr/include/c++/4.8/tuple:1050:5: note: template<class ... _Elements> void std::swap(std::tuple<_Elements ...>&, std::tuple<_Elements ...>&) swap(tuple<_Elements...>& __x, tuple<_Elements...>& __y) ^ /usr/include/c++/4.8/tuple:1050:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::tuple<_Elements ...>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/bits/stl_algo.h:66:0, from /usr/include/c++/4.8/algorithm:62, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:64, from elimminmax.cpp:1: /usr/include/c++/4.8/functional:2573:5: note: template<class _Res, class ... _Args> void std::swap(std::function<_Res(_ArgTypes ...)>&, std::function<_Res(_ArgTypes ...)>&) swap(function<_Res(_Args...)>& __x, function<_Res(_Args...)>& __y) ^ /usr/include/c++/4.8/functional:2573:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::function<_Res(_ArgTypes ...)>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/deque:64:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:67, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_deque.h:2011:5: note: template<class _Tp, class _Alloc> void std::swap(std::deque<_Tp, _Alloc>&, std::deque<_Tp, _Alloc>&) swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) ^ /usr/include/c++/4.8/bits/stl_deque.h:2011:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::deque<_Tp, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/list:63:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:78, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_list.h:1662:5: note: template<class _Tp, class _Alloc> void std::swap(std::list<_Tp, _Alloc>&, std::list<_Tp, _Alloc>&) swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y) ^ /usr/include/c++/4.8/bits/stl_list.h:1662:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::list<_Tp, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/map:60:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:80, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_tree.h:955:5: note: template<class _Key, class _Val, class _KeyOfValue, class _Compare, class _Alloc> void std::swap(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&, std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>&) swap(_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/stl_tree.h:955:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/map:61:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:80, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_map.h:1014:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> void std::swap(std::map<_Key, _Tp, _Compare, _Alloc>&, std::map<_Key, _Tp, _Compare, _Alloc>&) swap(map<_Key, _Tp, _Compare, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/stl_map.h:1014:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::map<_Key, _Tp, _Compare, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/map:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:80, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_multimap.h:916:5: note: template<class _Key, class _Tp, class _Compare, class _Alloc> void std::swap(std::multimap<_Key, _Tp, _Compare, _Alloc>&, std::multimap<_Key, _Tp, _Compare, _Alloc>&) swap(multimap<_Key, _Tp, _Compare, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/stl_multimap.h:916:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::multimap<_Key, _Tp, _Compare, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/memory:81:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:81, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/unique_ptr.h:482:5: note: template<class _Tp, class _Dp> void std::swap(std::unique_ptr<_Tp, _Dp>&, std::unique_ptr<_Tp, _Dp>&) swap(unique_ptr<_Tp, _Dp>& __x, ^ /usr/include/c++/4.8/bits/unique_ptr.h:482:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::unique_ptr<_Tp, _Dp>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/bits/shared_ptr.h:52:0, from /usr/include/c++/4.8/memory:82, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:81, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/shared_ptr_base.h:1145:5: note: template<class _Tp, __gnu_cxx::_Lock_policy _Lp> void std::swap(std::__shared_ptr<_Tp, _Lp>&, std::__shared_ptr<_Tp, _Lp>&) swap(__shared_ptr<_Tp, _Lp>& __a, __shared_ptr<_Tp, _Lp>& __b) noexcept ^ /usr/include/c++/4.8/bits/shared_ptr_base.h:1145:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::__shared_ptr<_Tp, _Lp>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/bits/shared_ptr.h:52:0, from /usr/include/c++/4.8/memory:82, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:81, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/shared_ptr_base.h:1321:5: note: template<class _Tp, __gnu_cxx::_Lock_policy _Lp> void std::swap(std::__weak_ptr<_Tp, _Lp>&, std::__weak_ptr<_Tp, _Lp>&) swap(__weak_ptr<_Tp, _Lp>& __a, __weak_ptr<_Tp, _Lp>& __b) noexcept ^ /usr/include/c++/4.8/bits/shared_ptr_base.h:1321:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::__weak_ptr<_Tp, _Lp>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/memory:82:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:81, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/shared_ptr.h:431:5: note: template<class _Tp> void std::swap(std::shared_ptr<_Tp1>&, std::shared_ptr<_Tp1>&) swap(shared_ptr<_Tp>& __a, shared_ptr<_Tp>& __b) noexcept ^ /usr/include/c++/4.8/bits/shared_ptr.h:431:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::shared_ptr<_Tp1>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/memory:82:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:81, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/shared_ptr.h:517:5: note: template<class _Tp> void std::swap(std::weak_ptr<_Tp>&, std::weak_ptr<_Tp>&) swap(weak_ptr<_Tp>& __a, weak_ptr<_Tp>& __b) noexcept ^ /usr/include/c++/4.8/bits/shared_ptr.h:517:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::weak_ptr<_Tp>' and 'double(double)throw ()' swap(j1,j2); ^ 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 elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_queue.h:316:5: note: template<class _Tp, class _Seq> void std::swap(std::queue<_Tp, _Seq>&, std::queue<_Tp, _Seq>&) swap(queue<_Tp, _Seq>& __x, queue<_Tp, _Seq>& __y) ^ /usr/include/c++/4.8/bits/stl_queue.h:316:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::queue<_Tp, _Seq>' and 'double(double)throw ()' swap(j1,j2); ^ 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 elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_queue.h:555:5: note: template<class _Tp, class _Sequence, class _Compare> void std::swap(std::priority_queue<_Tp, _Sequence, _Compare>&, std::priority_queue<_Tp, _Sequence, _Compare>&) swap(priority_queue<_Tp, _Sequence, _Compare>& __x, ^ /usr/include/c++/4.8/bits/stl_queue.h:555:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::priority_queue<_Tp, _Sequence, _Compare>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/set:61:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:86, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_set.h:806:5: note: template<class _Key, class _Compare, class _Alloc> void std::swap(std::set<_Key, _Compare, _Alloc>&, std::set<_Key, _Compare, _Alloc>&) swap(set<_Key, _Compare, _Alloc>& __x, set<_Key, _Compare, _Alloc>& __y) ^ /usr/include/c++/4.8/bits/stl_set.h:806:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::set<_Key, _Compare, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/set:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:86, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_multiset.h:791:5: note: template<class _Key, class _Compare, class _Alloc> void std::swap(std::multiset<_Key, _Compare, _Alloc>&, std::multiset<_Key, _Compare, _Alloc>&) swap(multiset<_Key, _Compare, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/stl_multiset.h:791:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::multiset<_Key, _Compare, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/stack:61:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:88, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/stl_stack.h:291:5: note: template<class _Tp, class _Seq> void std::swap(std::stack<_Tp, _Seq>&, std::stack<_Tp, _Seq>&) swap(stack<_Tp, _Seq>& __x, stack<_Tp, _Seq>& __y) ^ /usr/include/c++/4.8/bits/stl_stack.h:291:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::stack<_Tp, _Seq>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/condition_variable:39:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:101, from elimminmax.cpp:1: /usr/include/c++/4.8/mutex:607:5: note: template<class _Mutex> void std::swap(std::unique_lock<_Mutex>&, std::unique_lock<_Mutex>&) swap(unique_lock<_Mutex>& __x, unique_lock<_Mutex>& __y) noexcept ^ /usr/include/c++/4.8/mutex:607:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::unique_lock<_Mutex>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/forward_list:38:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:102, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/forward_list.h:1395:5: note: template<class _Tp, class _Alloc> void std::swap(std::forward_list<_Tp, _Alloc>&, std::forward_list<_Tp, _Alloc>&) swap(forward_list<_Tp, _Alloc>& __lx, ^ /usr/include/c++/4.8/bits/forward_list.h:1395:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::forward_list<_Tp, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/future:40:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:103, from elimminmax.cpp:1: /usr/include/c++/4.8/thread:200:3: note: void std::swap(std::thread&, std::thread&) swap(thread& __x, thread& __y) noexcept ^ /usr/include/c++/4.8/thread:200:3: note: no known conversion for argument 1 from 'double(double)throw ()' to 'std::thread&' In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:103:0, from elimminmax.cpp:1: /usr/include/c++/4.8/future:1011:5: note: template<class _Res> void std::swap(std::promise<_Res>&, std::promise<_Res>&) swap(promise<_Res>& __x, promise<_Res>& __y) noexcept ^ /usr/include/c++/4.8/future:1011:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::promise<_Res>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:103:0, from elimminmax.cpp:1: /usr/include/c++/4.8/future:1437:5: note: template<class _Res, class ... _ArgTypes> void std::swap(std::packaged_task<_Res(_ArgTypes ...)>&, std::packaged_task<_Res(_ArgTypes ...)>&) swap(packaged_task<_Res(_ArgTypes...)>& __x, ^ /usr/include/c++/4.8/future:1437:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::packaged_task<_Res(_ArgTypes ...)>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/regex:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:108, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/regex.h:722:5: note: template<class _Ch_type, class _Rx_traits> void std::swap(std::basic_regex<_Ch_type, _Rx_traits>&, std::basic_regex<_Ch_type, _Rx_traits>&) swap(basic_regex<_Ch_type, _Rx_traits>& __lhs, ^ /usr/include/c++/4.8/bits/regex.h:722:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::basic_regex<_Ch_type, _Rx_traits>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/regex:62:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:108, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/regex.h:1848:5: note: template<class _Bi_iter, class _Alloc> void std::swap(std::match_results<_FwdIterT, _Alloc>&, std::match_results<_FwdIterT, _Alloc>&) swap(match_results<_Bi_iter, _Alloc>& __lhs, ^ /usr/include/c++/4.8/bits/regex.h:1848:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::match_results<_FwdIterT, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/unordered_map:48:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:115, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/unordered_map.h:1376:5: note: template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> void std::swap(std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&, std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>&) swap(unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/unordered_map.h:1376:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/unordered_map:48:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:115, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/unordered_map.h:1382:5: note: template<class _Key, class _Tp, class _Hash, class _Pred, class _Alloc> void std::swap(std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&, std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>&) swap(unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/unordered_map.h:1382:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/unordered_set:48:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:116, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/unordered_set.h:1259:5: note: template<class _Value, class _Hash, class _Pred, class _Alloc> void std::swap(std::unordered_set<_Value, _Hash, _Pred, _Alloc>&, std::unordered_set<_Value, _Hash, _Pred, _Alloc>&) swap(unordered_set<_Value, _Hash, _Pred, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/unordered_set.h:1259:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ In file included from /usr/include/c++/4.8/unordered_set:48:0, from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:116, from elimminmax.cpp:1: /usr/include/c++/4.8/bits/unordered_set.h:1265:5: note: template<class _Value, class _Hash, class _Pred, class _Alloc> void std::swap(std::unordered_multiset<_Value, _Hash, _Pred, _Alloc>&, std::unordered_multiset<_Value, _Hash, _Pred, _Alloc>&) swap(unordered_multiset<_Value, _Hash, _Pred, _Alloc>& __x, ^ /usr/include/c++/4.8/bits/unordered_set.h:1265:5: note: template argument deduction/substitution failed: elimminmax.cpp:23:19: note: mismatched types 'std::unordered_multiset<_Value, _Hash, _Pred, _Alloc>' and 'double(double)throw ()' swap(j1,j2); ^ elimminmax.cpp:41:12: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(j1!=j2) ^ elimminmax.cpp:43:18: error: invalid conversion from 'double (*)(double)throw ()' to 'long long int' [-fpermissive] for(j=j1;j<m;j++) ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema ElimMinMax 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ă.