summaryrefslogtreecommitdiff
path: root/content/math/longestIncreasingSubsequence.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'content/math/longestIncreasingSubsequence.cpp')
-rw-r--r--content/math/longestIncreasingSubsequence.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/math/longestIncreasingSubsequence.cpp b/content/math/longestIncreasingSubsequence.cpp
index fcb63b4..e4863d0 100644
--- a/content/math/longestIncreasingSubsequence.cpp
+++ b/content/math/longestIncreasingSubsequence.cpp
@@ -1,8 +1,8 @@
vector<int> lis(vector<ll>& a) {
- int n = sz(a), len = 0;
+ int n = ssize(a), len = 0;
vector<ll> dp(n, INF), dp_id(n), prev(n);
for (int i = 0; i < n; i++) {
- int pos = lower_bound(all(dp), a[i]) - dp.begin();
+ int pos = ranges::lower_bound(dp, a[i]) - begin(dp);
dp[pos] = a[i];
dp_id[pos] = i;
prev[i] = pos ? dp_id[pos - 1] : -1;