From 12afe719ce268bb10aa93a910079a44eb08999b8 Mon Sep 17 00:00:00 2001 From: MZuenni Date: Wed, 1 Mar 2023 11:36:26 +0100 Subject: removed trailing whitespaces and use more structured bindings --- string/duval.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'string/duval.cpp') diff --git a/string/duval.cpp b/string/duval.cpp index 6d80e95..bf36cce 100644 --- a/string/duval.cpp +++ b/string/duval.cpp @@ -15,7 +15,7 @@ vector> duval(const string& s) { int minrotation(const string& s) { auto parts = duval(s+s); - for (auto e : parts) { - if (e.first < sz(s) && e.second >= sz(s)) { - return e.first; + for (auto [l, r] : parts) { + if (l < sz(s) && r >= sz(s)) { + return l; }}} -- cgit v1.2.3