diff options
Diffstat (limited to 'test/other/josephusK.cpp')
| -rw-r--r-- | test/other/josephusK.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/other/josephusK.cpp b/test/other/josephusK.cpp index b6680b8..dab291b 100644 --- a/test/other/josephusK.cpp +++ b/test/other/josephusK.cpp @@ -5,8 +5,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]; |
