Problem nis
User grapecoder
Submission Time 2024-01-05 16:28:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

nis.cpp: In function ‘int main()’:
nis.cpp:43:60: error: invalid operands of types ‘int’ and ‘double’ to binary ‘operator%’
43 | if (n[i] > n[j]) memo[i] = (memo[i] + memo[j]) % (1e9 + 7);
| ~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
| | |
| int double
nis.cpp:45:31: error: invalid operands of types ‘int’ and ‘double’ to binary ‘operator%’
45 | ans = (ans + memo[i]) % (1e9 + 7);
| ~~~~~~~~~~~~~~~ ^ ~~~~~~~~~
| | |
| int double
nis.cpp:52:17: error: invalid operands of types ‘int’ and ‘double’ to binary ‘operator%’
52 | cout << ans % (1e9 + 7) << nl;
| ~~~ ^ ~~~~~~~~~
| | |
|