Unverified Commit 4f79b854 authored by xhn16729's avatar xhn16729 Committed by GitHub
Browse files

Update index.md

parent 170e9eda
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -97,14 +97,13 @@
```cpp
int a[MAXN];
int dp() {
  int now = 0, ans = 1;
  int now = 1, ans = 1;
  for (int i = 2; i <= n; i++) {
    if (a[i] > a[i - 1]) {
      ans++;
    } else {
      ans = 1;
    }
    now = max(now, ans);
    if (a[i] > a[i - 1])
      now++;
    else
      now = 1;
    ans = max(now, ans);
  }
  return ans;
}