Problem shamelessad5
User WJR
Submission Time 2025-05-17 21:14:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

shamelessad5.cpp: In function ‘int main()’:
shamelessad5.cpp:16:41: error: invalid operands of types ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} and ‘double’ to binary ‘operator%’
16 | dp[i] = (dp[i] + dp[j]) % (1e9 + 7);
| ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
| | |
| | double
| __gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type {aka int}
shamelessad5.cpp:21:22: error: invalid operands of types ‘__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type’ {aka ‘int’} and ‘double’ to binary ‘operator%’
21 | cnt += dp[i] % (1e9 + 7);