Detalii evaluare #54186973

Rezumat problemă

#2902 Pavaj

Curtea bunicului are forma unei matrice cu n linii și m coloane și este pavată cu n*m dale, o parte dintre acestea fiind deteriorate. Bunicul a realizat un plan al curții în care a marcat cu 0 dalele deteriorate și cu 1 pe cele nedeteriorate.

Bunicul a primit k oferte pentru a vinde zone dreptunghiulare ale curții. Fiecare zonă este determinată de coordonatele l1 c1 l2 c2 a două colțuri opuse ale ei. Pentru fiecare zonă bunicul dorește să afle dacă conține doar dale nedeteriorate, doar dale deteriorate sau conține și dale deteriorate și dale nedeteriorate.

Detalii

Problema Pavaj Operații I/O pavaj.in/pavaj.out
Limita timp 0.3 secunde Limita memorie Total: 4 MB / Stivă 4 MB
Id soluție #54186973 Utilizator Miron Armand (armand09)
Fișier pavaj.cpp Dimensiune 953 B
Data încărcării 21 Noiembrie 2024, 16:45 Scor / rezultat Eroare de compilare

Evaluare


Mesaj compilare

pavaj.cpp:7:30: error: 'short unsigned int y1' redeclared as different kind of symbol
 unsigned short int n,m,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 pavaj.cpp:1:
/usr/include/i386-linux-gnu/bits/mathcalls.h:241:1: error: previous declaration of 'double y1(double)'
 __MATHCALL (y1,, (_Mdouble_));
 ^
pavaj.cpp: In function 'int main()':
pavaj.cpp:28:12: 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/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 pavaj.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)
     ^
pavaj.cpp:31:15: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
         if(y1>y2)

               ^
pavaj.cpp:32:23: error: no matching function for call to 'swap(double (&)(double)throw (), short unsigned int&)'
             swap(y1,y2);

                       ^
pavaj.cpp:32:23: 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 pavaj.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:
pavaj.cpp:32:23: note:   deduced conflicting types for parameter '_Tp' ('double(double)throw ()' and 'short unsigned int')
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types '_Tp [_Nm]' and 'double(double)throw ()'
             swap(y1,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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::pair<_T1, _T2>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::basic_string<_CharT, _Traits, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::vector<_Tp, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::array<_Tp, _Nm>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::tuple<_Elements ...>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::function<_Res(_ArgTypes ...)>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::deque<_Tp, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::list<_Tp, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::map<_Key, _Tp, _Compare, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::multimap<_Key, _Tp, _Compare, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::unique_ptr<_Tp, _Dp>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::__shared_ptr<_Tp, _Lp>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::__weak_ptr<_Tp, _Lp>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::shared_ptr<_Tp1>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::weak_ptr<_Tp>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::queue<_Tp, _Seq>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::priority_queue<_Tp, _Sequence, _Compare>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::set<_Key, _Compare, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::multiset<_Key, _Compare, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::stack<_Tp, _Seq>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::unique_lock<_Mutex>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::forward_list<_Tp, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::promise<_Res>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/stdc++.h:103:0,
                 from pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::packaged_task<_Res(_ArgTypes ...)>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::basic_regex<_Ch_type, _Rx_traits>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::match_results<_FwdIterT, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::unordered_map<_Key, _Tp, _Hash, _Pred, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::unordered_multimap<_Key, _Tp, _Hash, _Pred, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::unordered_set<_Value, _Hash, _Pred, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
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 pavaj.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:
pavaj.cpp:32:23: note:   mismatched types 'std::unordered_multiset<_Value, _Hash, _Pred, _Alloc>' and 'double(double)throw ()'
             swap(y1,y2);

                       ^
pavaj.cpp:33:51: warning: pointer to a function used in arithmetic [-Wpointer-arith]
         ans = (a[x2][y2] - a[x1-1][y2] - a[x2][y1-1] + a[x1-1][y1-1]);

                                                   ^
pavaj.cpp:33:52: error: invalid types 'int [1001][double (*)(double)throw ()]' for array subscript
         ans = (a[x2][y2] - a[x1-1][y2] - a[x2][y1-1] + a[x1-1][y1-1]);

                                                    ^
pavaj.cpp:33:67: warning: pointer to a function used in arithmetic [-Wpointer-arith]
         ans = (a[x2][y2] - a[x1-1][y2] - a[x2][y1-1] + a[x1-1][y1-1]);

                                                                   ^
pavaj.cpp:33:68: error: invalid types 'int [1001][double (*)(double)throw ()]' for array subscript
         ans = (a[x2][y2] - a[x1-1][y2] - a[x2][y1-1] + a[x1-1][y1-1]);

                                                                    ^
pavaj.cpp:36:38: error: invalid operands of types 'short unsigned int' and 'double(double)throw ()' to binary 'operator-'
         else if(ans == (x2-x1+1)*(y2-y1+1))

                                      ^

Cum funcționează evaluarea?

www.pbinfo.ro permite evaluarea a două tipuri de probleme:

  • probleme la care rezolvarea presupune scrierea unui program complet
  • probleme la care rezolvarea presupune scrierea unei secvențe de program - câteva instrucțiuni, o listă de declarații, una sau mai multe funcții, etc.

Problema Pavaj face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:

  • Programul sursă este compilat folosind compilatorul corespunzător. Dacă în urma compilării se obțin erori sau avertismente, acestea sunt afișate în această pagină.
  • Dacă programul a fost compilat, executabilul obținut va fi rulat, furnizându-i-se unul sau mai multe seturi de date de intrare, în concordanță cu restricțiile specifice problemei. Pentru fiecare set de date se obține un anumit punctaj, în raport cu corectitudinea soluției tale.

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ă.