summaryrefslogtreecommitdiff
path: root/test/other/josephus2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/other/josephus2.cpp')
-rw-r--r--test/other/josephus2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/other/josephus2.cpp b/test/other/josephus2.cpp
index 85a9d28..c6b1cd1 100644
--- a/test/other/josephus2.cpp
+++ b/test/other/josephus2.cpp
@@ -4,8 +4,8 @@
template<ll O>
ll naive(ll n, ll k) {
vector<ll> state(n);
- iota(all(state), O);
- for (ll i = k-1; state.size() > 1; i = (i + k - 1) % sz(state)) {
+ iota(begin(state), end(state), O);
+ for (ll i = k-1; state.size() > 1; i = (i + k - 1) % ssize(state)) {
state.erase(state.begin() + i);
}
return state[0];