summaryrefslogtreecommitdiff
path: root/test/other/josephusK.cpp
diff options
context:
space:
mode:
authorGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
committerGloria Mundi <gloria@gloria-mundi.eu>2024-11-16 21:17:29 +0100
commit1880ccb6d85c6eb79e724593457877bab431951c (patch)
tree23eddd5bd0b29b3024e170a5ef9023eda9226ab5 /test/other/josephusK.cpp
parente95f59debd69ee7d45d5c966ce466d23264e1c3c (diff)
get rid of all() and sz()
Diffstat (limited to 'test/other/josephusK.cpp')
-rw-r--r--test/other/josephusK.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/other/josephusK.cpp b/test/other/josephusK.cpp
index e837640..1a5aa9d 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];