0_0_39683008_1482.cpp:2:14: error: invalid types 'int[int]' for array subscript
2 | int dp[100010[100010]={0};
| ^
0_0_39683008_1482.cpp:2:26: error: expected ']' before ';' token
2 | int dp[100010[100010]={0};
| ^
| ]
0_0_39683008_1482.cpp: In function 'int main()':
0_0_39683008_1482.cpp:25:44: error: 'dp' was not declared in this scope
25 | if(dp[i][k-c[i][j]]!=-1)
| ^~
0_0_39683008_1482.cpp:27:58: error: 'max' was not declared in this scope
27 | dp[i][k]=max(dp[i][k],dp[i][k-c[i][j]]+w[i][j]); //避免0花费买重复,当前先买0
| ^~~
0_0_39683008_1482.cpp:27:58: note: suggested alternatives:
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:61,
from .\stdc++.h:51:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:5805:5: note: 'std::max'
5805 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
In file included from gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/algorithm:63:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_algo.h:2928:29: note: 'std::ranges::max'
2928 | inline constexpr __max_fn max{};
| ^~~
0_0_39683008_1482.cpp:29:44: error: 'dp' was not declared in this scope
29 | if(dp[i-1][k-c[i][j]]!=-1)
| ^~
0_0_39683008_1482.cpp:31:58: error: 'max' was not declared in this scope
31 | dp[i][k]=max(dp[i][k],dp[i-1][k-c[i][j]]+w[i][j]);//上一层再买0也无法更新dp
| ^~~
0_0_39683008_1482.cpp:31:58: note: suggested alternatives:
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/stl_algo.h:5805:5: note: 'std::max'
5805 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
gcc-13.1.0/lib/gcc/x86_64-w64-mingw32/13.1.0/include/c++/bits/ranges_algo.h:2928:29: note: 'std::ranges::max'
2928 | inline constexpr __max_fn max{};
| ^~~
0_0_39683008_1482.cpp:36:20: error: 'dp' was not declared in this scope
36 | if(dp[b][m]!=-1)
| ^~
|