编号 | 题目 | 状态 | 分数 | 总时间 | 内存 | 代码 / 答案文件 | 提交者 | 提交时间 |
---|---|---|---|---|---|---|---|---|
#2366 | #1004. 提瓦特大冒险 | Compile Error | 0 | 0 ms | 0 K | C++ 17 / 856 B | xhlm | 2023-11-17 11:56:09 |
using namespace std;
const int max = 500001;
int a, x, y;
bool dp;
int
编译信息
/sandbox/1/a.cpp:5:7: error: reference to 'max' is ambiguous
5 | int a[max], x[max], y[max];
| ^~~
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:65,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:41,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/sandbox/1/a.cpp:4:11: note: 'const int max'
4 | const int max =500001;
| ^~~
/sandbox/1/a.cpp:5:15: error: reference to 'max' is ambiguous
5 | int a[max], x[max], y[max];
| ^~~
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:65,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:41,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/sandbox/1/a.cpp:4:11: note: 'const int max'
4 | const int max =500001;
| ^~~
/sandbox/1/a.cpp:5:23: error: reference to 'max' is ambiguous
5 | int a[max], x[max], y[max];
| ^~~
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:65,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:41,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/sandbox/1/a.cpp:4:11: note: 'const int max'
4 | const int max =500001;
| ^~~
/sandbox/1/a.cpp:6:9: error: reference to 'max' is ambiguous
6 | bool dp[max][max];
| ^~~
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:65,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:41,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/sandbox/1/a.cpp:4:11: note: 'const int max'
4 | const int max =500001;
| ^~~
/sandbox/1/a.cpp:6:14: error: reference to 'max' is ambiguous
6 | bool dp[max][max];
| ^~~
In file included from /usr/include/c++/10/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:65,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algo.h:3486:5: note: candidates are: 'template<class _Tp, class _Compare> constexpr _Tp std::max(std::initializer_list<_Tp>, _Compare)'
3486 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algo.h:3480:5: note: 'template<class _Tp> constexpr _Tp std::max(std::initializer_list<_Tp>)'
3480 | max(initializer_list<_Tp> __l)
| ^~~
In file included from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/x32/bits/stdc++.h:41,
from /sandbox/1/a.cpp:1:
/usr/include/c++/10/bits/stl_algobase.h:300:5: note: 'template<class _Tp, class _Compare> constexpr const _Tp& std::max(const _Tp&, const _Tp&, _Compare)'
300 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^~~
/usr/include/c++/10/bits/stl_algobase.h:254:5: note: 'template<class _Tp> constexpr const _Tp& std::max(const _Tp&, const _Tp&)'
254 | max(const _Tp& __a, const _Tp& __b)
| ^~~
/sandbox/1/a.cpp:4:11: note: 'const int max'
4 | const int max =500001;
| ^~~
/sandbox/1/a.cpp: In function 'int main()':
/sandbox/1/a.cpp:11:39: error: 'a' was not declared in this scope
11 | for(int i = 1; i < n; i++) cin >> a[i];
| ^
/sandbox/1/a.cpp:12:40: error: 'x' was not declared in this scope
12 | for(int i = 1; i <= m; i++) cin >> x[i] >> y[i];
| ^
/sandbox/1/a.cpp:12:48: error: 'y' was not declared in this scope
12 | for(int i = 1; i <= m; i++) cin >> x[i] >> y[i];
| ^
/sandbox/1/a.cpp:13:5: error: 'dp' was not declared in this scope
13 | dp[1][t] = true;
| ^~
/sandbox/1/a.cpp:15:21: error: 'a' was not declared in this scope
15 | for(int j = a[i]; j <= t; j++) {
| ^
/sandbox/1/a.cpp:19:24: error: 'x' was not declared in this scope
19 | if(x[k] == i && j + y[k] <= t) {
| ^
/sandbox/1/a.cpp:19:41: error: 'y' was not declared in this scope
19 | if(x[k] == i && j + y[k] <= t) {
| ^