From 2f0f682e93c6247972f9aac1f04bf8629cfbd6e5 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Wed, 23 Jul 2025 16:11:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20sub=20=E5=87=BD=E6=95=B0?= =?UTF-8?q?=E7=9A=84=20inline=20=E5=B1=9E=E6=80=A7=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20iostream=20=E5=90=8C=E6=AD=A5=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/7/23/T637678.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/7/23/T637678.cpp b/src/7/23/T637678.cpp index 78f999f..9c80e9c 100644 --- a/src/7/23/T637678.cpp +++ b/src/7/23/T637678.cpp @@ -1,9 +1,11 @@ #include #include +#include +#include using namespace std; using ll = int64_t; -vector sub(vector& nums) { +__attribute__((always_inline)) static inline vector sub(vector& nums) { int n = nums.size(); if (n == 0) { return {0}; @@ -23,6 +25,9 @@ vector sub(vector& nums) { } int main() { + iostream::sync_with_stdio(false); + cin.tie(nullptr); + cout.tie(nullptr); int n, q; scanf("%d %d", &n, &q); vector v(n);