foo.cc:5:14: error: reference to 'max' is ambiguous
5 | vector<int>a[max];
| ^~~
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algo.h:3468:5: note: candidates are: 'template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3468 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algo.h:3462:5: note: 'template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)'
3462 | max(initializer_list<_Tp> __l)
| ^~~
In file included from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algobase.h:268:5: note: 'template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
268 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: 'template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)'
222 | max(const _Tp& __a, const _Tp& __b)
| ^~~
foo.cc:3:11: note: 'const int max'
3 | const int max = 100052;
| ^~~
foo.cc: In function 'bool ok(int)':
foo.cc:9:8: error: 'a' was not declared in this scope
9 | if(a[x].size()==0)return 0;
| ^
foo.cc:12:19: error: 'a' was not declared in this scope
12 | for(int i=1;i<a[x].size();i++){
| ^
foo.cc:13:14: error: reference to 'max' is ambiguous
13 | now= max(0, now -(a[x][i]-a[x][i-1]-1) );
| ^~~
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algo.h:3468:5: note: candidates are: 'template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3468 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algo.h:3462:5: note: 'template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)'
3462 | max(initializer_list<_Tp> __l)
| ^~~
In file included from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algobase.h:268:5: note: 'template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
268 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: 'template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)'
222 | max(const _Tp& __a, const _Tp& __b)
| ^~~
foo.cc:3:11: note: 'const int max'
3 | const int max = 100052;
| ^~~
foo.cc:18:10: error: reference to 'max' is ambiguous
18 | now= max(0, now -(t-a[x][a[x].size()-1]));
| ^~~
In file included from /usr/include/c++/9/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algo.h:3468:5: note: candidates are: 'template<class _Tp, class _Compare> _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3468 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algo.h:3462:5: note: 'template<class _Tp> _Tp std::max(std::initializer_list<_Tp>)'
3462 | max(initializer_list<_Tp> __l)
| ^~~
In file included from /usr/include/c++/9/bits/char_traits.h:39,
from /usr/include/c++/9/ios:40,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,
from /usr/include/c++/9/complex:45,
from /usr/include/c++/9/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:54,
from foo.cc:1:
/usr/include/c++/9/bits/stl_algobase.h:268:5: note: 'template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
268 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/9/bits/stl_algobase.h:222:5: note: 'template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)'
222 | max(const _Tp& __a, const _Tp& __b)
| ^~~
foo.cc:3:11: note: 'const int max'
3 | const int max = 100052;
| ^~~
foo.cc:18:25: error: 'a' was not declared in this scope
18 | now= max(0, now -(t-a[x][a[x].size()-1]));
| ^
foo.cc: In function 'int main()':
foo.cc:28:9: error: 'a' was not declared in this scope
28 | a[id].push_back(ts);
| ^
foo.cc:23:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
23 | scanf("%d%d%d",&n,&m,&t);
| ~~~~~^~~~~~~~~~~~~~~~~~~
foo.cc:27:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
27 | scanf("%d%d",&ts,&id);
| ~~~~~^~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务