From 88664201e171cb3ccdd4707ee0be56b84da8989e Mon Sep 17 00:00:00 2001 From: zhangbo Date: Fri, 23 Feb 2024 13:15:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=B6=88=E9=87=8D=E5=92=8C?= =?UTF-8?q?=E9=80=92=E5=A2=9E=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ReciprocalSearch.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ReciprocalSearch.cpp b/ReciprocalSearch.cpp index a563243..2b0c089 100644 --- a/ReciprocalSearch.cpp +++ b/ReciprocalSearch.cpp @@ -20,6 +20,12 @@ bool check(int i1, int i2, int i3, int i4, int i5, int i6, int i7, int i8, int i a[8] = i9; a[9] = i10; + for (int k = 8; k >= 0; --k) + { + if (i10 <= a[k]) + return false; + } + mpz_t t; mpz_init(t); mpz_set_ui(t, 1);