From 3c2f4aef64f3495881473b23b20681ba65b5e74f Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Sun, 9 Nov 2025 22:37:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(P11362):=20=E4=BF=AE=E5=A4=8D=E8=AE=A1?= =?UTF-8?q?=E7=AE=97=E9=80=BB=E8=BE=91=E9=94=99=E8=AF=AF=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=9B=86=E5=90=88=E6=B8=85=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复连续元素判断时的计算逻辑,将加法改为乘法运算以确保正确性 添加s.clear()以避免前次测试数据影响 --- src/11/8/P11362.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/11/8/P11362.cpp b/src/11/8/P11362.cpp index f4131ab..e6367de 100644 --- a/src/11/8/P11362.cpp +++ b/src/11/8/P11362.cpp @@ -18,6 +18,7 @@ struct X{ std::unordered_set s; sl void solve(){ + s.clear(); std::cin>>n>>m>>v; for(ll i=1;i<=m;i++){ std::cin>>x[i].c>>x[i].d; @@ -33,7 +34,7 @@ sl void solve(){ ll ans=1; for(ll i=1;i