Problem | paint |
---|---|
User | itsLQ |
Submission Time | 2023-06-04 10:24:25 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
paint.cpp: In function ‘int main()’:
paint.cpp:21:27: error: cannot convert ‘<brace-enclosed initializer list>’ to ‘int’ in assignment
21 | arr[i] = {inc[i], arr[i]};
| ^
paint.cpp:24:11: error: request for member ‘begin’ in ‘arr’, which is of non-class type ‘int [N]’
24 | sort(arr.begin(), arr.end());
| ^~~~~
paint.cpp:24:24: error: request for member ‘end’ in ‘arr’, which is of non-class type ‘int [N]’
24 | sort(arr.begin(), arr.end());
| ^~~
paint.cpp:29:33: error: request for member ‘first’ in ‘arr[i]’, which is of non-class type ‘int’
29 | S += i * (i + 1) / 2 * arr[i].first;
| ^~~~~
paint.cpp:34:10: error: expected ‘}’ at end of input
34 | return 0;
| ^
paint.cpp:4:12: note: to match this ‘{’
4 | int main() {
| ^