cultivation.cpp: In function 'void add(int)':
cultivation.cpp:96:35: error: reference to 'data' is ambiguous
while (!dq[i].empty () && data[dq[i].back ()][i] <= data[pos][i])
^~~~
cultivation.cpp:81:9: note: candidates are: int data [1209][3]
int nr, data[1209][3];
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from cultivation.cpp:1:
/usr/include/c++/7/bits/range_access.h:318:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:309:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:299:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/include/c++/7/bits/range_access.h:289:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
cultivation.cpp:96:61: error: reference to 'data' is ambiguous
while (!dq[i].empty () && data[dq[i].back ()][i] <= data[pos][i])
^~~~
cultivation.cpp:81:9: note: candidates are: int data [1209][3]
int nr, data[1209][3];
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from cultivation.cpp:1:
/usr/include/c++/7/bits/range_access.h:318:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:309:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:299:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/include/c++/7/bits/range_access.h:289:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
cultivation.cpp: In function 'int getSum()':
cultivation.cpp:112:16: error: reference to 'data' is ambiguous
int minA = data[dq[0].front ()][0], minB = data[dq[1].front ()][1], minAB = data[dq[2].front ()][2];
^~~~
cultivation.cpp:81:9: note: candidates are: int data [1209][3]
int nr, data[1209][3];
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from cultivation.cpp:1:
/usr/include/c++/7/bits/range_access.h:318:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:309:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:299:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/include/c++/7/bits/range_access.h:289:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
cultivation.cpp:113:24: error: 'minB' was not declared in this scope
return max (minA + minB, minAB);
^~~~
cultivation.cpp:113:24: note: suggested alternative: 'minA'
return max (minA + minB, minAB);
^~~~
minA
cultivation.cpp:113:30: error: 'minAB' was not declared in this scope
return max (minA + minB, minAB);
^~~~~
cultivation.cpp:113:30: note: suggested alternative: 'minA'
return max (minA + minB, minAB);
^~~~~
minA
cultivation.cpp: In function 'void solve(int)':
cultivation.cpp:127:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int ii=0; ii<events.size (); ii++)
~~^~~~~~~~~~~~~~~
cultivation.cpp:130:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
while (jj < events.size () && events[jj].first == events[ii].first)
~~~^~~~~~~~~~~~~~~~
cultivation.cpp:139:9: error: reference to 'data' is ambiguous
data[nr][0] = ds::getA ();
^~~~
cultivation.cpp:81:9: note: candidates are: int data [1209][3]
int nr, data[1209][3];
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from cultivation.cpp:1:
/usr/include/c++/7/bits/range_access.h:318:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:309:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:299:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/include/c++/7/bits/range_access.h:289:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
cultivation.cpp:140:9: error: reference to 'data' is ambiguous
data[nr][1] = ds::getB ();
^~~~
cultivation.cpp:81:9: note: candidates are: int data [1209][3]
int nr, data[1209][3];
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from cultivation.cpp:1:
/usr/include/c++/7/bits/range_access.h:318:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:309:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:299:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/include/c++/7/bits/range_access.h:289:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
cultivation.cpp:141:9: error: reference to 'data' is ambiguous
data[nr][2] = ds::maxDif () - 1;
^~~~
cultivation.cpp:81:9: note: candidates are: int data [1209][3]
int nr, data[1209][3];
^~~~
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from cultivation.cpp:1:
/usr/include/c++/7/bits/range_access.h:318:5: note: template<class _Tp> constexpr const _Tp* std::data(std::initializer_list<_Tp>)
data(initializer_list<_Tp> __il) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:309:5: note: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::data(_Tp (&)[_Nm])
data(_Tp (&__array)[_Nm]) noexcept
^~~~
/usr/include/c++/7/bits/range_access.h:299:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(const _Container&)
data(const _Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
/usr/include/c++/7/bits/range_access.h:289:5: note: template<class _Container> constexpr decltype (__cont.data()) std::data(_Container&)
data(_Container& __cont) noexcept(noexcept(__cont.data()))
^~~~
cultivation.cpp: In function 'int main()':
cultivation.cpp:171:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d\n", &R, &C);
~~~~~~^~~~~~~~~~~~~~~~~~~
cultivation.cpp:172:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d", &N);
~~~~~~^~~~~~~~~~
cultivation.cpp:174:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf ("%d %d", &x[i], &y[i]);
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~