From 04ff9f7841e54f602328419a94be0c756e49413c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=B5=B7?= <10402852@qq.com> Date: Fri, 15 Dec 2023 11:10:34 +0800 Subject: [PATCH] 'commit' --- TangDou/AcWing/RongChi/HDU2204_2.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/TangDou/AcWing/RongChi/HDU2204_2.cpp b/TangDou/AcWing/RongChi/HDU2204_2.cpp index d9ac59b..533cb2c 100644 --- a/TangDou/AcWing/RongChi/HDU2204_2.cpp +++ b/TangDou/AcWing/RongChi/HDU2204_2.cpp @@ -1,20 +1,18 @@ #include using namespace std; #define ll long long -#define inf 0x3f3f3f3f -#define ll_inf 1ll << 60 -const int maxn = 100 + 100; -ll mu[maxn * 100], prim[maxn * 100], check[maxn * 100]; +const int N = 100 + 100; +ll mu[N * 100], prim[N * 100], check[N * 100]; int tot = 0; void getmu() { mu[1] = 1; - for (int i = 2; i < maxn; i++) { + for (int i = 2; i < N; i++) { if (!check[i]) { prim[tot++] = i; mu[i] = -1; } for (int j = 0; j < tot; j++) { - if (prim[j] > maxn / i) { + if (prim[j] > N / i) { break; } check[i * prim[j]] = 1;