Problem | lis_easy |
---|---|
User | SilverClaw |
Submission Time | 2023-02-10 08:56:12 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lis_easy.cpp: In function ‘int length(int, int)’:
lis_easy.cpp:11:19: error: array must be initialized with a brace-enclosed initializer
11 | int length[i] = 1
| ^
lis_easy.cpp:12:15: error: ‘k’ was not declared in this scope
12 | for(int k=0;k<i;k++){
| ^
lis_easy.cpp:18:20: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
18 | return max_element(length,length+n);
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~
| |
| int*
lis_easy.cpp: In function ‘int main()’:
lis_easy.cpp:27:19: error: invalid conversion from ‘int*’ to ‘int’ [-fpermissive]
27 | cout << length(n,arr);
| ^~~
| |
| int*
lis_easy.cpp:8:23: note: initializing argument 2 of ‘int length(int, int)’
8 | int length(int n, int arr){
| ~~~~