Problem coincombinations
User j0ashhh
Submission Time 2026-02-20 15:46:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

coincombinations.cpp: In function ‘int countWays(std::vector<int>, int)’:
coincombinations.cpp:6:8: error: found ‘:’ in nested-name-specifier, expected ‘::’
6 | for(i : arr){
| ^
| ::
coincombinations.cpp:6:6: error: ‘i’ has not been declared
6 | for(i : arr){
| ^
coincombinations.cpp:11:2: error: expected primary-expression before ‘return’
11 | return dp[v];
| ^~~~~~
coincombinations.cpp:10:3: error: expected ‘;’ before ‘return’
10 | }
| ^
| ;
11 | return dp[v];
| ~~~~~~
coincombinations.cpp:11:2: error: expected primary-expression before ‘return’
11 | return dp[v];
| ^~~~~~
coincombinations.cpp:10:3: error: expected ‘)’ before ‘return’
10 | }
| ^
| )
11 | return dp[v];
| ~~~~~~
coincombinations.cpp:6:5: note: to match this ‘(’
6 | for(i : arr){
| ^