Problem | sellingpotatoes |
---|---|
User | Haocheng |
Submission Time | 2024-11-19 15:08:29 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
sellingpotatoes.cpp: In function ‘int main()’:
sellingpotatoes.cpp:16:9: error: ‘costs’ was not declared in this scope
16 | costs[i] = abs(A[i] - totalsoldsort;
| ^~~~~
sellingpotatoes.cpp:16:31: error: ‘totalsoldsort’ was not declared in this scope; did you mean ‘totalsold’?
16 | costs[i] = abs(A[i] - totalsoldsort;
| ^~~~~~~~~~~~~
| totalsold
sellingpotatoes.cpp:20:10: error: expected unqualified-id before numeric constant
20 | for(int 1=0;i<N;i++){
| ^
sellingpotatoes.cpp:20:10: error: expected ‘;’ before numeric constant
sellingpotatoes.cpp:20:12: error: lvalue required as left operand of assignment
20 | for(int 1=0;i<N;i++){
| ^
sellingpotatoes.cpp:20:14: error: ‘i’ was not declared in this scope
20 | for(int 1=0;i<N;i++){
| ^
sellingpotatoes.cpp:20:1