From 93e0e0ee1fc7461b066f2ba68903823ad6d3dbe7 Mon Sep 17 00:00:00 2001 From: zhangbo Date: Fri, 23 Feb 2024 13:13:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8D=E7=94=A8auto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReciprocalSearch2.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ReciprocalSearch2.cpp b/ReciprocalSearch2.cpp index a090926..f35e323 100644 --- a/ReciprocalSearch2.cpp +++ b/ReciprocalSearch2.cpp @@ -67,45 +67,45 @@ int main() { } for (int i1 = 2; i1 <= 10; i1++) { - const auto m1 = 1 - ii[i1]; + const mpq_class m1 = 1 - ii[i1]; const int u2 = min(92, ceil(9 / m1)); for (int i2 = i1 + 1; i2 <= u2; i2++) { - const auto m2 = m1 - ii[i2]; + const mpq_class m2 = m1 - ii[i2]; const int u3 = min(93, ceil(8 / m2)); for (int i3 = i2 + 1; i3 <= u3; i3++) { - const auto m3 = m2 - ii[i3]; + const mpq_class m3 = m2 - ii[i3]; if (m3 <= 0) continue; const int u4 = min(94, ceil(7 / m3)); for (int i4 = i3 + 1; i4 <= u4; i4++) { - const auto m4 = m3 - ii[i4]; + const mpq_class m4 = m3 - ii[i4]; if (m4 <= 0) continue; const int u5 = min(95, ceil(6 / m4)); for (int i5 = i4 + 1; i5 <= u5; i5++) { - const auto m5 = m4 - ii[i5]; + const mpq_class m5 = m4 - ii[i5]; if (m5 <= 0) continue; const int u6 = min(96, ceil(5 / m5)); for (int i6 = i5 + 1; i6 < u6; i6++) { - const auto m6 = m5 - ii[i6]; + const mpq_class m6 = m5 - ii[i6]; if (m6 <= 0) continue; const int u7 = min(97, ceil(4 / m6)); for (int i7 = i6 + 1; i7 <= u7; i7++) { - const auto m7 = m6 - ii[i7]; + const mpq_class m7 = m6 - ii[i7]; if (m7 <= 0) continue; const int u8 = min(98, ceil(3 / m7)); for (int i8 = i7 + 1; i8 <= u8; i8++) { - const auto m8 = m7 - ii[i8]; + const mpq_class m8 = m7 - ii[i8]; if (m8 <= 0) continue; const int u9 = min(99, ceil(2 / m8)); for (int i9 = i8 + 1; i9 <= u9; i9++) { - const auto m9 = m8 - ii[i9]; + const mpq_class m9 = m8 - ii[i9]; if (m9 <= 0) continue; const mpq_class last = 1 / m9;