Problem | lis_easy |
---|---|
User | baobaocar |
Submission Time | 2023-02-24 23:38:49 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lis_easy.cpp:1:13: error: ‘maxn’ was not declared in this scope
1 | int N, nums[maxn]; int dp[maxn]; // dp[i] = length of longest increasing subsequence that ends at nums[i]
| ^~~~
lis_easy.cpp:1:27: error: ‘maxn’ was not declared in this scope
1 | int N, nums[maxn]; int dp[maxn]; // dp[i] = length of longest increasing subsequence that ends at nums[i]
| ^~~~
lis_easy.cpp: In function ‘int main()’:
lis_easy.cpp:2:14: error: ‘cin’ was not declared in this scope
2 | int main() { cin >> N; for (int i = 0; i < N; ++i) cin >> nums[i]; for (int i = 0; i < N; ++i) { dp[i] = 1; for (int j = 0; j < i; ++j) { if (nums[j] < nums[i]) dp[i] = max(dp[i], dp[j] + 1);
| ^~~
lis_easy.cpp:2:59: error: ‘nums’ was not declared in this scope
2 | int main() { cin >> N; for (int i = 0; i < N; ++i) cin >> nums[i]; for (int i = 0; i < N; ++i) { dp[i] =