summaryrefslogtreecommitdiff
path: root/string/duval.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'string/duval.cpp')
-rw-r--r--string/duval.cpp6
1 files changed, 3 insertions, 3 deletions
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<pair<int, int>> 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;
}}}