From 0464e800da434bbdb16e61284e4839f4c7df7e92 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Tue, 13 Aug 2024 11:35:25 +0800 Subject: [PATCH] update --- day11/P3608/P3608.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/day11/P3608/P3608.cpp b/day11/P3608/P3608.cpp index ddbe245..e47e683 100644 --- a/day11/P3608/P3608.cpp +++ b/day11/P3608/P3608.cpp @@ -51,10 +51,10 @@ signed main(){ }); Tree cmax(n); for(int i=1;i<=n;i++){ - cmax.update(cow[i].dir, 1); - int l=cmax.query1to(cow[i].dir-1); + int l=cmax.query1to(cow[i].dir); int r = i-l-1; if(max(l,r)>min(l,r)*2)ans++; + cmax.update(cow[i].dir, 1); } cout<