Problem lis_easy
User SilverClaw
Submission Time 2023-02-10 08:59:14
Score 0
Max Time N/A
Max Memory N/A

Compile Error

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:23: error: expected ‘}’ at end of input
27 | cout << length(n,arr);
| ^
lis_easy.cpp:22:11: note: to match this ‘{’
22 | int main(){
| ^