summaryrefslogtreecommitdiff
path: root/test/reports
diff options
context:
space:
mode:
Diffstat (limited to 'test/reports')
-rw-r--r--test/reports/fabrice_baray_29-10-200499
-rw-r--r--test/reports/kim_daegon_27-04-2005.eml17578
-rw-r--r--test/reports/kristof_beyls_16-05-2005.txt933
-rw-r--r--test/reports/michael_classen_03-05-2005.eml333
-rw-r--r--test/reports/michael_classen_27-10-2004.txt59
-rw-r--r--test/reports/nicolas_vasilache_03-05-2005.eml306
-rw-r--r--test/reports/nicolas_vasilache_09-05-2005.txt44
-rw-r--r--test/reports/sergej_schwenk_01-06-2004.txt39
-rw-r--r--test/reports/sylvain_girbal_01-11-2004.txt11
-rw-r--r--test/reports/sylvain_girbal_24-02-2004.txt135
10 files changed, 0 insertions, 19537 deletions
diff --git a/test/reports/fabrice_baray_29-10-2004 b/test/reports/fabrice_baray_29-10-2004
deleted file mode 100644
index c561402..0000000
--- a/test/reports/fabrice_baray_29-10-2004
+++ /dev/null
@@ -1,99 +0,0 @@
-salut,
-
-je testais ta librairie cloog et je suis tombé sur un point qui m'a fait
-perdre un peu de temps, je pense que si ce n'est pas le cas, ça serait pas
-mal de le préciser dans la doc pour éviter des déboires. je te passe les
-détails du pourquoi, en fait je suis tombé sur un core dont voici la trace
-d'appels :
-
-
-#0 0x1b907460 in _vgi__soname$3Alibc$2Eso$2E6$3Afree (p=0x0) at vg_replace_malloc.c:153
-#1 0x1bb1e2f2 in cloog_statement_free (statement=0x1bb58d30) at source/statement.c:118
-#2 0x1bb19390 in cloog_loop_free_parts (loop=0x1bb66280, domain=1, statement=1, inner=0, next=0) at source/loop.c:170
-#3 0x1bb1aba5 in cloog_loop_simplify (loop=0x1bb66280, context=0x1bb662c8, level=3, nb_par=0) at source/loop.c:1096
-#4 0x1bb1a9c7 in cloog_loop_simplify (loop=0x1bb66530, context=0x1bb68820, level=2, nb_par=0) at source/loop.c:1040
-#5 0x1bb1a9c7 in cloog_loop_simplify (loop=0x1bb68a60, context=0x1bb58b98, level=1, nb_par=0) at source/loop.c:1040
-#6 0x1bb18e32 in cloog_program_generate (program=0x1bb57cc8, options=0x1bb57c68) at source/program.c:712
-
-
-en fait il s'agit du ``nom'' des statements : le champ loop->statement->body.
-et bien pour que ta librairie marche, il faut qu'il soit initialisé et
-désallouable par un free. ce ne peut être un champ statique style
-"statement" comme je l'avais mis au début. c'est un détail mais qui peut
-être piégeur.
-
-point différent : le champ 'name' des options, il semble important de le
-définir avant de faire un print, mais celui là pas forcément avec un malloc
-car il n'est pas désalloué par un quelconque free de cloog_options_free.
-
-ces petits détails pris en compte, ça à l'air de mieux marcher.
-a+
-,fb
-
-
-----------------------------------------------------------------------------
->Salut Fabrice,
->> il faut que tu arrêtes d'allonger ma pile de choses à m'occuper
->> 'rapidement' sinon j'en ai pour jusqu'en 2006 !
-
-
-allez, une dernière, pareil c'est pas urgent, stocke, j'ai pas besoin de
-réponse pour l'instant. en fait lorsque tu as pas de paramètres à ton
-problème, tu passes le polyhèdre :
-
-1 2
-1 1
-
-comme dans l'exemple ci-dessous :
-
-# ----------------------------------------------------------------------
-# language: C
-c
-
-# parameters {m, n | 4<=m<=n}
-1 2
-1 1
-0
-
-1 # Number of statements
-
-1
-# {i, j | 1<=i<=n 1<=j<=m}
-4 4
-# i j m n 1
-1 1 0 5
-1 -1 0 5
-1 0 1 5
-1 0 -1 5
-0 0 0
-0
-
-0 # Scattering functions
-# ----------------------------------------------------------------------
-
-qui donne parfaitement :
-
-/* Generated from a.cloog by CLooG v0.12.2 64 bits in 0.00s. */
-for (i=-5;i<=5;i++) {
- for (j=-5;j<=5;j++) {
- S1 ;
- }
-}
-
-
-
-par contre, si je décide de lui passer à la place :
-
-1 2
-0 1
-
-là il ne m'afficher plus de solution. c'est bizarre ou c'est normal ?
-
-en fait le polyhèdre ci dessus est intéressant, car il correspond au
-polyhèdre retourné par la fonction Empty_Polyhedron de la polylib.
-
-cprog->context=Empty_Polyhedron(0);
-
-,fb
-
-
diff --git a/test/reports/kim_daegon_27-04-2005.eml b/test/reports/kim_daegon_27-04-2005.eml
deleted file mode 100644
index b43a058..0000000
--- a/test/reports/kim_daegon_27-04-2005.eml
+++ /dev/null
@@ -1,17578 +0,0 @@
-X-UIDL: 38762.1114626251
-X-Mozilla-Status: 0003
-X-Mozilla-Status2: 00000000
-Received: from soleil.uvsq.fr (soleil.uvsq.fr [193.51.24.1])
- by relay-6m.club-internet.fr (Postfix) with ESMTP id DCFE125639
- for <netced@club-internet.fr>; Wed, 27 Apr 2005 20:24:09 +0200 (CEST)
-Received: from torquenada.prism.uvsq.fr (torquenada.prism.uvsq.fr [193.51.25.9])
- by soleil.uvsq.fr (8.12.11/jtpda-5.4) with ESMTP id j3RIO8Nk002407
- for <netced@club-internet.fr>; Wed, 27 Apr 2005 20:24:09 +0200 (CEST)
-Received: from soleil.uvsq.fr (root@soleil.uvsq.fr [193.51.24.1])
- by torquenada.prism.uvsq.fr (8.11.4/jtpda-5.3.2) with ESMTP id j3RIO7C02410
- for <cedric.bastoul@prism.uvsq.fr>; Wed, 27 Apr 2005 20:24:08 +0200 (MEST)
-Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.205])
- by soleil.uvsq.fr (8.12.11/jtpda-5.4) with ESMTP id j3RIO6e7001164
- for <cedric.bastoul@prism.uvsq.fr>; Wed, 27 Apr 2005 20:24:06 +0200 (CEST)
-Received: by wproxy.gmail.com with SMTP id 68so387084wri
- for <cedric.bastoul@prism.uvsq.fr>; Wed, 27 Apr 2005 11:24:00 -0700 (PDT)
-DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
- s=beta; d=gmail.com;
- h=received:message-id:date:from:reply-to:to:subject:cc:mime-version:content-type;
- b=LoJNXKibxMTIYItkoT/Sqykpnxxkeik4zUmMeWoVeasUn+yIfBWhF0UkkR0kHBRIeOFOZ/As82OpJ6TQiYZxy/WwuxyQ2aameC9qouWqE6R/dFG1zSY5MilV5/9RLrfinOfdyAoCZ1XzM6VMGspBtK4l5NBZYpsFxJBnVJ5AeW0=
-Received: by 10.54.121.20 with SMTP id t20mr277933wrc;
- Wed, 27 Apr 2005 10:24:00 -0700 (PDT)
-Received: by 10.54.5.57 with HTTP; Wed, 27 Apr 2005 10:24:00 -0700 (PDT)
-Message-ID: <fc5f19de05042710245f9acadd@mail.gmail.com>
-Date: Wed, 27 Apr 2005 11:24:00 -0600
-From: DaeGon Kim <daegonk@gmail.com>
-Reply-To: DaeGon Kim <daegonk@gmail.com>
-To: cedric.bastoul@prism.uvsq.fr
-Subject: Question about Cloog
-Cc: svr@cs.colostate.edu
-Mime-Version: 1.0
-Content-Type: multipart/mixed;
- boundary="----=_Part_1422_26966204.1114622640387"
-X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.7.5 (soleil.uvsq.fr [193.51.24.1]); Wed, 27 Apr 2005 20:24:09 +0200 (CEST)
-X-Greylist: Delayed for 00:53:20 by milter-greylist-1.7.5 (soleil.uvsq.fr [193.51.24.1]); Wed, 27 Apr 2005 20:24:07 +0200 (CEST)
-X-Miltered: at soleil.uvsq.fr with ID 426FD8C9.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!
-X-Miltered: at soleil.uvsq.fr with ID 426FD8C6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!
-X-Antivirus: scanned by sophie at soleil.uvsq.fr
-X-Antivirus: scanned by sophie at soleil.uvsq.fr
-Status:
-X-Mmail: \Recent
-X-M-Uid: 38762.1114626251
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: quoted-printable
-Content-Disposition: inline
-
-Hello Dr Cedric Bastoul,
-
-I am a graduate student in CSU working with Dr. Sanjay Rajopadhye.
-I am working on experiments on code generation software.=20
-A few days ago I wrote three cloog input files: LUDom_cloog,
-OSP_cloog, and LUDom_OSP_cloog. The last file is nothing but
-concatenation of two previous files. So it has two statements since
-each of the first two has one statement each.
-
-When I generated, I got something strange:=20
- - The numbers of visited points are different between the first two
-and the last one.
- - The numbers of visited points become different, if I use different
-options: default and "-f 3".
- - Domains of all statements are 3-dimensional, but there are
-statements having only two indices inside one if block. I added
-generated code below.
-
-Also, I attached my three inputs and C programs in which generated
-code from cloog can be executed. type1 files contain generated code
-without any options and type2 files contains generated code with -f 3
-option.
-
-/* Generated from LUDom_OSP_cloog by CLooG v0.12.2 64 bits in 0.03s. */
-for (I1=3D0;I1<=3D3*N1;I1++) {
- for (I2=3Dmax(max(1,ceild(I1-2*N1+2,2)),I1-2*N1);I2<=3DN1;I2++) {
- for (I3=3Dmax(max(I1-2*I2,ceild(I1-I2,2)),1);I3<=3Dmin(min(N1,floord(I1=
-+2*I2-1,2)),I1-I2);I3++)
-{
- J3 =3D I1-(I2)-(I3) ;
- S1(J1 =3D I2,J2 =3D I3) ;
- }
- for (I3=3Dceild(I1+2*I2,2);I3<=3Dmin(min(N1,I1-2*I2-1),floord(2*I1+3*I2=
-,3));I3++)
-{
- J3 =3D -I1-2*(I2)+2*I3 ;
- S2(J1 =3D I2,J2 =3D I3) ;
- }
- for (I3=3Dmax(I1-2*I2,ceild(I1+2*I2,2));I3<=3Dmin(N1,floord(2*I1+I2-1,3=
-));I3++)
-{
- J3 =3D -I1-2*(I2)+2*I3 ;
- S2(J1 =3D I2,J2 =3D I3) ;
- J3 =3D I1-(I2)-(I3) ;
- S1(J1 =3D I2,J2 =3D I3) ;
- }
- if ((2*I1+I2)%3 =3D=3D 0) {
- I3 =3D (2*I1+I2)/3 ;
- J1 =3D -2*I1+3*I3 ;
- if ((2*I1+J1)%3 =3D=3D 0) {
- J2 =3D (2*I1+J1)/3 ;
- J3 =3D 3*I1-4*J2 ;
- S1 ;
- S2 ;
- }
- }
- for (I3=3Dmax(I1-2*I2,ceild(2*I1+I2+1,3));I3<=3Dmin(min(N1,floord(2*I1+=
-3*I2,3)),I1-I2);I3++)
-{
- J3 =3D I1-(I2)-(I3) ;
- S1(J1 =3D I2,J2 =3D I3) ;
- J3 =3D -I1-2*(I2)+2*I3 ;
- S2(J1 =3D I2,J2 =3D I3) ;
- }
- for (I3=3Dmax(ceild(2*I1+3*I2+1,3),I1-2*I2);I3<=3Dmin(N1,I1-I2);I3++) {
- J3 =3D I1-(I2)-(I3) ;
- S1(J1 =3D I2,J2 =3D I3) ;
- }
- for (I3=3Dmax(ceild(I1+2*I2,2),I1-I2+1);I3<=3Dmin(floord(2*I1+3*I2,3),N=
-1);I3++)
-{
- J3 =3D -I1-2*(I2)+2*I3 ;
- S2(J1 =3D I2,J2 =3D I3) ;
- }
- }
-}
-
-
-Thank you for reading.
-
---=20
-DaeGon Kim
-
-Graduate Student, Computer Science Department,
-Colorado State University, Fort Collins, CO
-Tel. Office: (1) 970 491 5937
-kim@cs.colostate.edu
-Personal Homepage : http://www.roadtohome.com/
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: application/octet-stream; name=LUDom_cloog
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="LUDom_cloog"
-
-###############################################################################
-#
-# Problem : LU Decomposition
-# Date : 2005. 4. 25
-# Author : DaeGon Kim
-#
-###############################################################################
-
-### Context -------------------------------------------------------------------
- c # language is c
-
- 1 # Context
- 1 3 # 1 lines and 3 coloumns
- # N1 1
- 1 1 -2 # N > 1
-
- 1 # 1 - Specify the names of parameters
- N1 # parameter names
-
-### ----------------------------------------------------------------------------
-
-### Statements -----------------------------------------------------------------
- 1 # number of statements
- # first statement
- 1
- 7 6
- # Eq/In J J K N1 Constants
- 1 1 0 0 0 -1 # 1 <= I
- 1 0 1 0 0 -1 # 1 <= J
- 1 0 0 1 0 0 # 0 <= K
- 1 -1 0 0 1 0 # I <= N1
- 1 0 -1 0 1 0 # J <= N1
- 1 1 0 -1 0 0 # K <= I
- 1 0 1 -1 0 0 # K <= J
- 0 0 0
-
- 1 # Iterators
- J1 J2 J3 # iterator names
-
-### ----------------------------------------------------------------------------
-
-
-### Scattering Functions -------------------------------------------------------
-
- 1 # Number of scattering functions
-
- 3 9
- # I1 I2 I3 I J K N1 1
- 0 1 0 0 -1 -1 -1 0 0 # I1 = I+J+K
- 0 0 1 0 -1 0 0 0 0 # I2 = I
- 0 0 0 1 0 -1 0 0 0 # I3 = J
-
-
- 1 # Specify scattering dimension names
- I1 I2 I3 # Scattering dimension names
-
-### ----------------------------------------------------------------------------
-
-
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: application/octet-stream; name=OSP_cloog
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="OSP_cloog"
-
-###############################################################################
-#
-# Problem : Optimal String Parentheses
-# Date : 2005. 4. 25
-# Author : DaeGon Kim
-#
-###############################################################################
-
-### Context -------------------------------------------------------------------
- c # language is c
- 1 # Context
- 1 3 # 1 lines and 3 coloumns
- # N1 1
- 1 1 -2
-
- 1 # We want to set manually the parameter names
- N1 # parameter names
-
-### ----------------------------------------------------------------------------
-
-### Statements -----------------------------------------------------------------
- 1 # number of statements
- # first statement
- 1
- 6 6
- # Eq/In I J K N1 Constants
- 1 1 0 0 0 -1 # 1 <= I
- 1 0 1 0 0 -1 # 1 <= J
- 1 0 0 1 0 0 # 0 <= K
- 1 0 -1 0 1 0 # J <= N1
- 1 -1 1 0 0 0 # I <= J
- 1 -1 1 -2 0 0 # 2K <= J-I
- 0 0 0
-
- 1 # Iterators
- J1 J2 J3 # Iterators name
-
-### ----------------------------------------------------------------------------
-
-
-### Scattering Functions -------------------------------------------------------
-
- 1 # Number of scattering functions
-
- 3 9
- # I1 I2 I3 I J K N1 1
- 0 1 0 0 2 -2 1 0 0 # I1 = -2I + 2J - K
- 0 0 1 0 -1 0 0 0 0 # I2 = I
- 0 0 0 1 0 -1 0 0 0 # I3 = J
-
-
- 1 # Specify scattering dimension names
- I1 I2 I3 # Scattering dimension names
-
-### ----------------------------------------------------------------------------
-
-
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: application/octet-stream; name=LUDom_OSP_cloog
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="LUDom_OSP_cloog"
-
-###############################################################################
-#
-# Problem : LU Decomposition +
-# Date : 2005. 4. 25
-# Author : DaeGon Kim
-#
-###############################################################################
-
-### Context -------------------------------------------------------------------
- c # language is c
-
- 1 # Context
- 1 3 # 1 lines and 3 coloumns
- # N1 1
- 1 1 -2 # N > 1
-
- 1 # 1 - Specify the names of parameters
- N1 # parameter names
-
-### ----------------------------------------------------------------------------
-
-### Statements -----------------------------------------------------------------
- 2 # number of statements
- # first statement
- 1
- 7 6
- # Eq/In J J K N1 Constants
- 1 1 0 0 0 -1 # 1 <= I
- 1 0 1 0 0 -1 # 1 <= J
- 1 0 0 1 0 0 # 0 <= K
- 1 -1 0 0 1 0 # I <= N1
- 1 0 -1 0 1 0 # J <= N1
- 1 1 0 -1 0 0 # K <= I
- 1 0 1 -1 0 0 # K <= J
- 0 0 0
-
- # second statement
- 1
- 6 6
- # Eq/In I J K N1 Constants
- 1 1 0 0 0 -1 # 1 <= I
- 1 0 1 0 0 -1 # 1 <= J
- 1 0 0 1 0 0 # 0 <= K
- 1 0 -1 0 1 0 # J <= N1
- 1 -1 1 0 0 0 # I <= J
- 1 -1 1 -2 0 0 # 2K <= J-I
- 0 0 0
-
- 1 # Iterators
- J1 J2 J3 # Iterators name
-
-### ----------------------------------------------------------------------------
-
-
-### Scattering Functions -------------------------------------------------------
-
- 2 # Number of scattering functions
-
- # First statement
- 3 9
- # I1 I2 I3 I J K N1 1
- 0 1 0 0 -1 -1 -1 0 0 # I1 = I+J+K
- 0 0 1 0 -1 0 0 0 0 # I2 = I
- 0 0 0 1 0 -1 0 0 0 # I3 = J
-
- # Second statement
- 3 9
- # I1 I2 I3 I J K N1 1
- 0 1 0 0 2 -2 1 0 0 # I1 = -2I + 2J - K
- 0 0 1 0 -1 0 0 0 0 # I2 = I
- 0 0 0 1 0 -1 0 0 0 # I3 = J
-
-
- 1 # Specify scattering dimension names
- I1 I2 I3 # Scattering dimension names
-
-### ----------------------------------------------------------------------------
-
-
-
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: application/octet-stream; name=LUDom.type1.c
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="LUDom.type1.c"
-
-/* Author : DaeGon Kim
- Date : Tue Apr 26 20:03:32 MDT 2005 */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define max(x,y) ((x)>(y) ? (x) : (y))
-#define min(x,y) ((x)>(y) ? (y) : (x))
-#define ceild(x,y) ((x)+1) / (y)
-#define floord(x,y) (x) / (y)
-
-int main(int argc, char **argv) {
-
- /* parameters declaration */
- int N1 = 0;
-
- /* statements declaration */
- int S1 = 0;
-
- /* iterators declaration */
- int I1 = 0;
- int J1 = 0;
- int I2 = 0;
- int J2 = 0;
- int I3 = 0;
- int J3 = 0;
-
- /* check arguements and get values of parameters */
- if ( argc != 1 + 1) {
- printf("The number of arguements for %s is 1\n", argv[0]);
- exit(0);
- }
-
- N1 = atoi(argv[1]);
-
-/* Generated from ./INPUT/CLOOG/LUDom_cloog by CLooG v0.12.2 64 bits in 0.00s. */
-for (I1=2;I1<=3*N1;I1++) {
- for (I2=max(ceild(I1-N1,2),1);I2<=min(N1,I1-1);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-
-
- /* statements print */
- fprintf(stderr, "S1 : %d\n", S1);
-
-
-}
-
-
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: application/octet-stream; name=LUDom.type2.c
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="LUDom.type2.c"
-
-/* Author : DaeGon Kim
- Date : Tue Apr 26 20:03:33 MDT 2005 */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define max(x,y) ((x)>(y) ? (x) : (y))
-#define min(x,y) ((x)>(y) ? (y) : (x))
-#define ceild(x,y) ((x)+1) / (y)
-#define floord(x,y) (x) / (y)
-
-int main(int argc, char **argv) {
-
- /* parameters declaration */
- int N1 = 0;
-
- /* statements declaration */
- int S1 = 0;
-
- /* iterators declaration */
- int I1 = 0;
- int J1 = 0;
- int I2 = 0;
- int J2 = 0;
- int I3 = 0;
- int J3 = 0;
-
- /* check arguements and get values of parameters */
- if ( argc != 1 + 1) {
- printf("The number of arguements for %s is 1\n", argv[0]);
- exit(0);
- }
-
- N1 = atoi(argv[1]);
-
-/* Generated from ./INPUT/CLOOG/LUDom_cloog by CLooG v0.12.2 64 bits in 0.00s. */
-for (I1=2;I1<=3*N1;I1++) {
- for (I2=max(ceild(I1-N1,2),1);I2<=min(N1,I1-1);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-
- /* statements print */
- fprintf(stderr, "S1 : %d\n", S1);
-
-
-}
-
-
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: application/octet-stream; name=OSP.type1.c
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="OSP.type1.c"
-
-/* Author : DaeGon Kim
- Date : Tue Apr 26 20:04:18 MDT 2005 */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define max(x,y) ((x)>(y) ? (x) : (y))
-#define min(x,y) ((x)>(y) ? (y) : (x))
-#define ceild(x,y) ((x)+1) / (y)
-#define floord(x,y) (x) / (y)
-
-int main(int argc, char **argv) {
-
- /* parameters declaration */
- int N1 = 0;
-
- /* statements declaration */
- int S1 = 0;
-
- /* iterators declaration */
- int I1 = 0;
- int J1 = 0;
- int I2 = 0;
- int J2 = 0;
- int I3 = 0;
- int J3 = 0;
-
- /* check arguements and get values of parameters */
- if ( argc != 1 + 1) {
- printf("The number of arguements for %s is 1\n", argv[0]);
- exit(0);
- }
-
- N1 = atoi(argv[1]);
-
-/* Generated from ./INPUT/CLOOG/OSP_cloog by CLooG v0.12.2 64 bits in 0.00s. */
-for (I1=0;I1<=2*N1-2;I1++) {
- for (I2=1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(floord(2*I1+3*I2,3),N1);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S1++;
- }
- }
-}
-
-
- /* statements print */
- fprintf(stderr, "S1 : %d\n", S1);
-
-}
-
-
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: application/octet-stream; name=OSP.type2.c
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="OSP.type2.c"
-
-/* Author : DaeGon Kim
- Date : Tue Apr 26 20:04:19 MDT 2005 */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define max(x,y) ((x)>(y) ? (x) : (y))
-#define min(x,y) ((x)>(y) ? (y) : (x))
-#define ceild(x,y) ((x)+1) / (y)
-#define floord(x,y) (x) / (y)
-
-int main(int argc, char **argv) {
-
- /* parameters declaration */
- int N1 = 0;
-
- /* statements declaration */
- int S1 = 0;
-
- /* iterators declaration */
- int I1 = 0;
- int J1 = 0;
- int I2 = 0;
- int J2 = 0;
- int I3 = 0;
- int J3 = 0;
-
- /* check arguements and get values of parameters */
- if ( argc != 1 + 1) {
- printf("The number of arguements for %s is 1\n", argv[0]);
- exit(0);
- }
-
- N1 = atoi(argv[1]);
-
-/* Generated from ./INPUT/CLOOG/OSP_cloog by CLooG v0.12.2 64 bits in 0.00s. */
-for (I1=0;I1<=2*N1-2;I1++) {
- for (I2=1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(floord(2*I1+3*I2,3),N1);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S1++;
- }
- }
-}
-
-
- /* statements print */
- fprintf(stderr, "S1 : %d\n", S1);
-
-
-}
-
-
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: application/octet-stream; name=LUDom_OSP.type1.c
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="LUDom_OSP.type1.c"
-
-/* Author : DaeGon Kim
- Date : Tue Apr 26 20:28:05 MDT 2005 */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define max(x,y) ((x)>(y) ? (x) : (y))
-#define min(x,y) ((x)>(y) ? (y) : (x))
-#define ceild(x,y) ((x)+1) / (y)
-#define floord(x,y) (x) / (y)
-
-int main(int argc, char **argv) {
-
- /* parameters declaration */
- int N1 = 0;
-
- /* statements declaration */
- int S1 = 0;
- int S2 = 0;
-
- /* iterators declaration */
- int I1 = 0;
- int J1 = 0;
- int I2 = 0;
- int J2 = 0;
- int I3 = 0;
- int J3 = 0;
-
- /* check arguements and get values of parameters */
- if ( argc != 1 + 1) {
- printf("The number of arguements for %s is 1\n", argv[0]);
- exit(0);
- }
-
- N1 = atoi(argv[1]);
-
-/* Generated from ./INPUT/CLOOG/LUDom_OSP_cloog by CLooG v0.12.2 64 bits in 0.76s. */
-for (I1=0;I1<=1;I1++) {
- for (I2=1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(floord(2*I1+3*I2,3),N1);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-for (I1=2;I1<=min(3,floord(2*N1,3));I1++) {
- for (I2=max(ceild(I1+1,4),1);I2<=I1-1;I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if (N1 >= 6) {
- J3 = 4-(I2)-(I3) ;
- S1++;
- J1 = -2*(4)+3*3 ;
- if ((2*4+J1)%3 == 0) {
- J2 = (2*4+J1)/3 ;
- J3 = 3*4-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=2;I2<=3;I2++) {
- for (I3=max(max(1,ceild(4-I2,2)),4-2*I2);I3<=4-I2;I3++) {
- J3 = 4-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(4-I2+1,ceild(4+2*I2,2));I3<=min(N1,floord(2*4+3*I2,3));I3++) {
- J3 = -(4)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=4;I2<=N1-2;I2++) {
- for (I3=ceild(4+2*I2,2);I3<=min(N1,floord(2*4+3*I2,3));I3++) {
- J3 = -(4)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 5) && (N1 >= 5)) {
- J3 = 4-(I2)-(I3) ;
- S1++;
- J1 = -2*(4)+3*3 ;
- if ((2*4+J1)%3 == 0) {
- J2 = (2*4+J1)/3 ;
- J3 = 3*4-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=2;I2<=3;I2++) {
- for (I3=max(max(1,ceild(4-I2,2)),4-2*I2);I3<=4-I2;I3++) {
- J3 = 4-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(4-I2+1,ceild(4+2*I2,2));I3<=min(N1,floord(2*4+3*I2,3));I3++) {
- J3 = -(4)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-for (I1=max(2,ceild(2*N1+1,3));I1<=min(3,floord(2*N1+2,3));I1++) {
- for (I2=max(ceild(I1+1,4),1);I2<=I1-1;I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if (N1 >= 8) {
- for (I3=2*1+1;I3<=3*1;I3++) {
- J3 = 5-(I2)-(I3) ;
- S1++;
- }
- if ((9*5-1)%12 == 0) {
- I3 = (9*5-1)/12 ;
- J1 = -2*(5)+3*I3 ;
- if ((2*5+J1)%3 == 0) {
- J2 = (2*5+J1)/3 ;
- J3 = 3*5-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*5+1)%4 == 0) {
- I3 = (3*5+1)/4 ;
- J3 = 5-(I2)-(I3) ;
- S1++;
- J3 = -(5)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=2;I2<=4;I2++) {
- for (I3=max(max(1,ceild(5-I2,2)),5-2*I2);I3<=5-I2;I3++) {
- J3 = 5-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(5-I2+1,ceild(5+2*I2,2));I3<=min(N1,floord(2*5+3*I2,3));I3++) {
- J3 = -(5)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=5;I2<=floord(2*N1-5,2);I2++) {
- for (I3=ceild(5+2*I2,2);I3<=min(N1,floord(2*5+3*I2,3));I3++) {
- J3 = -(5)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 7) && (N1 >= 7)) {
- for (I3=2*1+1;I3<=3*1;I3++) {
- J3 = 5-(I2)-(I3) ;
- S1++;
- }
- if ((9*5-1)%12 == 0) {
- I3 = (9*5-1)/12 ;
- J1 = -2*(5)+3*I3 ;
- if ((2*5+J1)%3 == 0) {
- J2 = (2*5+J1)/3 ;
- J3 = 3*5-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*5+1)%4 == 0) {
- I3 = (3*5+1)/4 ;
- J3 = 5-(I2)-(I3) ;
- S1++;
- J3 = -(5)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=2;I2<=4;I2++) {
- for (I3=max(max(1,ceild(5-I2,2)),5-2*I2);I3<=5-I2;I3++) {
- J3 = 5-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(5-I2+1,ceild(5+2*I2,2));I3<=min(N1,floord(2*5+3*I2,3));I3++) {
- J3 = -(5)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-for (I1=ceild(2*N1+3,3);I1<=min(floord(4*N1-2,3),3);I1++) {
- for (I2=max(ceild(I1+1,4),I1-N1+1);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=I1-1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 4) && (N1 >= 4)) {
- J3 = 4-(I2)-(I3) ;
- S1++;
- J1 = -2*(4)+3*3 ;
- if ((2*4+J1)%3 == 0) {
- J2 = (2*4+J1)/3 ;
- J3 = 3*4-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=max(2,-N1+5);I2<=N1-2;I2++) {
- for (I3=max(max(1,ceild(4-I2,2)),4-2*I2);I3<=4-I2;I3++) {
- J3 = 4-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(4-I2+1,ceild(4+2*I2,2));I3<=min(N1,floord(2*4+3*I2,3));I3++) {
- J3 = -(4)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-3,2);I2<=3;I2++) {
- for (I3=max(max(ceild(4-I2,2),4-2*I2),1);I3<=min(4-I2,N1);I3++) {
- J3 = 4-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 9) {
- for (I3=4*1;I3<=floord(13*1-1,3);I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if (13*6%18 == 0) {
- I3 = 13*6/18 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*1+1,3);I3<=min(N1,5*1);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5%4 == 0) {
- for (I3=2*5/4+1;I3<=3*5/4;I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if ((9*6-1)%12 == 0) {
- I3 = (9*6-1)/12 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*6+1)%4 == 0) {
- I3 = (3*6+1)/4 ;
- J3 = 6-(I2)-(I3) ;
- S1++;
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=2*3/2;I3<=floord(6*3/2-1,2);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if (3*6%4 == 0) {
- I3 = 3*6/4 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*3/2+1;I3<=min(N1,floord(11*3/2,3));I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=2;I2<=5;I2++) {
- for (I3=max(max(1,ceild(6-I2,2)),6-2*I2);I3<=6-I2;I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(6-I2+1,ceild(6+2*I2,2));I3<=min(N1,floord(2*6+3*I2,3));I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=6;I2<=N1-3;I2++) {
- for (I3=ceild(6+2*I2,2);I3<=min(N1,floord(2*6+3*I2,3));I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 8) && (N1 >= 8)) {
- for (I3=4*1;I3<=floord(13*1-1,3);I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if (13*6%18 == 0) {
- I3 = 13*6/18 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*1+1,3);I3<=min(N1,5*1);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5%4 == 0) {
- for (I3=2*5/4+1;I3<=3*5/4;I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if ((9*6-1)%12 == 0) {
- I3 = (9*6-1)/12 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*6+1)%4 == 0) {
- I3 = (3*6+1)/4 ;
- J3 = 6-(I2)-(I3) ;
- S1++;
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=2*3/2;I3<=floord(6*3/2-1,2);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if (3*6%4 == 0) {
- I3 = 3*6/4 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*3/2+1;I3<=min(N1,floord(11*3/2,3));I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=2;I2<=5;I2++) {
- for (I3=max(max(1,ceild(6-I2,2)),6-2*I2);I3<=6-I2;I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(6-I2+1,ceild(6+2*I2,2));I3<=min(N1,floord(2*6+3*I2,3));I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 3) && (N1 >= 3)) {
- if ((4*N1-1)%3 == 0) {
- I1 = (4*N1-1)/3 ;
- for (I2=ceild(N1+2,3);I2<=floord(4*N1-4,3);I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 11) {
- J1 = -2*(7)+3*5 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- for (I3=6;I3<=5;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- J3 = 7-(I2)-(I3) ;
- S1++;
- if (7%6 == 0) {
- for (I3=4*7/6;I3<=floord(13*7/6-1,3);I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if (13*7%18 == 0) {
- I3 = 13*7/18 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*7/6+1,3);I3<=min(N1,5*7/6);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=2*3/2+1;I3<=3*3/2;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if ((9*7-1)%12 == 0) {
- I3 = (9*7-1)/12 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*7+1)%4 == 0) {
- I3 = (3*7+1)/4 ;
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (7%4 == 0) {
- for (I3=2*7/4;I3<=floord(6*7/4-1,2);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if (3*7%4 == 0) {
- I3 = 3*7/4 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*7/4+1;I3<=min(N1,floord(11*7/4,3));I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=2;I2<=6;I2++) {
- for (I3=max(max(1,ceild(7-I2,2)),7-2*I2);I3<=7-I2;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(7-I2+1,ceild(7+2*I2,2));I3<=min(N1,floord(2*7+3*I2,3));I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=7;I2<=floord(2*N1-7,2);I2++) {
- for (I3=ceild(7+2*I2,2);I3<=min(N1,floord(2*7+3*I2,3));I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 10) && (N1 >= 10)) {
- J1 = -2*(7)+3*5 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- for (I3=6;I3<=5;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- J3 = 7-(I2)-(I3) ;
- S1++;
- if (7%6 == 0) {
- for (I3=4*7/6;I3<=floord(13*7/6-1,3);I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if (13*7%18 == 0) {
- I3 = 13*7/18 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*7/6+1,3);I3<=min(N1,5*7/6);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=2*3/2+1;I3<=3*3/2;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if ((9*7-1)%12 == 0) {
- I3 = (9*7-1)/12 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*7+1)%4 == 0) {
- I3 = (3*7+1)/4 ;
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (7%4 == 0) {
- for (I3=2*7/4;I3<=floord(6*7/4-1,2);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if (3*7%4 == 0) {
- I3 = 3*7/4 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*7/4+1;I3<=min(N1,floord(11*7/4,3));I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=2;I2<=6;I2++) {
- for (I3=max(max(1,ceild(7-I2,2)),7-2*I2);I3<=7-I2;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(7-I2+1,ceild(7+2*I2,2));I3<=min(N1,floord(2*7+3*I2,3));I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 6) && (N1 >= 5)) {
- for (I3=2*1+1;I3<=3*1;I3++) {
- J3 = 5-(I2)-(I3) ;
- S1++;
- }
- if ((9*5-1)%12 == 0) {
- I3 = (9*5-1)/12 ;
- J1 = -2*(5)+3*I3 ;
- if ((2*5+J1)%3 == 0) {
- J2 = (2*5+J1)/3 ;
- J3 = 3*5-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*5+1)%4 == 0) {
- I3 = (3*5+1)/4 ;
- J3 = 5-(I2)-(I3) ;
- S1++;
- J3 = -(5)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=max(2,-N1+6);I2<=floord(2*N1-5,2);I2++) {
- for (I3=max(max(1,ceild(5-I2,2)),5-2*I2);I3<=5-I2;I3++) {
- J3 = 5-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(5-I2+1,ceild(5+2*I2,2));I3<=min(N1,floord(2*5+3*I2,3));I3++) {
- J3 = -(5)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=N1-2;I2<=4;I2++) {
- for (I3=max(max(ceild(5-I2,2),5-2*I2),1);I3<=min(5-I2,N1);I3++) {
- J3 = 5-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 4) {
- for (I3=ceild(2*N1+1,3);I3<=N1-1;I3++) {
- J3 = 5-(I2)-(I3) ;
- S1++;
- }
- if (-1%3 == 0) {
- I3 = (3*N1-1)/3 ;
- J1 = -2*(5)+3*I3 ;
- if ((2*5+J1)%3 == 0) {
- J2 = (2*5+J1)/3 ;
- J3 = 3*5-4*J2 ;
- S1++;
- S2++;
- }
- }
- J3 = 5-(I2)-(I3) ;
- S1++;
- J3 = -(5)-2*(I2)+2*I3 ;
- S2++;
- for (I2=2;I2<=4;I2++) {
- for (I3=max(max(ceild(5-I2,2),5-2*I2),1);I3<=min(5-I2,N1);I3++) {
- J3 = 5-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 12) {
- for (I3=ceild(8+2*1,2);I3<=8-2*(1)-1;I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=8-2*(1);I3<=floord(2*8+3*1,3);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*8+3*1+1,3);I3<=min(N1,8-(1));I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if (4%3 == 0) {
- for (I3=4*4/3;I3<=floord(13*4/3-1,3);I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if (13*8%18 == 0) {
- I3 = 13*8/18 ;
- J1 = -2*(8)+3*I3 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*4/3+1,3);I3<=min(N1,5*4/3);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=8-2*(3/2);I3<=floord(8+2*3/2-1,2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(8+2*3/2,2);I3<=floord(2*8+3/2-1,3);I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if ((2*8+3/2)%3 == 0) {
- I3 = (2*8+3/2)/3 ;
- J1 = -2*(8)+3*I3 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*8+3/2+1,3);I3<=8-(3/2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*2;I3<=floord(6*2-1,2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if (3*8%4 == 0) {
- I3 = 3*8/4 ;
- J1 = -2*(8)+3*I3 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*2+1;I3<=min(N1,floord(11*2,3));I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=3;I2<=7;I2++) {
- for (I3=max(max(1,ceild(8-I2,2)),8-2*I2);I3<=8-I2;I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(8-I2+1,ceild(8+2*I2,2));I3<=min(N1,floord(2*8+3*I2,3));I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=8;I2<=N1-4;I2++) {
- for (I3=ceild(8+2*I2,2);I3<=min(N1,floord(2*8+3*I2,3));I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 11) && (N1 >= 11)) {
- for (I3=ceild(8+2*1,2);I3<=8-2*(1)-1;I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=8-2*(1);I3<=floord(2*8+3*1,3);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*8+3*1+1,3);I3<=min(N1,8-(1));I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if (4%3 == 0) {
- for (I3=4*4/3;I3<=floord(13*4/3-1,3);I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if (13*8%18 == 0) {
- I3 = 13*8/18 ;
- J1 = -2*(8)+3*I3 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*4/3+1,3);I3<=min(N1,5*4/3);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=8-2*(3/2);I3<=floord(8+2*3/2-1,2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(8+2*3/2,2);I3<=floord(2*8+3/2-1,3);I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if ((2*8+3/2)%3 == 0) {
- I3 = (2*8+3/2)/3 ;
- J1 = -2*(8)+3*I3 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*8+3/2+1,3);I3<=8-(3/2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*2;I3<=floord(6*2-1,2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if (3*8%4 == 0) {
- I3 = 3*8/4 ;
- J1 = -2*(8)+3*I3 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*2+1;I3<=min(N1,floord(11*2,3));I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=3;I2<=7;I2++) {
- for (I3=max(max(1,ceild(8-I2,2)),8-2*I2);I3<=8-I2;I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(8-I2+1,ceild(8+2*I2,2));I3<=min(N1,floord(2*8+3*I2,3));I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 7) && (N1 >= 6)) {
- for (I3=4*1;I3<=floord(13*1-1,3);I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if (13*6%18 == 0) {
- I3 = 13*6/18 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*1+1,3);I3<=min(N1,5*1);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5%4 == 0) {
- for (I3=2*5/4+1;I3<=3*5/4;I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if ((9*6-1)%12 == 0) {
- I3 = (9*6-1)/12 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*6+1)%4 == 0) {
- I3 = (3*6+1)/4 ;
- J3 = 6-(I2)-(I3) ;
- S1++;
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=2*3/2;I3<=floord(6*3/2-1,2);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if (3*6%4 == 0) {
- I3 = 3*6/4 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*3/2+1;I3<=min(N1,floord(11*3/2,3));I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=2;I2<=N1-3;I2++) {
- for (I3=max(max(1,ceild(6-I2,2)),6-2*I2);I3<=6-I2;I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(6-I2+1,ceild(6+2*I2,2));I3<=min(N1,floord(2*6+3*I2,3));I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-5,2);I2<=5;I2++) {
- for (I3=max(max(ceild(6-I2,2),6-2*I2),1);I3<=min(6-I2,N1);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 5) && (N1 >= 5)) {
- for (I3=4*1;I3<=floord(13*1-1,3);I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if (13*6%18 == 0) {
- I3 = 13*6/18 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*1+1,3);I3<=min(N1,5*1);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5%4 == 0) {
- for (I3=2*5/4+1;I3<=3*5/4;I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- if ((9*6-1)%12 == 0) {
- I3 = (9*6-1)/12 ;
- J1 = -2*(6)+3*I3 ;
- if ((2*6+J1)%3 == 0) {
- J2 = (2*6+J1)/3 ;
- J3 = 3*6-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*6+1)%4 == 0) {
- I3 = (3*6+1)/4 ;
- J3 = 6-(I2)-(I3) ;
- S1++;
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=-N1+7;I2<=N1-3;I2++) {
- for (I3=max(max(1,ceild(6-I2,2)),6-2*I2);I3<=6-I2;I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(6-I2+1,ceild(6+2*I2,2));I3<=min(N1,floord(2*6+3*I2,3));I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-5,2);I2<=5;I2++) {
- for (I3=max(max(ceild(6-I2,2),6-2*I2),1);I3<=min(6-I2,N1);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 4) && (N1 >= 3)) {
- if (4*N1%3 == 0) {
- I1 = 4*N1/3 ;
- if (N1%3 == 0) {
- for (I3=ceild(2*N1,3);I3<=floord(2*N1-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(2*N1+3,6);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 <= 9) && (N1 >= 7)) {
- J1 = -2*(7)+3*5 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- for (I3=6;I3<=5;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- J3 = 7-(I2)-(I3) ;
- S1++;
- if (7%6 == 0) {
- for (I3=4*7/6;I3<=floord(13*7/6-1,3);I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if (13*7%18 == 0) {
- I3 = 13*7/18 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*7/6+1,3);I3<=min(N1,5*7/6);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=2*3/2+1;I3<=3*3/2;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if ((9*7-1)%12 == 0) {
- I3 = (9*7-1)/12 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*7+1)%4 == 0) {
- I3 = (3*7+1)/4 ;
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (7%4 == 0) {
- for (I3=2*7/4;I3<=floord(6*7/4-1,2);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if (3*7%4 == 0) {
- I3 = 3*7/4 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*7/4+1;I3<=min(N1,floord(11*7/4,3));I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=2;I2<=floord(2*N1-7,2);I2++) {
- for (I3=max(max(1,ceild(7-I2,2)),7-2*I2);I3<=7-I2;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(7-I2+1,ceild(7+2*I2,2));I3<=min(N1,floord(2*7+3*I2,3));I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=N1-3;I2<=6;I2++) {
- for (I3=max(max(ceild(7-I2,2),7-2*I2),1);I3<=min(7-I2,N1);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 6) {
- J1 = -2*(7)+3*5 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- for (I3=6;I3<=5;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- J3 = 7-(I2)-(I3) ;
- S1++;
- if (7%6 == 0) {
- for (I3=4*7/6;I3<=floord(13*7/6-1,3);I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if (13*7%18 == 0) {
- I3 = 13*7/18 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*7/6+1,3);I3<=min(N1,5*7/6);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=2*3/2+1;I3<=3*3/2;I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- if ((9*7-1)%12 == 0) {
- I3 = (9*7-1)/12 ;
- J1 = -2*(7)+3*I3 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*7+1)%4 == 0) {
- I3 = (3*7+1)/4 ;
- J3 = 7-(I2)-(I3) ;
- S1++;
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=max(max(1,ceild(7-(2),2)),7-2*(2));I3<=7-(2);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(7-(2)+1,ceild(7+2*2,2));I3<=min(N1,floord(2*7+3*2,3));I3++) {
- J3 = -(7)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=3;I2<=6;I2++) {
- for (I3=max(max(ceild(7-I2,2),7-2*I2),1);I3<=min(7-I2,N1);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 5) {
- J1 = -2*(7)+3*5 ;
- if ((2*7+J1)%3 == 0) {
- J2 = (2*7+J1)/3 ;
- J3 = 3*7-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=2;I2<=5;I2++) {
- for (I3=max(max(ceild(7-I2,2),7-2*I2),1);I3<=min(7-I2,N1);I3++) {
- J3 = 7-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 14) {
- for (I3=ceild(9+2*1,2);I3<=9-2*(1)-1;I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=9-2*(1);I3<=floord(2*9+3*1,3);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*9+3*1+1,3);I3<=min(N1,9-(1));I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (3%2 == 0) {
- for (I3=4*3/2;I3<=floord(13*3/2-1,3);I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (13*9%18 == 0) {
- I3 = 13*9/18 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*3/2+1,3);I3<=min(N1,5*3/2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=9-2*I2;I3<=floord(9+2*I2-1,2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(9+2*I2,2);I3<=floord(2*9+I2-1,3);I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if ((2*9+I2)%3 == 0) {
- I3 = (2*9+I2)/3 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*9+I2+1,3);I3<=9-I2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*2+1;I3<=3*2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if ((9*9-1)%12 == 0) {
- I3 = (9*9-1)/12 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*9+1)%4 == 0) {
- I3 = (3*9+1)/4 ;
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*2+2;I3<=min(N1,floord(11*2+2,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- if (9%4 == 0) {
- for (I3=2*9/4;I3<=floord(6*9/4-1,2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (3*9%4 == 0) {
- I3 = 3*9/4 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*9/4+1;I3<=min(N1,floord(11*9/4,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=8;I2++) {
- for (I3=max(max(1,ceild(9-I2,2)),9-2*I2);I3<=9-I2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(9-I2+1,ceild(9+2*I2,2));I3<=min(N1,floord(2*9+3*I2,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=9;I2<=floord(2*N1-9,2);I2++) {
- for (I3=ceild(9+2*I2,2);I3<=min(N1,floord(2*9+3*I2,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 13) && (N1 >= 13)) {
- for (I3=ceild(9+2*1,2);I3<=9-2*(1)-1;I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=9-2*(1);I3<=floord(2*9+3*1,3);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*9+3*1+1,3);I3<=min(N1,9-(1));I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (3%2 == 0) {
- for (I3=4*3/2;I3<=floord(13*3/2-1,3);I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (13*9%18 == 0) {
- I3 = 13*9/18 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*3/2+1,3);I3<=min(N1,5*3/2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=9-2*I2;I3<=floord(9+2*I2-1,2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(9+2*I2,2);I3<=floord(2*9+I2-1,3);I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if ((2*9+I2)%3 == 0) {
- I3 = (2*9+I2)/3 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*9+I2+1,3);I3<=9-I2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*2+1;I3<=3*2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if ((9*9-1)%12 == 0) {
- I3 = (9*9-1)/12 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*9+1)%4 == 0) {
- I3 = (3*9+1)/4 ;
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*2+2;I3<=min(N1,floord(11*2+2,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- if (9%4 == 0) {
- for (I3=2*9/4;I3<=floord(6*9/4-1,2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (3*9%4 == 0) {
- I3 = 3*9/4 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*9/4+1;I3<=min(N1,floord(11*9/4,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=8;I2++) {
- for (I3=max(max(1,ceild(9-I2,2)),9-2*I2);I3<=9-I2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(9-I2+1,ceild(9+2*I2,2));I3<=min(N1,floord(2*9+3*I2,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 4) && (N1 >= 4)) {
- if ((4*N1+1)%3 == 0) {
- I1 = (4*N1+1)/3 ;
- for (I2=ceild(N1+1,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=10;I1<=min(11,floord(2*N1,3));I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=I1-1;I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 10) && (N1 >= 8)) {
- for (I3=ceild(8+2*1,2);I3<=8-2*(1)-1;I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=8-2*(1);I3<=floord(2*8+3*1,3);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*8+3*1+1,3);I3<=min(N1,8-(1));I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if (4%3 == 0) {
- for (I3=4*4/3;I3<=floord(13*4/3-1,3);I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if (13*8%18 == 0) {
- I3 = 13*8/18 ;
- J1 = -2*(8)+3*I3 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*4/3+1,3);I3<=min(N1,5*4/3);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3%2 == 0) {
- for (I3=8-2*(3/2);I3<=floord(8+2*3/2-1,2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(8+2*3/2,2);I3<=floord(2*8+3/2-1,3);I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if ((2*8+3/2)%3 == 0) {
- I3 = (2*8+3/2)/3 ;
- J1 = -2*(8)+3*I3 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*8+3/2+1,3);I3<=8-(3/2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*2;I3<=floord(6*2-1,2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- if (3*8%4 == 0) {
- I3 = 3*8/4 ;
- J1 = -2*(8)+3*I3 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*2+1;I3<=min(N1,floord(11*2,3));I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=3;I2<=N1-4;I2++) {
- for (I3=max(max(1,ceild(8-I2,2)),8-2*I2);I3<=8-I2;I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(8-I2+1,ceild(8+2*I2,2));I3<=min(N1,floord(2*8+3*I2,3));I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-7,2);I2<=7;I2++) {
- for (I3=max(max(ceild(8-I2,2),8-2*I2),1);I3<=min(8-I2,N1);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 6) {
- for (I3=ceild(8+2*1,2);I3<=8-2*(1)-1;I3++) {
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=8-2*(1);I3<=N1;I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- J3 = -(8)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*N1,3);I3<=floord(2*N1-1,2);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*(8)+3*N1 ;
- if ((2*8+J1)%3 == 0) {
- J2 = (2*8+J1)/3 ;
- J3 = 3*8-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=3;I2<=6;I2++) {
- for (I3=max(max(ceild(8-I2,2),8-2*I2),1);I3<=min(8-I2,N1);I3++) {
- J3 = 8-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 4) {
- for (I3=6-2*(1);I3<=N1;I3++) {
- J3 = -(6)-2*(I2)+2*I3 ;
- S2++;
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- for (I2=2;I2<=4;I2++) {
- for (I3=max(max(ceild(6-I2,2),6-2*I2),1);I3<=min(6-I2,N1);I3++) {
- J3 = 6-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 18) {
- for (I3=ceild(12+2*1,2);I3<=min(12-2*(1)-1,floord(2*12+3*1,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-2*(1);I3<=min(N1,12-(1));I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(12+2*I2,2);I3<=12-2*I2-1;I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-2*I2;I3<=floord(2*12+3*I2,3);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*12+3*I2+1,3);I3<=min(N1,12-I2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*2;I3<=floord(13*2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if (13*12%18 == 0) {
- I3 = 13*12/18 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+1,3);I3<=min(N1,5*2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=12-2*I2;I3<=floord(12+2*I2-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(12+2*I2,2);I3<=floord(2*12+I2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if ((2*12+I2)%3 == 0) {
- I3 = (2*12+I2)/3 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*12+I2+1,3);I3<=12-I2;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (5%2 == 0) {
- for (I3=12-2*(5/2);I3<=floord(12+2*5/2-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(12+2*5/2,2);I3<=floord(2*12+5/2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if ((2*12+5/2)%3 == 0) {
- I3 = (2*12+5/2)/3 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*12+5/2+1,3);I3<=12-(5/2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-(5/2)+1;I3<=min(N1,floord(2*12+3*5/2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (11%4 == 0) {
- for (I3=2*11/4+1;I3<=3*11/4;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if ((9*12-1)%12 == 0) {
- I3 = (9*12-1)/12 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*12+1)%4 == 0) {
- I3 = (3*12+1)/4 ;
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*11/4+2;I3<=min(N1,floord(11*11/4+2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*3;I3<=floord(6*3-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if (3*12%4 == 0) {
- I3 = 3*12/4 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*3+1;I3<=min(N1,floord(11*3,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=4;I2<=11;I2++) {
- for (I3=max(max(1,ceild(12-I2,2)),12-2*I2);I3<=12-I2;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(12-I2+1,ceild(12+2*I2,2));I3<=min(N1,floord(2*12+3*I2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=12;I2<=N1-6;I2++) {
- for (I3=ceild(12+2*I2,2);I3<=min(N1,floord(2*12+3*I2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 17) && (N1 >= 17)) {
- for (I3=ceild(12+2*1,2);I3<=min(12-2*(1)-1,floord(2*12+3*1,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-2*(1);I3<=min(N1,12-(1));I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(12+2*I2,2);I3<=12-2*I2-1;I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-2*I2;I3<=floord(2*12+3*I2,3);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*12+3*I2+1,3);I3<=min(N1,12-I2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*2;I3<=floord(13*2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if (13*12%18 == 0) {
- I3 = 13*12/18 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+1,3);I3<=min(N1,5*2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=12-2*I2;I3<=floord(12+2*I2-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(12+2*I2,2);I3<=floord(2*12+I2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if ((2*12+I2)%3 == 0) {
- I3 = (2*12+I2)/3 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*12+I2+1,3);I3<=12-I2;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (5%2 == 0) {
- for (I3=12-2*(5/2);I3<=floord(12+2*5/2-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(12+2*5/2,2);I3<=floord(2*12+5/2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if ((2*12+5/2)%3 == 0) {
- I3 = (2*12+5/2)/3 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*12+5/2+1,3);I3<=12-(5/2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-(5/2)+1;I3<=min(N1,floord(2*12+3*5/2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (11%4 == 0) {
- for (I3=2*11/4+1;I3<=3*11/4;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if ((9*12-1)%12 == 0) {
- I3 = (9*12-1)/12 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*12+1)%4 == 0) {
- I3 = (3*12+1)/4 ;
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*11/4+2;I3<=min(N1,floord(11*11/4+2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*3;I3<=floord(6*3-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if (3*12%4 == 0) {
- I3 = 3*12/4 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*3+1;I3<=min(N1,floord(11*3,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=4;I2<=11;I2++) {
- for (I3=max(max(1,ceild(12-I2,2)),12-2*I2);I3<=12-I2;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(12-I2+1,ceild(12+2*I2,2));I3<=min(N1,floord(2*12+3*I2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-for (I1=max(10,ceild(2*N1+1,3));I1<=min(11,floord(2*N1+2,3));I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=I1-1;I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 12) && (N1 >= 9)) {
- for (I3=ceild(9+2*1,2);I3<=9-2*(1)-1;I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=9-2*(1);I3<=floord(2*9+3*1,3);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*9+3*1+1,3);I3<=min(N1,9-(1));I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (3%2 == 0) {
- for (I3=4*3/2;I3<=floord(13*3/2-1,3);I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (13*9%18 == 0) {
- I3 = 13*9/18 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*3/2+1,3);I3<=min(N1,5*3/2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(2,-N1+10);I2<=1;I2++) {
- for (I3=9-2*I2;I3<=floord(9+2*I2-1,2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(9+2*I2,2);I3<=floord(2*9+I2-1,3);I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if ((2*9+I2)%3 == 0) {
- I3 = (2*9+I2)/3 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*9+I2+1,3);I3<=9-I2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*2+1;I3<=3*2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if ((9*9-1)%12 == 0) {
- I3 = (9*9-1)/12 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*9+1)%4 == 0) {
- I3 = (3*9+1)/4 ;
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*2+2;I3<=min(N1,floord(11*2+2,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- if (9%4 == 0) {
- for (I3=2*9/4;I3<=floord(6*9/4-1,2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (3*9%4 == 0) {
- I3 = 3*9/4 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*9/4+1;I3<=min(N1,floord(11*9/4,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=floord(2*N1-9,2);I2++) {
- for (I3=max(max(1,ceild(9-I2,2)),9-2*I2);I3<=9-I2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(9-I2+1,ceild(9+2*I2,2));I3<=min(N1,floord(2*9+3*I2,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=N1-4;I2<=8;I2++) {
- for (I3=max(max(ceild(9-I2,2),9-2*I2),1);I3<=min(9-I2,N1);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 8) {
- for (I3=ceild(9+2*1,2);I3<=9-2*(1)-1;I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=9-2*(1);I3<=floord(2*9+3*1,3);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*9+3*1+1,3);I3<=min(N1,9-(1));I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (3%2 == 0) {
- for (I3=4*3/2;I3<=floord(13*3/2-1,3);I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (13*9%18 == 0) {
- I3 = 13*9/18 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*3/2+1,3);I3<=min(N1,5*3/2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*2+1;I3<=3*2;I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if ((9*9-1)%12 == 0) {
- I3 = (9*9-1)/12 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*9+1)%4 == 0) {
- I3 = (3*9+1)/4 ;
- J3 = 9-(I2)-(I3) ;
- S1++;
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*2+2;I3<=min(N1,floord(11*2+2,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- if (9%4 == 0) {
- for (I3=2*9/4;I3<=floord(6*9/4-1,2);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- if (3*9%4 == 0) {
- I3 = 3*9/4 ;
- J1 = -2*(9)+3*I3 ;
- if ((2*9+J1)%3 == 0) {
- J2 = (2*9+J1)/3 ;
- J3 = 3*9-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*9/4+1;I3<=min(N1,floord(11*9/4,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=max(max(1,ceild(9-(3),2)),9-2*(3));I3<=9-(3);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(9-(3)+1,ceild(9+2*3,2));I3<=min(N1,floord(2*9+3*3,3));I3++) {
- J3 = -(9)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=4;I2<=8;I2++) {
- for (I3=max(max(ceild(9-I2,2),9-2*I2),1);I3<=min(9-I2,N1);I3++) {
- J3 = 9-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(8,ceild(4*N1-13,2));I1<=floord(4*N1-4,3);I1++) {
- for (I2=1;I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=min(N1,I1-1);I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 20) {
- for (I3=ceild(13+2*1,2);I3<=min(13-2*(1)-1,floord(2*13+3*1,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*(1);I3<=min(N1,13-(1));I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(13+2*I2,2);I3<=13-2*I2-1;I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*I2;I3<=floord(2*13+3*I2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*13+3*I2+1,3);I3<=min(N1,13-I2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*2+1;I3<=floord(13*2+1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((13*13-1)%18 == 0) {
- I3 = (13*13-1)/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+3,3);I3<=floord(15*2+2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*13+1)%6 == 0) {
- I3 = (5*13+1)/6 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13%6 == 0) {
- for (I3=4*13/6;I3<=floord(13*13/6-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13*13%18 == 0) {
- I3 = 13*13/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*13/6+1,3);I3<=min(N1,5*13/6);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=13-2*I2;I3<=floord(13+2*I2-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(13+2*I2,2);I3<=floord(2*13+I2-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((2*13+I2)%3 == 0) {
- I3 = (2*13+I2)/3 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*13+I2+1,3);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=13-2*I2;I3<=floord(13+2*I2-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(13+2*I2,2);I3<=floord(2*13+I2-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((2*13+I2)%3 == 0) {
- I3 = (2*13+I2)/3 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*13+I2+1,3);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-I2+1;I3<=min(N1,floord(2*13+3*I2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*3+1;I3<=3*3;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((9*13-1)%12 == 0) {
- I3 = (9*13-1)/12 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*13+1)%4 == 0) {
- I3 = (3*13+1)/4 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*3+2;I3<=min(N1,floord(11*3+2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if (13%4 == 0) {
- for (I3=2*13/4;I3<=floord(6*13/4-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (3*13%4 == 0) {
- I3 = 3*13/4 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*13/4+1;I3<=min(N1,floord(11*13/4,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=4;I2<=12;I2++) {
- for (I3=max(max(1,ceild(13-I2,2)),13-2*I2);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(13-I2+1,ceild(13+2*I2,2));I3<=min(N1,floord(2*13+3*I2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=13;I2<=floord(2*N1-13,2);I2++) {
- for (I3=ceild(13+2*I2,2);I3<=min(N1,floord(2*13+3*I2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 19) && (N1 >= 19)) {
- for (I3=ceild(13+2*1,2);I3<=min(13-2*(1)-1,floord(2*13+3*1,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*(1);I3<=min(N1,13-(1));I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(13+2*I2,2);I3<=13-2*I2-1;I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*I2;I3<=floord(2*13+3*I2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*13+3*I2+1,3);I3<=min(N1,13-I2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*2+1;I3<=floord(13*2+1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((13*13-1)%18 == 0) {
- I3 = (13*13-1)/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+3,3);I3<=floord(15*2+2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*13+1)%6 == 0) {
- I3 = (5*13+1)/6 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13%6 == 0) {
- for (I3=4*13/6;I3<=floord(13*13/6-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13*13%18 == 0) {
- I3 = 13*13/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*13/6+1,3);I3<=min(N1,5*13/6);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=13-2*I2;I3<=floord(13+2*I2-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(13+2*I2,2);I3<=floord(2*13+I2-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((2*13+I2)%3 == 0) {
- I3 = (2*13+I2)/3 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*13+I2+1,3);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=13-2*I2;I3<=floord(13+2*I2-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(13+2*I2,2);I3<=floord(2*13+I2-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((2*13+I2)%3 == 0) {
- I3 = (2*13+I2)/3 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*13+I2+1,3);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-I2+1;I3<=min(N1,floord(2*13+3*I2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*3+1;I3<=3*3;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((9*13-1)%12 == 0) {
- I3 = (9*13-1)/12 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*13+1)%4 == 0) {
- I3 = (3*13+1)/4 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*3+2;I3<=min(N1,floord(11*3+2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if (13%4 == 0) {
- for (I3=2*13/4;I3<=floord(6*13/4-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (3*13%4 == 0) {
- I3 = 3*13/4 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*13/4+1;I3<=min(N1,floord(11*13/4,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=4;I2<=12;I2++) {
- for (I3=max(max(1,ceild(13-I2,2)),13-2*I2);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(13-I2+1,ceild(13+2*I2,2));I3<=min(N1,floord(2*13+3*I2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-for (I1=max(10,ceild(2*N1+3,3));I1<=min(floord(6*N1-4,5),11);I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(I1+1,6),I1-N1+1);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=min(N1,I1-1);I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 8) {
- for (I3=ceild(10+2*1,2);I3<=min(10-2*(1)-1,floord(2*10+3*1,3));I3++) {
- J3 = -(10)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=10-2*(1);I3<=min(N1,10-(1));I3++) {
- J3 = 10-(I2)-(I3) ;
- S1++;
- }
- if (5%3 == 0) {
- for (I3=4*5/3;I3<=floord(13*5/3-1,3);I3++) {
- J3 = -(10)-2*(I2)+2*I3 ;
- S2++;
- J3 = 10-(I2)-(I3) ;
- S1++;
- }
- if (13*10%18 == 0) {
- I3 = 13*10/18 ;
- J1 = -2*(10)+3*I3 ;
- if ((2*10+J1)%3 == 0) {
- J2 = (2*10+J1)/3 ;
- J3 = 3*10-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*5/3+1,3);I3<=min(N1,5*5/3);I3++) {
- J3 = 10-(I2)-(I3) ;
- S1++;
- J3 = -(10)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=10-2*(2);I3<=floord(10+2*2-1,2);I3++) {
- J3 = 10-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(10+2*2,2);I3<=floord(2*10+2-1,3);I3++) {
- J3 = -(10)-2*(I2)+2*I3 ;
- S2++;
- J3 = 10-(I2)-(I3) ;
- S1++;
- }
- if ((2*10+2)%3 == 0) {
- I3 = (2*10+2)/3 ;
- J1 = -2*(10)+3*I3 ;
- if ((2*10+J1)%3 == 0) {
- J2 = (2*10+J1)/3 ;
- J3 = 3*10-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*10+2+1,3);I3<=N1;I3++) {
- J3 = 10-(I2)-(I3) ;
- S1++;
- J3 = -(10)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=max(max(1,ceild(10-(3),2)),10-2*(3));I3<=10-(3);I3++) {
- J3 = 10-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(10-(3)+1,ceild(10+2*3,2));I3<=min(N1,floord(2*10+3*3,3));I3++) {
- J3 = -(10)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=4;I2<=8;I2++) {
- for (I3=max(max(ceild(10-I2,2),10-2*I2),1);I3<=min(10-I2,N1);I3++) {
- J3 = 10-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(8,ceild(4*N1-3,3));I1<=floord(6*N1,5);I1++) {
- for (I2=1;I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 8) {
- for (I3=ceild(11+2*1,2);I3<=min(N1,floord(2*11+3*1,3));I3++) {
- J3 = -(11)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*(2)+3*N1,2);I3<=floord(3*2+3*N1-2,4);I3++) {
- J3 = 11-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*2+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -(11)-2*(I2)+2*I3 ;
- S2++;
- J3 = 11-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*(11)+3*N1 ;
- if ((2*11+J1)%3 == 0) {
- J2 = (2*11+J1)/3 ;
- J3 = 3*11-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=3;I2<=8;I2++) {
- for (I3=max(max(ceild(11-I2,2),11-2*I2),1);I3<=min(11-I2,N1);I3++) {
- J3 = 11-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=14;I1<=min(19,floord(2*N1,3));I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=floord(15*I2+2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*I1+1)%6 == 0) {
- I3 = (5*I1+1)/6 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+3,6);I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=I1-1;I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 16) && (N1 >= 11)) {
- for (I3=ceild(12+2*1,2);I3<=min(12-2*(1)-1,floord(2*12+3*1,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-2*(1);I3<=min(N1,12-(1));I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(12+2*I2,2);I3<=12-2*I2-1;I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-2*I2;I3<=floord(2*12+3*I2,3);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*12+3*I2+1,3);I3<=min(N1,12-I2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*2;I3<=floord(13*2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if (13*12%18 == 0) {
- I3 = 13*12/18 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+1,3);I3<=min(N1,5*2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=max(3,-N1+13);I2<=2;I2++) {
- for (I3=12-2*I2;I3<=floord(12+2*I2-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(12+2*I2,2);I3<=floord(2*12+I2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if ((2*12+I2)%3 == 0) {
- I3 = (2*12+I2)/3 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*12+I2+1,3);I3<=12-I2;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (5%2 == 0) {
- for (I3=12-2*(5/2);I3<=floord(12+2*5/2-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(12+2*5/2,2);I3<=floord(2*12+5/2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if ((2*12+5/2)%3 == 0) {
- I3 = (2*12+5/2)/3 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*12+5/2+1,3);I3<=12-(5/2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-(5/2)+1;I3<=min(N1,floord(2*12+3*5/2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (11%4 == 0) {
- for (I3=2*11/4+1;I3<=3*11/4;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if ((9*12-1)%12 == 0) {
- I3 = (9*12-1)/12 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*12+1)%4 == 0) {
- I3 = (3*12+1)/4 ;
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*11/4+2;I3<=min(N1,floord(11*11/4+2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*3;I3<=floord(6*3-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if (3*12%4 == 0) {
- I3 = 3*12/4 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*3+1;I3<=min(N1,floord(11*3,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=4;I2<=N1-6;I2++) {
- for (I3=max(max(1,ceild(12-I2,2)),12-2*I2);I3<=12-I2;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(12-I2+1,ceild(12+2*I2,2));I3<=min(N1,floord(2*12+3*I2,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-11,2);I2<=min(N1,11);I2++) {
- for (I3=max(max(ceild(12-I2,2),12-2*I2),1);I3<=min(12-I2,N1);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(max(10,ceild(12*N1-39,7)),ceild(6*N1-3,5));I1<=floord(4*N1-5,3);I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 7) && (N1 >= 7)) {
- if ((4*N1-1)%3 == 0) {
- I1 = (4*N1-1)/3 ;
- for (I2=1;I2<=floord(4*N1-4,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-1)%18 == 0) {
- I2 = (4*N1-1)/18 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+1,9);I2<=floord(4*N1-7,12);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%3 == 0) {
- I2 = (N1-1)/3 ;
- for (I3=ceild(2*N1+1,3);I3<=N1-1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (-1%3 == 0) {
- I3 = (3*N1-1)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=ceild(N1+2,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=max(N1+3,ceild(3*N1-1,2));I1<=floord(18*N1+5,13);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=-2*I1+3*N1+1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=20;I1<=floord(2*N1,3);I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=floord(15*I2+2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*I1+1)%6 == 0) {
- I3 = (5*I1+1)/6 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+3,6);I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=I1-1;I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-for (I1=max(14,ceild(2*N1+1,3));I1<=min(19,floord(2*N1+2,3));I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=floord(15*I2+2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*I1+1)%6 == 0) {
- I3 = (5*I1+1)/6 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+3,6);I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=I1-1;I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-if ((N1 <= 18) && (N1 >= 12)) {
- for (I3=ceild(13+2*1,2);I3<=min(13-2*(1)-1,floord(2*13+3*1,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*(1);I3<=min(N1,13-(1));I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(13+2*I2,2);I3<=13-2*I2-1;I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*I2;I3<=floord(2*13+3*I2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*13+3*I2+1,3);I3<=min(N1,13-I2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*2+1;I3<=floord(13*2+1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((13*13-1)%18 == 0) {
- I3 = (13*13-1)/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+3,3);I3<=floord(15*2+2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*13+1)%6 == 0) {
- I3 = (5*13+1)/6 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13%6 == 0) {
- for (I3=4*13/6;I3<=floord(13*13/6-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13*13%18 == 0) {
- I3 = 13*13/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*13/6+1,3);I3<=min(N1,5*13/6);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(3,-N1+14);I2<=2;I2++) {
- for (I3=13-2*I2;I3<=floord(13+2*I2-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(13+2*I2,2);I3<=floord(2*13+I2-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((2*13+I2)%3 == 0) {
- I3 = (2*13+I2)/3 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*13+I2+1,3);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=13-2*I2;I3<=floord(13+2*I2-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(13+2*I2,2);I3<=floord(2*13+I2-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((2*13+I2)%3 == 0) {
- I3 = (2*13+I2)/3 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*13+I2+1,3);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-I2+1;I3<=min(N1,floord(2*13+3*I2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*3+1;I3<=3*3;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((9*13-1)%12 == 0) {
- I3 = (9*13-1)/12 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*13+1)%4 == 0) {
- I3 = (3*13+1)/4 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*3+2;I3<=min(N1,floord(11*3+2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if (13%4 == 0) {
- for (I3=2*13/4;I3<=floord(6*13/4-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (3*13%4 == 0) {
- I3 = 3*13/4 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*13/4+1;I3<=min(N1,floord(11*13/4,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=4;I2<=floord(2*N1-13,2);I2++) {
- for (I3=max(max(1,ceild(13-I2,2)),13-2*I2);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(13-I2+1,ceild(13+2*I2,2));I3<=min(N1,floord(2*13+3*I2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=N1-6;I2<=min(N1,12);I2++) {
- for (I3=max(max(ceild(13-I2,2),13-2*I2),1);I3<=min(13-I2,N1);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 >= 12) && (N1 <= 11)) {
- for (I3=ceild(13+2*1,2);I3<=min(13-2*(1)-1,floord(2*13+3*1,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*(1);I3<=min(N1,13-(1));I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(13+2*I2,2);I3<=13-2*I2-1;I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*I2;I3<=floord(2*13+3*I2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*13+3*I2+1,3);I3<=min(N1,13-I2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*2+1;I3<=floord(13*2+1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((13*13-1)%18 == 0) {
- I3 = (13*13-1)/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+3,3);I3<=floord(15*2+2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*13+1)%6 == 0) {
- I3 = (5*13+1)/6 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13%6 == 0) {
- for (I3=4*13/6;I3<=floord(13*13/6-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13*13%18 == 0) {
- I3 = 13*13/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*13/6+1,3);I3<=min(N1,5*13/6);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=-N1+14;I2<=2;I2++) {
- for (I3=13-2*I2;I3<=floord(13+2*I2-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(13+2*I2,2);I3<=floord(2*13+I2-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((2*13+I2)%3 == 0) {
- I3 = (2*13+I2)/3 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*13+I2+1,3);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-I2+1;I3<=min(N1,floord(2*13+3*I2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*3+1;I3<=3*3;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((9*13-1)%12 == 0) {
- I3 = (9*13-1)/12 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*13+1)%4 == 0) {
- I3 = (3*13+1)/4 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*3+2;I3<=min(N1,floord(11*3+2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if (13%4 == 0) {
- for (I3=2*13/4;I3<=floord(6*13/4-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (3*13%4 == 0) {
- I3 = 3*13/4 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*13/4+1;I3<=min(N1,floord(11*13/4,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=4;I2<=floord(2*N1-13,2);I2++) {
- for (I3=max(max(1,ceild(13-I2,2)),13-2*I2);I3<=13-I2;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(13-I2+1,ceild(13+2*I2,2));I3<=min(N1,floord(2*13+3*I2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=N1-6;I2<=N1;I2++) {
- for (I3=max(max(ceild(13-I2,2),13-2*I2),1);I3<=min(13-I2,N1);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 11) {
- for (I3=ceild(13+2*1,2);I3<=min(13-2*(1)-1,floord(2*13+3*1,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*(1);I3<=min(N1,13-(1));I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(13+2*I2,2);I3<=13-2*I2-1;I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*I2;I3<=floord(2*13+3*I2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*13+3*I2+1,3);I3<=min(N1,13-I2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*2+1;I3<=floord(13*2+1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((13*13-1)%18 == 0) {
- I3 = (13*13-1)/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+3,3);I3<=floord(15*2+2,3);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*13+1)%6 == 0) {
- I3 = (5*13+1)/6 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13%6 == 0) {
- for (I3=4*13/6;I3<=floord(13*13/6-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13*13%18 == 0) {
- I3 = 13*13/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*13/6+1,3);I3<=min(N1,5*13/6);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*3+1;I3<=3*3;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((9*13-1)%12 == 0) {
- I3 = (9*13-1)/12 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*13+1)%4 == 0) {
- I3 = (3*13+1)/4 ;
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*3+2;I3<=min(N1,floord(11*3+2,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if (13%4 == 0) {
- for (I3=2*13/4;I3<=floord(6*13/4-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (3*13%4 == 0) {
- I3 = 3*13/4 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*13/4+1;I3<=min(N1,floord(11*13/4,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=max(max(1,ceild(13-(4),2)),13-2*(4));I3<=13-(4);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(13-(4)+1,ceild(13+2*4,2));I3<=min(N1,floord(2*13+3*4,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=5;I2<=11;I2++) {
- for (I3=max(max(ceild(13-I2,2),13-2*I2),1);I3<=min(13-I2,N1);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 >= 9) && (N1 <= 10)) {
- if ((4*N1-4)%3 == 0) {
- I1 = (4*N1-4)/3 ;
- for (I2=1;I2<=floord(4*N1-7,27);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(4*N1-4,27);I2<=floord(4*N1-7,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((2*N1-2)%9 == 0) {
- I2 = (2*N1-2)/9 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%3 == 0) {
- I2 = (N1-1)/3 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-1,12);I2<=floord(N1+2,3);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+7,6);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 == 11) {
- for (I3=ceild(14+2*1,2);I3<=min(N1,floord(2*14+3*1,3));I3++) {
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(14+2*I2,2);I3<=14-2*I2-1;I3++) {
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=14-2*I2;I3<=N1;I3++) {
- J3 = 14-(I2)-(I3) ;
- S1++;
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=ceild(9*2,2);I3<=5*2-1;I3++) {
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*14%7 == 0) {
- I3 = 5*14/7 ;
- J1 = -2*(14)+3*I3 ;
- if ((2*14+J1)%3 == 0) {
- J2 = (2*14+J1)/3 ;
- J3 = 3*14-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*2+1,3);I3<=N1;I3++) {
- J3 = 14-(I2)-(I3) ;
- S1++;
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- }
- if (7%3 == 0) {
- for (I3=4*7/3;I3<=floord(13*7/3-1,3);I3++) {
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- J3 = 14-(I2)-(I3) ;
- S1++;
- }
- if (13*14%18 == 0) {
- I3 = 13*14/18 ;
- J1 = -2*(14)+3*I3 ;
- if ((2*14+J1)%3 == 0) {
- J2 = (2*14+J1)/3 ;
- J3 = 3*14-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*7/3+1,3);I3<=min(N1,5*7/3);I3++) {
- J3 = 14-(I2)-(I3) ;
- S1++;
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=14-2*(3);I3<=floord(14+2*3-1,2);I3++) {
- J3 = 14-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(14+2*3,2);I3<=floord(2*14+3-1,3);I3++) {
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- J3 = 14-(I2)-(I3) ;
- S1++;
- }
- if ((2*14+3)%3 == 0) {
- I3 = (2*14+3)/3 ;
- J1 = -2*(14)+3*I3 ;
- if ((2*14+J1)%3 == 0) {
- J2 = (2*14+J1)/3 ;
- J3 = 3*14-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*14+3+1,3);I3<=N1;I3++) {
- J3 = 14-(I2)-(I3) ;
- S1++;
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=max(max(1,ceild(14-(4),2)),14-2*(4));I3<=14-(4);I3++) {
- J3 = 14-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(14-(4)+1,ceild(14+2*4,2));I3<=min(N1,floord(2*14+3*4,3));I3++) {
- J3 = -(14)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=5;I2<=11;I2++) {
- for (I3=max(max(ceild(14-I2,2),14-2*I2),1);I3<=min(14-I2,N1);I3++) {
- J3 = 14-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 10) {
- for (I3=ceild(13+2*1,2);I3<=min(N1,floord(2*13+3*1,3));I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(13+2*I2,2);I3<=13-2*I2-1;I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=13-2*I2;I3<=N1;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=4*2+1;I3<=floord(13*2+1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((13*13-1)%18 == 0) {
- I3 = (13*13-1)/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+3,3);I3<=N1;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- if (13%6 == 0) {
- for (I3=4*13/6;I3<=floord(13*13/6-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (13*13%18 == 0) {
- I3 = 13*13/18 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*13/6+1,3);I3<=min(N1,5*13/6);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=13-2*I2;I3<=floord(13+2*I2-1,2);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(13+2*I2,2);I3<=floord(2*13+I2-1,3);I3++) {
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if ((2*13+I2)%3 == 0) {
- I3 = (2*13+I2)/3 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*13+I2+1,3);I3<=N1;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=ceild(2*N1+1,3);I3<=N1-1;I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- if (-1%3 == 0) {
- I3 = (3*N1-1)/3 ;
- J1 = -2*(13)+3*I3 ;
- if ((2*13+J1)%3 == 0) {
- J2 = (2*13+J1)/3 ;
- J3 = 3*13-4*J2 ;
- S1++;
- S2++;
- }
- }
- J3 = 13-(I2)-(I3) ;
- S1++;
- J3 = -(13)-2*(I2)+2*I3 ;
- S2++;
- for (I2=4;I2<=10;I2++) {
- for (I3=max(max(ceild(13-I2,2),13-2*I2),1);I3<=min(13-I2,N1);I3++) {
- J3 = 13-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(20,ceild(2*N1+1,3));I1<=floord(2*N1+2,3);I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=floord(15*I2+2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*I1+1)%6 == 0) {
- I3 = (5*I1+1)/6 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+3,6);I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=I1-1;I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-for (I1=max(14,ceild(2*N1+3,3));I1<=min(min(N1+2,19),floord(6*N1-4,5));I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=floord(15*I2+2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*I1+1)%6 == 0) {
- I3 = (5*I1+1)/6 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(I1+1,6),I1-N1+1);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+3,6);I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=min(N1,I1-1);I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(10,ceild(6*N1+1,5));I1<=min(N1+2,floord(9*N1-3,7));I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(-2*I1+3*N1-1,3);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 15) {
- for (I3=ceild(18+2*1,2);I3<=min(N1,floord(2*18+3*1,3));I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(18+2*I2,2);I3<=min(18-2*I2-1,floord(2*18+3*I2,3));I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=18-2*I2;I3<=min(N1,18-I2);I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=ceild(18+2*2,2);I3<=18-2*(2)-1;I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=18-2*(2);I3<=floord(2*18+3*2,3);I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*18+3*2+1,3);I3<=min(N1,18-(2));I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- if (18%7 == 0) {
- for (I3=ceild(9*18/7,2);I3<=5*18/7-1;I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*18%7 == 0) {
- I3 = 5*18/7 ;
- J1 = -2*(18)+3*I3 ;
- if ((2*18+J1)%3 == 0) {
- J2 = (2*18+J1)/3 ;
- J3 = 3*18-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*18/7+1,3);I3<=floord(17*18/7,3);I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*18/7+1,3);I3<=min(N1,6*18/7);I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*3;I3<=floord(13*3-1,3);I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- if (13*18%18 == 0) {
- I3 = 13*18/18 ;
- J1 = -2*(18)+3*I3 ;
- if ((2*18+J1)%3 == 0) {
- J2 = (2*18+J1)/3 ;
- J3 = 3*18-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*3+1,3);I3<=min(N1,5*3);I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=18-2*(4);I3<=floord(18+2*4-1,2);I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(18+2*4,2);I3<=floord(2*18+4-1,3);I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- if ((2*18+4)%3 == 0) {
- I3 = (2*18+4)/3 ;
- J1 = -2*(18)+3*I3 ;
- if ((2*18+J1)%3 == 0) {
- J2 = (2*18+J1)/3 ;
- J3 = 3*18-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*18+4+1,3);I3<=18-(4);I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=18-(4)+1;I3<=min(N1,floord(2*18+3*4,3));I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- if (17%4 == 0) {
- for (I3=2*17/4+1;I3<=3*17/4;I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- if ((9*18-1)%12 == 0) {
- I3 = (9*18-1)/12 ;
- J1 = -2*(18)+3*I3 ;
- if ((2*18+J1)%3 == 0) {
- J2 = (2*18+J1)/3 ;
- J3 = 3*18-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*18+1)%4 == 0) {
- I3 = (3*18+1)/4 ;
- J3 = 18-(I2)-(I3) ;
- S1++;
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*17/4+2;I3<=min(N1,floord(11*17/4+2,3));I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (9%2 == 0) {
- for (I3=2*9/2;I3<=floord(6*9/2-1,2);I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- if (3*18%4 == 0) {
- I3 = 3*18/4 ;
- J1 = -2*(18)+3*I3 ;
- if ((2*18+J1)%3 == 0) {
- J2 = (2*18+J1)/3 ;
- J3 = 3*18-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*9/2+1;I3<=min(N1,floord(11*9/2,3));I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=5;I2<=6;I2++) {
- for (I3=max(max(1,ceild(18-I2,2)),18-2*I2);I3<=18-I2;I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(18-I2+1,ceild(18+2*I2,2));I3<=min(N1,floord(2*18+3*I2,3));I3++) {
- J3 = -(18)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=7;I2<=15;I2++) {
- for (I3=max(max(ceild(18-I2,2),18-2*I2),1);I3<=min(18-I2,N1);I3++) {
- J3 = 18-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 16) {
- for (I3=ceild(19+2*1,2);I3<=min(N1,floord(2*19+3*1,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(19+2*2,2);I3<=min(19-2*(2)-1,floord(2*19+3*2,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=19-2*(2);I3<=min(N1,19-(2));I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=ceild(19+2*I2,2);I3<=19-2*I2-1;I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=19-2*I2;I3<=floord(2*19+3*I2,3);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*19+3*I2+1,3);I3<=min(N1,19-I2);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- }
- if (19%7 == 0) {
- for (I3=ceild(9*19/7,2);I3<=5*19/7-1;I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*19%7 == 0) {
- I3 = 5*19/7 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*19/7+1,3);I3<=floord(17*19/7,3);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*19/7+1,3);I3<=min(N1,6*19/7);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=4*3+1;I3<=floord(13*3+1,3);I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if ((13*19-1)%18 == 0) {
- I3 = (13*19-1)/18 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*3+3,3);I3<=floord(15*3+2,3);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*19+1)%6 == 0) {
- I3 = (5*19+1)/6 ;
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if (19%6 == 0) {
- for (I3=4*19/6;I3<=floord(13*19/6-1,3);I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if (13*19%18 == 0) {
- I3 = 13*19/18 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*19/6+1,3);I3<=min(N1,5*19/6);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=19-2*(4);I3<=floord(19+2*4-1,2);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(19+2*4,2);I3<=floord(2*19+4-1,3);I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if ((2*19+4)%3 == 0) {
- I3 = (2*19+4)/3 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*19+4+1,3);I3<=19-(4);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=19-(4)+1;I3<=min(N1,floord(2*19+3*4,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- if (9%2 == 0) {
- for (I3=2*9/2+1;I3<=3*9/2;I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if ((9*19-1)%12 == 0) {
- I3 = (9*19-1)/12 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*19+1)%4 == 0) {
- I3 = (3*19+1)/4 ;
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*9/2+2;I3<=min(N1,floord(11*9/2+2,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (19%4 == 0) {
- for (I3=2*19/4;I3<=floord(6*19/4-1,2);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if (3*19%4 == 0) {
- I3 = 3*19/4 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*19/4+1;I3<=min(N1,floord(11*19/4,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=5;I2<=6;I2++) {
- for (I3=max(max(1,ceild(19-I2,2)),19-2*I2);I3<=19-I2;I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(19-I2+1,ceild(19+2*I2,2));I3<=min(N1,floord(2*19+3*I2,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=7;I2<=16;I2++) {
- for (I3=max(max(ceild(19-I2,2),19-2*I2),1);I3<=min(19-I2,N1);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 >= 17) && (N1 <= 16)) {
- if ((4*N1-5)%3 == 0) {
- I1 = (4*N1-5)/3 ;
- for (I2=1;I2<=floord(N1-8,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1-5,6);I2<=floord(4*N1-8,27);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(4*N1-5,27);I2<=floord(N1+7,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(4*N1-2,21);I2<=floord(4*N1-11,18);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%18 == 0) {
- I2 = (4*N1-5)/18 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,9);I2<=floord(N1-5,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-2)%3 == 0) {
- I2 = (N1-2)/3 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%12 == 0) {
- I2 = (4*N1-5)/12 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,6);I2<=floord(2*N1+5,6);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+4,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 == 9) {
- for (I3=ceild(12+2*1,2);I3<=min(N1,floord(2*12+3*1,3));I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(12+2*I2,2);I3<=12-2*I2-1;I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=12-2*I2;I3<=N1;I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=4*2;I3<=floord(13*2-1,3);I3++) {
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- if (13*12%18 == 0) {
- I3 = 13*12/18 ;
- J1 = -2*(12)+3*I3 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*2+1,3);I3<=min(N1,5*2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- J3 = -(12)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*N1,3);I3<=floord(2*N1-1,2);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*(12)+3*N1 ;
- if ((2*12+J1)%3 == 0) {
- J2 = (2*12+J1)/3 ;
- J3 = 3*12-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=4;I2<=9;I2++) {
- for (I3=max(max(ceild(12-I2,2),12-2*I2),1);I3<=min(12-I2,N1);I3++) {
- J3 = 12-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(20,ceild(2*N1+3,3));I1<=N1+2;I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=floord(15*I2+2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*I1+1)%6 == 0) {
- I3 = (5*I1+1)/6 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+3,6);I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=min(N1,I1-1);I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(14,ceild(6*N1-3,5));I1<=N1+2;I1++) {
- for (I2=1;I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=floord(15*I2+2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*I1+1)%6 == 0) {
- I3 = (5*I1+1)/6 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=N1+3;I1<=floord(6*N1-4,5);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=floord(15*I2+2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*I1+1)%6 == 0) {
- I3 = (5*I1+1)/6 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(I1+1,6),I1-N1+1);I2<=floord(I1+2,6);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+3,6);I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 16) {
- for (I3=ceild(20+2*1,2);I3<=min(N1,floord(2*20+3*1,3));I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(20+2*2,2);I3<=min(20-2*(2)-1,floord(2*20+3*2,3));I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=20-2*(2);I3<=min(N1,20-(2));I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=ceild(20+2*I2,2);I3<=20-2*I2-1;I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=20-2*I2;I3<=floord(2*20+3*I2,3);I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*20+3*I2+1,3);I3<=min(N1,20-I2);I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=ceild(20+2*I2,2);I3<=20-2*I2-1;I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=20-2*I2;I3<=N1;I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (20%7 == 0) {
- for (I3=ceild(9*20/7,2);I3<=5*20/7-1;I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*20%7 == 0) {
- I3 = 5*20/7 ;
- J1 = -2*(20)+3*I3 ;
- if ((2*20+J1)%3 == 0) {
- J2 = (2*20+J1)/3 ;
- J3 = 3*20-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*20/7+1,3);I3<=N1;I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=ceild(20+2*3,2);I3<=20-2*(3)-1;I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=20-2*(3);I3<=floord(2*20+3-1,3);I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- J3 = 20-(I2)-(I3) ;
- S1++;
- }
- if ((2*20+3)%3 == 0) {
- I3 = (2*20+3)/3 ;
- J1 = -2*(20)+3*I3 ;
- if ((2*20+J1)%3 == 0) {
- J2 = (2*20+J1)/3 ;
- J3 = 3*20-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*20+3+1,3);I3<=N1;I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- if (10%3 == 0) {
- for (I3=4*10/3;I3<=floord(13*10/3-1,3);I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- J3 = 20-(I2)-(I3) ;
- S1++;
- }
- if (13*20%18 == 0) {
- I3 = 13*20/18 ;
- J1 = -2*(20)+3*I3 ;
- if ((2*20+J1)%3 == 0) {
- J2 = (2*20+J1)/3 ;
- J3 = 3*20-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*10/3+1,3);I3<=min(N1,5*10/3);I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=20-2*(4);I3<=floord(20+2*4-1,2);I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(20+2*4,2);I3<=floord(2*20+4-1,3);I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- J3 = 20-(I2)-(I3) ;
- S1++;
- }
- if ((2*20+4)%3 == 0) {
- I3 = (2*20+4)/3 ;
- J1 = -2*(20)+3*I3 ;
- if ((2*20+J1)%3 == 0) {
- J2 = (2*20+J1)/3 ;
- J3 = 3*20-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*20+4+1,3);I3<=N1;I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=2*5;I3<=floord(6*5-1,2);I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- }
- if (3*20%4 == 0) {
- I3 = 3*20/4 ;
- J1 = -2*(20)+3*I3 ;
- if ((2*20+J1)%3 == 0) {
- J2 = (2*20+J1)/3 ;
- J3 = 3*20-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*5+1;I3<=min(N1,floord(11*5,3));I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=max(max(1,ceild(20-(6),2)),20-2*(6));I3<=20-(6);I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(20-(6)+1,ceild(20+2*6,2));I3<=min(N1,floord(2*20+3*6,3));I3++) {
- J3 = -(20)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=7;I2<=16;I2++) {
- for (I3=max(max(ceild(20-I2,2),20-2*I2),1);I3<=min(20-I2,N1);I3++) {
- J3 = 20-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 12) {
- for (I3=ceild(15+2*1,2);I3<=min(N1,floord(2*15+3*1,3));I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(15+2*I2,2);I3<=min(15-2*I2-1,floord(2*15+3*I2,3));I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=15-2*I2;I3<=min(N1,15-I2);I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- }
- if (5%3 == 0) {
- for (I3=ceild(15+2*5/3,2);I3<=15-2*(5/3)-1;I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=15-2*(5/3);I3<=floord(2*15+3*5/3,3);I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*15+3*5/3+1,3);I3<=min(N1,15-(5/3));I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=ceild(15+2*2,2);I3<=15-2*(2)-1;I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=15-2*(2);I3<=N1;I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- if (15%7 == 0) {
- for (I3=ceild(9*15/7,2);I3<=5*15/7-1;I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*15%7 == 0) {
- I3 = 5*15/7 ;
- J1 = -2*(15)+3*I3 ;
- if ((2*15+J1)%3 == 0) {
- J2 = (2*15+J1)/3 ;
- J3 = 3*15-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*15/7+1,3);I3<=N1;I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (5%2 == 0) {
- for (I3=4*5/2;I3<=floord(13*5/2-1,3);I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- if (13*15%18 == 0) {
- I3 = 13*15/18 ;
- J1 = -2*(15)+3*I3 ;
- if ((2*15+J1)%3 == 0) {
- J2 = (2*15+J1)/3 ;
- J3 = 3*15-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*5/2+1,3);I3<=min(N1,5*5/2);I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=15-2*(3);I3<=floord(15+2*3-1,2);I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(15+2*3,2);I3<=floord(2*15+3-1,3);I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- if ((2*15+3)%3 == 0) {
- I3 = (2*15+3)/3 ;
- J1 = -2*(15)+3*I3 ;
- if ((2*15+J1)%3 == 0) {
- J2 = (2*15+J1)/3 ;
- J3 = 3*15-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*15+3+1,3);I3<=N1;I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=max(max(1,ceild(15-(4),2)),15-2*(4));I3<=15-(4);I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(15-(4)+1,ceild(15+2*4,2));I3<=min(N1,floord(2*15+3*4,3));I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=5;I2<=12;I2++) {
- for (I3=max(max(ceild(15-I2,2),15-2*I2),1);I3<=min(15-I2,N1);I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 15) && (N1 >= 14)) {
- if ((4*N1-5)%3 == 0) {
- I1 = (4*N1-5)/3 ;
- for (I2=1;I2<=floord(N1-8,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1-5,6);I2<=floord(4*N1-8,27);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(4*N1-5,27);I2<=min(floord(4*N1-8,21),floord(N1+7,9));I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((4*N1-5)%18 == 0) {
- I2 = (4*N1-5)/18 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,9);I2<=floord(N1-5,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-2)%3 == 0) {
- I2 = (N1-2)/3 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%12 == 0) {
- I2 = (4*N1-5)/12 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,6);I2<=floord(2*N1+5,6);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+4,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 == 13) {
- for (I3=ceild(16+2*1,2);I3<=min(N1,floord(2*16+3*1,3));I3++) {
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=2;I2<=1;I2++) {
- for (I3=ceild(16+2*I2,2);I3<=min(16-2*I2-1,floord(2*16+3*I2,3));I3++) {
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=16-2*I2;I3<=min(N1,16-I2);I3++) {
- J3 = 16-(I2)-(I3) ;
- S1++;
- }
- }
- for (I3=ceild(16+2*2,2);I3<=16-2*(2)-1;I3++) {
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=16-2*(2);I3<=floord(2*16+3*2,3);I3++) {
- J3 = 16-(I2)-(I3) ;
- S1++;
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*16+3*2+1,3);I3<=min(N1,16-(2));I3++) {
- J3 = 16-(I2)-(I3) ;
- S1++;
- }
- if (8%3 == 0) {
- for (I3=4*8/3;I3<=floord(13*8/3-1,3);I3++) {
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- J3 = 16-(I2)-(I3) ;
- S1++;
- }
- if (13*16%18 == 0) {
- I3 = 13*16/18 ;
- J1 = -2*(16)+3*I3 ;
- if ((2*16+J1)%3 == 0) {
- J2 = (2*16+J1)/3 ;
- J3 = 3*16-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*8/3+1,3);I3<=min(N1,5*8/3);I3++) {
- J3 = 16-(I2)-(I3) ;
- S1++;
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=16-2*(3);I3<=floord(16+2*3-1,2);I3++) {
- J3 = 16-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(16+2*3,2);I3<=floord(2*16+3-1,3);I3++) {
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- J3 = 16-(I2)-(I3) ;
- S1++;
- }
- if ((2*16+3)%3 == 0) {
- I3 = (2*16+3)/3 ;
- J1 = -2*(16)+3*I3 ;
- if ((2*16+J1)%3 == 0) {
- J2 = (2*16+J1)/3 ;
- J3 = 3*16-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*16+3+1,3);I3<=N1;I3++) {
- J3 = 16-(I2)-(I3) ;
- S1++;
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=2*4;I3<=floord(6*4-1,2);I3++) {
- J3 = 16-(I2)-(I3) ;
- S1++;
- }
- if (3*16%4 == 0) {
- I3 = 3*16/4 ;
- J1 = -2*(16)+3*I3 ;
- if ((2*16+J1)%3 == 0) {
- J2 = (2*16+J1)/3 ;
- J3 = 3*16-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*4+1;I3<=min(N1,floord(11*4,3));I3++) {
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=max(max(1,ceild(16-(5),2)),16-2*(5));I3<=16-(5);I3++) {
- J3 = 16-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(16-(5)+1,ceild(16+2*5,2));I3<=min(N1,floord(2*16+3*5,3));I3++) {
- J3 = -(16)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=6;I2<=13;I2++) {
- for (I3=max(max(ceild(16-I2,2),16-2*I2),1);I3<=min(16-I2,N1);I3++) {
- J3 = 16-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(max(N1+3,20),ceild(6*N1-3,5));I1<=floord(6*N1-1,5);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=floord(15*I2+2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if ((5*I1+1)%6 == 0) {
- I3 = (5*I1+1)/6 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 14) && (N1 >= 14)) {
- if ((4*N1-4)%3 == 0) {
- I1 = (4*N1-4)/3 ;
- for (I2=1;I2<=floord(N1-7,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1-4,6);I2<=floord(4*N1-7,27);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(4*N1-4,27);I2<=floord(N1+5,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((4*N1-4)%21 == 0) {
- I2 = (4*N1-4)/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((2*N1-2)%9 == 0) {
- I2 = (2*N1-2)/9 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-1,18);I2<=floord(N1-4,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%3 == 0) {
- I2 = (N1-1)/3 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-1,12);I2<=floord(N1+2,3);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+7,6);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 == 15) {
- for (I3=ceild(19+2*1,2);I3<=min(N1,floord(2*19+3*1,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(19+2*2,2);I3<=min(19-2*(2)-1,floord(2*19+3*2,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=19-2*(2);I3<=min(N1,19-(2));I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=ceild(19+2*I2,2);I3<=19-2*I2-1;I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=19-2*I2;I3<=N1;I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (19%7 == 0) {
- for (I3=ceild(9*19/7,2);I3<=5*19/7-1;I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*19%7 == 0) {
- I3 = 5*19/7 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*19/7+1,3);I3<=N1;I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=4*3+1;I3<=floord(13*3+1,3);I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if ((13*19-1)%18 == 0) {
- I3 = (13*19-1)/18 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*3+3,3);I3<=N1;I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- if (19%6 == 0) {
- for (I3=4*19/6;I3<=floord(13*19/6-1,3);I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if (13*19%18 == 0) {
- I3 = 13*19/18 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*19/6+1,3);I3<=min(N1,5*19/6);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=19-2*(4);I3<=floord(19+2*4-1,2);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(19+2*4,2);I3<=floord(2*19+4-1,3);I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if ((2*19+4)%3 == 0) {
- I3 = (2*19+4)/3 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*19+4+1,3);I3<=N1;I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=max(max(1,ceild(19-(5),2)),19-2*(5));I3<=19-(5);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(19-(5)+1,ceild(19+2*5,2));I3<=min(N1,floord(2*19+3*5,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=6;I2<=15;I2++) {
- for (I3=max(max(ceild(19-I2,2),19-2*I2),1);I3<=min(19-I2,N1);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 12) && (N1 >= 12)) {
- if ((9*N1-2)%7 == 0) {
- I1 = (9*N1-2)/7 ;
- for (I2=1;I2<=floord(2*N1-9,14);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%7 == 0) {
- I2 = (N1-1)/7 ;
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+4,21);I2<=floord(9*N1-9,49);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((9*N1-2)%49 == 0) {
- I2 = (9*N1-2)/49 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((9*N1-2)%42 == 0) {
- I2 = (9*N1-2)/42 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(9*N1+5,42);I2<=floord(2*N1-2,7);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+5,7);I2<=floord(5*N1+2,14);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(5*N1+9,14);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 17) {
- if (6*N1%5 == 0) {
- I1 = 6*N1/5 ;
- for (I2=1;I2<=floord(N1-5,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1,10);I2<=floord(6*N1-5,45);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(2*N1,15);I2<=floord(6*N1-5,35);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (6*N1%35 == 0) {
- I2 = 6*N1/35 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=floord(17*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I2+1,3);I3<=min(N1,6*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(6*N1+5,35);I2<=floord(3*N1-5,15);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (N1%5 == 0) {
- for (I3=4*N1/5;I3<=floord(13*N1/5-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*N1/5+1,3);I3<=min(N1,5*N1/5);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+5,5);I2<=floord(3*N1-5,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((6*N1-5)%20 == 0) {
- I2 = (6*N1-5)/20 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (3*N1%10 == 0) {
- I2 = 3*N1/10 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(6*N1+5,20);I2<=floord(2*N1,5);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1+5,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=max(ceild(9*N1-1,7),ceild(6*N1+5,5));I1<=min(19,floord(4*N1-2,3));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(I1-N1,2),ceild(-2*I1+3*N1,3));I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 23) {
- if ((6*N1+1)%5 == 0) {
- I1 = (6*N1+1)/5 ;
- for (I2=1;I2<=floord(N1-4,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+1,10);I2<=floord(6*N1-4,45);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(6*N1+1,45);I2<=floord(6*N1-4,35);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((6*N1+1)%35 == 0) {
- I2 = (6*N1+1)/35 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=floord(17*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I2+1,3);I3<=min(N1,6*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(6*N1+6,35);I2<=floord(3*N1-7,15);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((6*N1+1)%30 == 0) {
- I2 = (6*N1+1)/30 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+1)%5 == 0) {
- I2 = (N1+1)/5 ;
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+6,5);I2<=floord(6*N1-9,20);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-2)%10 == 0) {
- I2 = (3*N1-2)/10 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((6*N1+1)%20 == 0) {
- I2 = (6*N1+1)/20 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(3*N1+3,10);I2<=floord(4*N1-1,10);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+2,5);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 >= 18) && (N1 <= 20)) {
- if ((6*N1+1)%5 == 0) {
- I1 = (6*N1+1)/5 ;
- for (I2=1;I2<=floord(N1-4,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+1,10);I2<=floord(6*N1-4,45);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(6*N1+1,45);I2<=floord(6*N1-4,35);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((6*N1+1)%35 == 0) {
- I2 = (6*N1+1)/35 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=floord(17*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I2+1,3);I3<=min(N1,6*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((6*N1+1)%30 == 0) {
- I2 = (6*N1+1)/30 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+1)%5 == 0) {
- I2 = (N1+1)/5 ;
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+6,5);I2<=floord(6*N1-9,20);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-2)%10 == 0) {
- I2 = (3*N1-2)/10 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((6*N1+1)%20 == 0) {
- I2 = (6*N1+1)/20 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(3*N1+3,10);I2<=floord(4*N1-1,10);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+2,5);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 <= 14) && (N1 >= 11)) {
- if ((4*N1-1)%3 == 0) {
- I1 = (4*N1-1)/3 ;
- for (I2=1;I2<=floord(N1-4,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1-1,6);I2<=floord(4*N1-4,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-1)%21 == 0) {
- I2 = (4*N1-1)/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((2*N1-2)%9 == 0) {
- I2 = (2*N1-2)/9 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-1)%18 == 0) {
- I2 = (4*N1-1)/18 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+1,9);I2<=floord(4*N1-7,12);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%3 == 0) {
- I2 = (N1-1)/3 ;
- for (I3=ceild(2*N1+1,3);I3<=N1-1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (-1%3 == 0) {
- I3 = (3*N1-1)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=ceild(N1+2,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=ceild(6*N1+2,5);I1<=min(floord(21*N1-10,17),floord(6*N1+4,5));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(-2*I1+3*N1-1,3);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-2*I1+3*N1,3);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 14) && (N1 >= 11)) {
- if (4*N1%3 == 0) {
- I1 = 4*N1/3 ;
- for (I2=1;I2<=floord(N1-3,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1,6);I2<=floord(4*N1-3,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (4*N1%21 == 0) {
- I2 = 4*N1/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-3)%18 == 0) {
- I2 = (4*N1-3)/18 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (2*N1%9 == 0) {
- I2 = 2*N1/9 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1+3,18);I2<=floord(N1-3,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (N1%3 == 0) {
- for (I3=ceild(2*N1,3);I3<=floord(2*N1-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(2*N1+3,6);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=ceild(6*N1+5,5);I1<=floord(21*N1-10,17);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(-2*I1+3*N1-1,3);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-2*I1+3*N1,3);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(ceild(21*N1-9,17),ceild(6*N1+2,5));I1<=min(floord(21*N1-7,17),floord(6*N1+4,5));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-2*I1+3*N1,3);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 14) {
- for (I2=1;I2<=2;I2++) {
- for (I3=ceild(19+2*I2,2);I3<=min(N1,floord(2*19+3*I2,3));I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=3;I2<=2;I2++) {
- for (I3=ceild(19+2*I2,2);I3<=19-2*I2-1;I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=19-2*I2;I3<=N1;I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (19%7 == 0) {
- for (I3=ceild(9*19/7,2);I3<=5*19/7-1;I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*19%7 == 0) {
- I3 = 5*19/7 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*19/7+1,3);I3<=N1;I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=4*3+1;I3<=floord(13*3+1,3);I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- if ((13*19-1)%18 == 0) {
- I3 = (13*19-1)/18 ;
- J1 = -2*(19)+3*I3 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*3+3,3);I3<=N1;I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*(4)+3*N1,2);I3<=floord(3*4+3*N1-2,4);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*4+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -(19)-2*(I2)+2*I3 ;
- S2++;
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*(19)+3*N1 ;
- if ((2*19+J1)%3 == 0) {
- J2 = (2*19+J1)/3 ;
- J3 = 3*19-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=5;I2<=14;I2++) {
- for (I3=max(max(ceild(19-I2,2),19-2*I2),1);I3<=min(19-I2,N1);I3++) {
- J3 = 19-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 11) {
- for (I3=ceild(15+2*1,2);I3<=min(N1,floord(2*15+3*1,3));I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(15+2*2,2);I3<=15-2*(2)-1;I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=15-2*(2);I3<=N1;I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*(3)+3*N1,2);I3<=floord(3*3+3*N1-2,4);I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*3+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -(15)-2*(I2)+2*I3 ;
- S2++;
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*(15)+3*N1 ;
- if ((2*15+J1)%3 == 0) {
- J2 = (2*15+J1)/3 ;
- J3 = 3*15-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=4;I2<=11;I2++) {
- for (I3=max(max(ceild(15-I2,2),15-2*I2),1);I3<=min(15-I2,N1);I3++) {
- J3 = 15-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(ceild(21*N1-9,17),ceild(6*N1+5,5));I1<=floord(21*N1-7,17);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=floord(17*I1/7,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(17*I1/7+1,3);I3<=min(N1,6*I1/7);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-2*I1+3*N1,3);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(ceild(21*N1-6,17),ceild(6*N1+2,5));I1<=min(min(floord(21*N1-1,17),floord(6*N1+4,5)),floord(4*N1-6,3));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=min(floord(I1-1,7),floord(-2*I1+3*N1-1,3));I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=max(ceild(I1+1,7),ceild(-2*I1+3*N1,3));I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=ceild(21*N1,17);I1<=min(floord(6*N1+4,5),floord(4*N1-6,3));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(-2*I1+3*N1-1,3);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 18) && (N1 >= 17)) {
- if ((4*N1-5)%3 == 0) {
- I1 = (4*N1-5)/3 ;
- for (I2=1;I2<=floord(N1-8,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1-5,6);I2<=floord(4*N1-8,27);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(4*N1-5,27);I2<=floord(N1+7,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if ((4*N1-5)%21 == 0) {
- I2 = (4*N1-5)/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-2,21);I2<=floord(4*N1-11,18);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%18 == 0) {
- I2 = (4*N1-5)/18 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,9);I2<=floord(N1-5,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-2)%3 == 0) {
- I2 = (N1-2)/3 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%12 == 0) {
- I2 = (4*N1-5)/12 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,6);I2<=floord(2*N1+5,6);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+4,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=max(ceild(21*N1-6,17),ceild(6*N1+5,5));I1<=floord(21*N1-1,17);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=min(floord(I1-1,7),floord(-2*I1+3*N1-1,3));I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=max(ceild(I1+1,7),ceild(-2*I1+3*N1,3));I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 >= 18) && (N1 <= 19)) {
- if ((4*N1-4)%3 == 0) {
- I1 = (4*N1-4)/3 ;
- for (I2=1;I2<=floord(N1-7,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1-4,6);I2<=floord(4*N1-7,27);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(4*N1-4,27);I2<=floord(N1+5,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(N1+8,9);I2<=floord(4*N1-7,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-4)%21 == 0) {
- I2 = (4*N1-4)/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-1,21);I2<=floord(2*N1-5,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-7)%18 == 0) {
- I2 = (4*N1-7)/18 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((2*N1-2)%9 == 0) {
- I2 = (2*N1-2)/9 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-1,18);I2<=floord(N1-4,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%3 == 0) {
- I2 = (N1-1)/3 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-1,12);I2<=floord(N1+2,3);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+7,6);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=max(ceild(21*N1,17),ceild(6*N1+5,5));I1<=floord(21*N1+2,17);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(-2*I1+3*N1-1,3);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(ceild(21*N1+3,17),ceild(6*N1+5,5));I1<=min(floord(9*N1-3,7),floord(4*N1-6,3));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1,9);I2<=floord(-2*I1+3*N1-1,3);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-2*I1+3*N1,3);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 >= 20) && (N1 <= 26)) {
- if ((4*N1-5)%3 == 0) {
- I1 = (4*N1-5)/3 ;
- for (I2=1;I2<=floord(N1-8,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1-5,6);I2<=floord(4*N1-8,27);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(4*N1-5,27);I2<=floord(N1+7,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+3*I2,3);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(2*I1+3*I2+1,3);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(N1+10,9);I2<=floord(4*N1-8,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%21 == 0) {
- I2 = (4*N1-5)/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-2,21);I2<=floord(4*N1-11,18);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((2*N1-4)%9 == 0) {
- I2 = (2*N1-4)/9 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%18 == 0) {
- I2 = (4*N1-5)/18 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,9);I2<=floord(N1-5,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-2)%3 == 0) {
- I2 = (N1-2)/3 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%12 == 0) {
- I2 = (4*N1-5)/12 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,6);I2<=floord(2*N1+5,6);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+4,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 36) {
- if ((9*N1-2)%7 == 0) {
- I1 = (9*N1-2)/7 ;
- for (I2=1;I2<=floord(2*N1-9,14);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%7 == 0) {
- I2 = (N1-1)/7 ;
- for (I3=ceild(I1+2*I2,2);I3<=min(I1-2*I2-1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+4,21);I2<=floord(9*N1-9,49);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((9*N1-2)%49 == 0) {
- I2 = (9*N1-2)/49 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(9*N1+5,49);I2<=floord(9*N1-16,42);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-3)%14 == 0) {
- I2 = (3*N1-3)/14 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((9*N1-2)%42 == 0) {
- I2 = (9*N1-2)/42 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(9*N1+5,42);I2<=floord(2*N1-2,7);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+5,7);I2<=floord(9*N1-16,28);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((9*N1-9)%28 == 0) {
- I2 = (9*N1-9)/28 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((9*N1-2)%28 == 0) {
- I2 = (9*N1-2)/28 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(9*N1+5,28);I2<=floord(5*N1+2,14);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(5*N1+9,14);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 == 29) {
- for (I2=1;I2<=3;I2++) {
- for (I3=ceild(37+2*I2,2);I3<=min(N1,floord(2*37+3*I2,3));I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=ceild(37+2*4,2);I3<=min(37-2*(4)-1,floord(2*37+3*4,3));I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=37-2*(4);I3<=min(N1,37-(4));I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(37+2*5,2);I3<=37-2*(5)-1;I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=37-2*(5);I3<=N1;I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- if (37%7 == 0) {
- for (I3=ceild(9*37/7,2);I3<=5*37/7-1;I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*37%7 == 0) {
- I3 = 5*37/7 ;
- J1 = -2*(37)+3*I3 ;
- if ((2*37+J1)%3 == 0) {
- J2 = (2*37+J1)/3 ;
- J3 = 3*37-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*37/7+1,3);I3<=N1;I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=6;I2<=5;I2++) {
- for (I3=ceild(37+2*I2,2);I3<=37-2*I2-1;I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=37-2*I2;I3<=floord(2*37+I2-1,3);I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- if ((2*37+I2)%3 == 0) {
- I3 = (2*37+I2)/3 ;
- J1 = -2*(37)+3*I3 ;
- if ((2*37+J1)%3 == 0) {
- J2 = (2*37+J1)/3 ;
- J3 = 3*37-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*37+I2+1,3);I3<=N1;I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=4*6+1;I3<=floord(13*6+1,3);I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- if ((13*37-1)%18 == 0) {
- I3 = (13*37-1)/18 ;
- J1 = -2*(37)+3*I3 ;
- if ((2*37+J1)%3 == 0) {
- J2 = (2*37+J1)/3 ;
- J3 = 3*37-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*6+3,3);I3<=N1;I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- if (37%6 == 0) {
- for (I3=4*37/6;I3<=floord(13*37/6-1,3);I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- if (13*37%18 == 0) {
- I3 = 13*37/18 ;
- J1 = -2*(37)+3*I3 ;
- if ((2*37+J1)%3 == 0) {
- J2 = (2*37+J1)/3 ;
- J3 = 3*37-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*37/6+1,3);I3<=min(N1,5*37/6);I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=7;I2<=8;I2++) {
- for (I3=37-2*I2;I3<=floord(37+2*I2-1,2);I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(37+2*I2,2);I3<=floord(2*37+I2-1,3);I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- if ((2*37+I2)%3 == 0) {
- I3 = (2*37+I2)/3 ;
- J1 = -2*(37)+3*I3 ;
- if ((2*37+J1)%3 == 0) {
- J2 = (2*37+J1)/3 ;
- J3 = 3*37-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*37+I2+1,3);I3<=N1;I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*9+1;I3<=3*9;I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- if ((9*37-1)%12 == 0) {
- I3 = (9*37-1)/12 ;
- J1 = -2*(37)+3*I3 ;
- if ((2*37+J1)%3 == 0) {
- J2 = (2*37+J1)/3 ;
- J3 = 3*37-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*37+1)%4 == 0) {
- I3 = (3*37+1)/4 ;
- J3 = 37-(I2)-(I3) ;
- S1++;
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*9+2;I3<=min(N1,floord(11*9+2,3));I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- if (37%4 == 0) {
- for (I3=2*37/4;I3<=floord(6*37/4-1,2);I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- if (3*37%4 == 0) {
- I3 = 3*37/4 ;
- J1 = -2*(37)+3*I3 ;
- if ((2*37+J1)%3 == 0) {
- J2 = (2*37+J1)/3 ;
- J3 = 3*37-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*37/4+1;I3<=min(N1,floord(11*37/4,3));I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=max(max(1,ceild(37-(10),2)),37-2*(10));I3<=37-(10);I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(37-(10)+1,ceild(37+2*10,2));I3<=min(N1,floord(2*37+3*10,3));I3++) {
- J3 = -(37)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=11;I2<=29;I2++) {
- for (I3=max(max(ceild(37-I2,2),37-2*I2),1);I3<=min(37-I2,N1);I3++) {
- J3 = 37-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 22) {
- for (I2=1;I2<=2;I2++) {
- for (I3=ceild(28+2*I2,2);I3<=min(N1,floord(2*28+3*I2,3));I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=ceild(28+2*3,2);I3<=min(28-2*(3)-1,floord(2*28+3*3,3));I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=28-2*(3);I3<=min(N1,28-(3));I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- }
- for (I2=4;I2<=3;I2++) {
- for (I3=ceild(28+2*I2,2);I3<=28-2*I2-1;I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=28-2*I2;I3<=N1;I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=ceild(9*4,2);I3<=5*4-1;I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*28%7 == 0) {
- I3 = 5*28/7 ;
- J1 = -2*(28)+3*I3 ;
- if ((2*28+J1)%3 == 0) {
- J2 = (2*28+J1)/3 ;
- J3 = 3*28-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*4+1,3);I3<=N1;I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=5;I2<=4;I2++) {
- for (I3=ceild(28+2*I2,2);I3<=28-2*I2-1;I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=28-2*I2;I3<=floord(2*28+I2-1,3);I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- J3 = 28-(I2)-(I3) ;
- S1++;
- }
- if ((2*28+I2)%3 == 0) {
- I3 = (2*28+I2)/3 ;
- J1 = -2*(28)+3*I3 ;
- if ((2*28+J1)%3 == 0) {
- J2 = (2*28+J1)/3 ;
- J3 = 3*28-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*28+I2+1,3);I3<=N1;I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (9%2 == 0) {
- for (I3=4*9/2+1;I3<=floord(13*9/2+1,3);I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- J3 = 28-(I2)-(I3) ;
- S1++;
- }
- if ((13*28-1)%18 == 0) {
- I3 = (13*28-1)/18 ;
- J1 = -2*(28)+3*I3 ;
- if ((2*28+J1)%3 == 0) {
- J2 = (2*28+J1)/3 ;
- J3 = 3*28-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*9/2+3,3);I3<=N1;I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (14%3 == 0) {
- for (I3=4*14/3;I3<=floord(13*14/3-1,3);I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- J3 = 28-(I2)-(I3) ;
- S1++;
- }
- if (13*28%18 == 0) {
- I3 = 13*28/18 ;
- J1 = -2*(28)+3*I3 ;
- if ((2*28+J1)%3 == 0) {
- J2 = (2*28+J1)/3 ;
- J3 = 3*28-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*14/3+1,3);I3<=min(N1,5*14/3);I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=5;I2<=6;I2++) {
- for (I3=28-2*I2;I3<=floord(28+2*I2-1,2);I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(28+2*I2,2);I3<=floord(2*28+I2-1,3);I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- J3 = 28-(I2)-(I3) ;
- S1++;
- }
- if ((2*28+I2)%3 == 0) {
- I3 = (2*28+I2)/3 ;
- J1 = -2*(28)+3*I3 ;
- if ((2*28+J1)%3 == 0) {
- J2 = (2*28+J1)/3 ;
- J3 = 3*28-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*28+I2+1,3);I3<=N1;I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=2*7;I3<=floord(6*7-1,2);I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- }
- if (3*28%4 == 0) {
- I3 = 3*28/4 ;
- J1 = -2*(28)+3*I3 ;
- if ((2*28+J1)%3 == 0) {
- J2 = (2*28+J1)/3 ;
- J3 = 3*28-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*7+1;I3<=min(N1,floord(11*7,3));I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=max(max(1,ceild(28-(8),2)),28-2*(8));I3<=28-(8);I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(28-(8)+1,ceild(28+2*8,2));I3<=min(N1,floord(2*28+3*8,3));I3++) {
- J3 = -(28)-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=9;I2<=22;I2++) {
- for (I3=max(max(ceild(28-I2,2),28-2*I2),1);I3<=min(28-I2,N1);I3++) {
- J3 = 28-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=ceild(9*N1-1,7);I1<=floord(4*N1-6,3);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(I1-N1,2),ceild(-2*I1+3*N1,3));I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(I1-2,4);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-I2+1;I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%4 == 0) {
- I2 = (I1-1)/4 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%4 == 0) {
- for (I3=2*I1/4;I3<=floord(6*I1/4-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I1/4+1;I3<=min(N1,floord(11*I1/4,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,4);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 32) {
- if ((4*N1-5)%3 == 0) {
- I1 = (4*N1-5)/3 ;
- for (I2=1;I2<=floord(N1-8,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(N1-5,6),ceild(N1+10,9));I2<=floord(4*N1-8,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%21 == 0) {
- I2 = (4*N1-5)/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-2,21);I2<=floord(4*N1-11,18);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((2*N1-4)%9 == 0) {
- I2 = (2*N1-4)/9 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%18 == 0) {
- I2 = (4*N1-5)/18 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,9);I2<=floord(N1-5,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-2)%3 == 0) {
- I2 = (N1-2)/3 ;
- for (I3=2*I2+1;I3<=3*I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((9*I1-1)%12 == 0) {
- I3 = (9*I1-1)/12 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- if ((3*I1+1)%4 == 0) {
- I3 = (3*I1+1)/4 ;
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=3*I2+2;I3<=min(N1,floord(11*I2+2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-5)%12 == 0) {
- I2 = (4*N1-5)/12 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1-1,6);I2<=floord(2*N1+5,6);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+4,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 25) {
- if ((4*N1-4)%3 == 0) {
- I1 = (4*N1-4)/3 ;
- for (I2=1;I2<=floord(N1-7,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(N1-4,6),ceild(N1+8,9));I2<=floord(4*N1-7,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-4)%21 == 0) {
- I2 = (4*N1-4)/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-1,21);I2<=floord(2*N1-5,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-7)%18 == 0) {
- I2 = (4*N1-7)/18 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((2*N1-2)%9 == 0) {
- I2 = (2*N1-2)/9 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-1,18);I2<=floord(N1-4,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%3 == 0) {
- I2 = (N1-1)/3 ;
- for (I3=2*I2;I3<=floord(6*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (3*I1%4 == 0) {
- I3 = 3*I1/4 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=3*I2+1;I3<=min(N1,floord(11*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1-1,12);I2<=floord(N1+2,3);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+7,6);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=max(max(20,ceild(9*N1-1,7)),ceild(4*N1-3,3));I1<=floord(4*N1-2,3);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(I1-N1,2),ceild(-2*I1+3*N1,3));I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=I1-N1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=I1-N1+1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=max(max(1,ceild(I1-I2,2)),I1-2*I2);I3<=I1-I2;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(I1-I2+1,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 16) {
- if ((4*N1-1)%3 == 0) {
- I1 = (4*N1-1)/3 ;
- for (I2=1;I2<=floord(N1-4,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1-1,6);I2<=floord(4*N1-4,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-1)%21 == 0) {
- I2 = (4*N1-1)/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1+2,21);I2<=floord(4*N1-7,18);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((2*N1-2)%9 == 0) {
- I2 = (2*N1-2)/9 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-1)%18 == 0) {
- I2 = (4*N1-1)/18 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+1,9);I2<=floord(4*N1-7,12);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%3 == 0) {
- I2 = (N1-1)/3 ;
- for (I3=ceild(2*N1+1,3);I3<=N1-1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (-1%3 == 0) {
- I3 = (3*N1-1)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I2=ceild(N1+2,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 15) {
- if (4*N1%3 == 0) {
- I1 = 4*N1/3 ;
- for (I2=1;I2<=floord(N1-3,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1,6);I2<=floord(4*N1-3,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (4*N1%21 == 0) {
- I2 = 4*N1/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1+3,21);I2<=floord(2*N1-3,9);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1-3)%18 == 0) {
- I2 = (4*N1-3)/18 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (2*N1%9 == 0) {
- I2 = 2*N1/9 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1+3,18);I2<=floord(N1-3,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (N1%3 == 0) {
- for (I3=ceild(2*N1,3);I3<=floord(2*N1-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(2*N1+3,6);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 17) {
- if ((4*N1+1)%3 == 0) {
- I1 = (4*N1+1)/3 ;
- for (I2=1;I2<=floord(N1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(N1+1,6);I2<=floord(4*N1-2,21);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1+1)%21 == 0) {
- I2 = (4*N1+1)/21 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(4*N1+4,21);I2<=floord(4*N1-5,18);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((2*N1-1)%9 == 0) {
- I2 = (2*N1-1)/9 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((4*N1+1)%18 == 0) {
- I2 = (4*N1+1)/18 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(2*N1+2,9);I2<=floord(N1-5,3);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-2)%3 == 0) {
- I2 = (N1-2)/3 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*I2+3*N1-2,4);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+1,3);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=ceild(4*N1+2,3);I1<=floord(18*N1-7,13);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((I1-1)%6 == 0) {
- I2 = (I1-1)/6 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%6 == 0) {
- for (I3=4*I1/6;I3<=floord(13*I1/6-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I1/6+1,3);I3<=min(N1,5*I1/6);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=-2*I1+3*N1-1;I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- I2 = -2*I1+3*N1 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*I2+3*N1-2,4);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=-2*I1+3*N1+1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 22) {
- if ((18*N1-6)%13 == 0) {
- I1 = (18*N1-6)/13 ;
- for (I2=1;I2<=floord(5*N1-19,26);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(5*N1-6,26);I2<=floord(18*N1-19,91);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((18*N1-6)%91 == 0) {
- I2 = (18*N1-6)/91 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(18*N1+7,91);I2<=floord(9*N1-16,39);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((18*N1-19)%78 == 0) {
- I2 = (18*N1-19)/78 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-1)%13 == 0) {
- I2 = (3*N1-1)/13 ;
- for (I3=4*I2;I3<=floord(13*I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if (13*I1%18 == 0) {
- I3 = 13*I1/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+1,3);I3<=min(N1,5*I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1+12)%13 == 0) {
- I2 = (3*N1+12)/13 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*I2+3*N1-2,4);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(3*N1+25,13);I2<=floord(4*N1+3,13);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(8*N1+19,26);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 21) {
- if ((18*N1-5)%13 == 0) {
- I1 = (18*N1-5)/13 ;
- for (I2=1;I2<=floord(5*N1-18,26);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(5*N1-5,26);I2<=floord(18*N1-18,91);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((18*N1-5)%91 == 0) {
- I2 = (18*N1-5)/91 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(18*N1+8,91);I2<=floord(18*N1-31,78);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-3)%13 == 0) {
- I2 = (3*N1-3)/13 ;
- for (I3=4*I2+1;I3<=floord(13*I2+1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((13*I1-1)%18 == 0) {
- I3 = (13*I1-1)/18 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(13*I2+3,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1+10)%13 == 0) {
- I2 = (3*N1+10)/13 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*I2+3*N1-2,4);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(3*N1+23,13);I2<=floord(8*N1+5,26);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(4*N1+9,13);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=max(ceild(18*N1-4,13),ceild(4*N1+2,3));I1<=min(floord(21*N1-8,15),floord(18*N1-1,13));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=-2*I1+3*N1-1;I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- I2 = -2*I1+3*N1 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*I2+3*N1-2,4);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=-2*I1+3*N1+1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=ceild(18*N1,13);I1<=min(floord(21*N1-8,15),floord(18*N1+1,13));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=-2*I1+3*N1-1;I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- I2 = -2*I1+3*N1 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=-2*I1+3*N1+1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 >= 17) && (N1 <= 25)) {
- if ((21*N1-7)%15 == 0) {
- I1 = (21*N1-7)/15 ;
- for (I2=1;I2<=floord(3*N1-11,15);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(6*N1-7,30);I2<=floord(21*N1-22,105);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-1)%15 == 0) {
- I2 = (3*N1-1)/15 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1+14)%15 == 0) {
- I2 = (3*N1+14)/15 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*I2+3*N1-2,4);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(3*N1+29,15);I2<=floord(9*N1+7,30);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(9*N1+22,30);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=ceild(18*N1+2,13);I1<=min(floord(21*N1-8,15),floord(18*N1+5,13));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=-2*I1+3*N1-1;I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- I2 = -2*I1+3*N1 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=-2*I1+3*N1+1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 35) && (N1 >= 31)) {
- if ((21*N1-7)%15 == 0) {
- I1 = (21*N1-7)/15 ;
- for (I2=1;I2<=floord(3*N1-11,15);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(6*N1-7,30);I2<=floord(21*N1-22,105);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-1)%15 == 0) {
- I2 = (3*N1-1)/15 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1+14)%15 == 0) {
- I2 = (3*N1+14)/15 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(3*N1+29,15);I2<=floord(9*N1+7,30);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(9*N1+22,30);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 >= 16) && (N1 <= 21)) {
- if ((7*N1-2)%5 == 0) {
- I1 = (7*N1-2)/5 ;
- for (I2=1;I2<=floord(2*N1-7,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%5 == 0) {
- I2 = (N1-1)/5 ;
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+4)%5 == 0) {
- I2 = (N1+4)/5 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*I2+3*N1-2,4);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+9,5);I2<=floord(3*N1+2,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+7,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=ceild(18*N1+6,13);I1<=min(floord(21*N1-8,15),floord(18*N1+7,13));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=-2*I1+3*N1-1;I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- I2 = -2*I1+3*N1 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=-2*I1+3*N1+1;I2<=floord(I1,6);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 <= 55) && (N1 >= 41)) {
- if ((21*N1-7)%15 == 0) {
- I1 = (21*N1-7)/15 ;
- for (I2=1;I2<=floord(3*N1-11,15);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(6*N1-7,30);I2<=floord(21*N1-22,105);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-1)%15 == 0) {
- I2 = (3*N1-1)/15 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1+14)%15 == 0) {
- I2 = (3*N1+14)/15 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(3*N1+29,15);I2<=floord(9*N1+7,30);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(9*N1+22,30);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 <= 31) && (N1 >= 26)) {
- if ((7*N1-2)%5 == 0) {
- I1 = (7*N1-2)/5 ;
- for (I2=1;I2<=floord(2*N1-7,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%5 == 0) {
- I2 = (N1-1)/5 ;
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+4)%5 == 0) {
- I2 = (N1+4)/5 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+9,5);I2<=floord(3*N1+2,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+7,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 <= 18) && (N1 >= 13)) {
- if ((7*N1-1)%5 == 0) {
- I1 = (7*N1-1)/5 ;
- for (I2=1;I2<=floord(N1-3,5);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+2)%5 == 0) {
- I2 = (N1+2)/5 ;
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+7,5);I2<=floord(3*N1+1,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+6,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=ceild(18*N1+8,13);I1<=floord(21*N1-8,15);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=floord(I1-1,7);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (I1%7 == 0) {
- for (I3=ceild(9*I1/7,2);I3<=5*I1/7-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I1/7+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1+1,7);I2<=-2*I1+3*N1-1;I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=floord(2*I1+I2-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(2*I1+I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- I2 = -2*I1+3*N1 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- for (I2=-2*I1+3*N1+1;I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1-1,6);I2<=floord(I1,6);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if ((N1 >= 61) && (N1 <= 65)) {
- if ((21*N1-7)%15 == 0) {
- I1 = (21*N1-7)/15 ;
- for (I2=1;I2<=floord(3*N1-11,15);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(6*N1-7,30);I2<=floord(21*N1-22,105);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-1)%15 == 0) {
- I2 = (3*N1-1)/15 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1+14)%15 == 0) {
- I2 = (3*N1+14)/15 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(3*N1+29,15);I2<=floord(21*N1-7,90);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(21*N1+8,90);I2<=floord(9*N1+7,30);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(9*N1+22,30);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 <= 51) && (N1 >= 36)) {
- if ((7*N1-2)%5 == 0) {
- I1 = (7*N1-2)/5 ;
- for (I2=1;I2<=floord(2*N1-7,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%5 == 0) {
- I2 = (N1-1)/5 ;
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+4)%5 == 0) {
- I2 = (N1+4)/5 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+9,5);I2<=floord(3*N1+2,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+7,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 71) {
- if ((21*N1-7)%15 == 0) {
- I1 = (21*N1-7)/15 ;
- for (I2=1;I2<=floord(3*N1-11,15);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(6*N1-7,30);I2<=floord(21*N1-22,105);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1-1)%15 == 0) {
- I2 = (3*N1-1)/15 ;
- for (I3=ceild(9*I2,2);I3<=5*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- if (5*I1%7 == 0) {
- I3 = 5*I1/7 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=ceild(15*I2+1,3);I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((3*N1+14)%15 == 0) {
- I2 = (3*N1+14)/15 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(3*N1+29,15);I2<=floord(21*N1-37,90);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(21*N1-22,90);I2<=floord(21*N1-7,90);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(21*N1+8,90);I2<=floord(9*N1+7,30);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(9*N1+22,30);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 >= 56) && (N1 <= 61)) {
- if ((7*N1-2)%5 == 0) {
- I1 = (7*N1-2)/5 ;
- for (I2=1;I2<=floord(2*N1-7,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%5 == 0) {
- I2 = (N1-1)/5 ;
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+4)%5 == 0) {
- I2 = (N1+4)/5 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+9,5);I2<=floord(7*N1-2,30);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(7*N1+3,30);I2<=floord(3*N1+2,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+7,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 >= 43) && (N1 <= 48)) {
- if ((7*N1-1)%5 == 0) {
- I1 = (7*N1-1)/5 ;
- for (I2=1;I2<=floord(N1-3,5);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+2)%5 == 0) {
- I2 = (N1+2)/5 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+7,5);I2<=floord(7*N1-1,30);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(7*N1+4,30);I2<=floord(3*N1+1,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+6,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 <= 38) && (N1 >= 23)) {
- if ((7*N1-1)%5 == 0) {
- I1 = (7*N1-1)/5 ;
- for (I2=1;I2<=floord(N1-3,5);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+2)%5 == 0) {
- I2 = (N1+2)/5 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+7,5);I2<=floord(3*N1+1,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+6,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 >= 30) && (N1 <= 35)) {
- if (7*N1%5 == 0) {
- I1 = 7*N1/5 ;
- for (I2=1;I2<=floord(2*N1-5,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (N1%5 == 0) {
- for (I3=ceild(9*N1,10);I3<=N1-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+5,5);I2<=floord(7*N1,30);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(7*N1+5,30);I2<=floord(3*N1,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+5,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if ((N1 <= 25) && (N1 >= 10)) {
- if (7*N1%5 == 0) {
- I1 = 7*N1/5 ;
- for (I2=1;I2<=floord(2*N1-5,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (N1%5 == 0) {
- for (I3=ceild(9*N1,10);I3<=N1-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+5,5);I2<=floord(3*N1,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+5,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 66) {
- if ((7*N1-2)%5 == 0) {
- I1 = (7*N1-2)/5 ;
- for (I2=1;I2<=floord(2*N1-7,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1-1)%5 == 0) {
- I2 = (N1-1)/5 ;
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+4)%5 == 0) {
- I2 = (N1+4)/5 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+9,5);I2<=floord(7*N1-12,30);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(7*N1-7,30);I2<=floord(7*N1-2,30);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(7*N1+3,30);I2<=floord(3*N1+2,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+7,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-if (N1 >= 53) {
- if ((7*N1-1)%5 == 0) {
- I1 = (7*N1-1)/5 ;
- for (I2=1;I2<=floord(N1-3,5);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if ((N1+2)%5 == 0) {
- I2 = (N1+2)/5 ;
- for (I3=ceild(3*I2+3*N1,4);I3<=floord(-5*I2+3*N1-2,2);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=ceild(-5*I2+3*N1,2);I3<=floord(3*N1-1,3);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+7,5);I2<=floord(7*N1-11,30);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(7*N1-6,30);I2<=floord(7*N1-1,30);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(7*N1+4,30);I2<=floord(3*N1+1,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+6,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=max(ceild(7*N1+1,5),ceild(18*N1+6,13));I1<=min(floord(18*N1+7,13),floord(3*N1-2,2));I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=-2*I1+3*N1+1;I2<=floord(I1,6);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 == 12) {
- for (I2=1;I2<=2;I2++) {
- for (I3=ceild(17+2*I2,2);I3<=min(N1,floord(2*17+3*I2,3));I3++) {
- J3 = -(17)-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I3=17-2*(3);I3<=floord(17+2*3-1,2);I3++) {
- J3 = 17-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(17+2*3,2);I3<=N1;I3++) {
- J3 = -(17)-2*(I2)+2*I3 ;
- S2++;
- J3 = 17-(I2)-(I3) ;
- S1++;
- }
- for (I2=4;I2<=12;I2++) {
- for (I3=max(max(ceild(17-I2,2),17-2*I2),1);I3<=min(17-I2,N1);I3++) {
- J3 = 17-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 40) {
- if (7*N1%5 == 0) {
- I1 = 7*N1/5 ;
- for (I2=1;I2<=floord(2*N1-5,10);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (N1%5 == 0) {
- for (I3=ceild(9*N1,10);I3<=N1-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- J1 = -2*I1+3*N1 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I2=ceild(N1+5,5);I2<=floord(7*N1-10,30);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(7*N1-5,30);I2<=floord(7*N1,30);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(7*N1+5,30);I2<=floord(3*N1,10);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(3*N1+5,10);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=max(ceild(7*N1+1,5),ceild(18*N1+8,13));I1<=floord(3*N1-2,2);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(I1-N1,2),-2*I1+3*N1+1);I2<=floord(I1-2,6);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=I1-2*I2-1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1-1,6);I2<=floord(I1,6);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=max(max(N1+3,ceild(3*N1-1,2)),ceild(18*N1+6,13));I1<=floord(6*N1-1,4);I1++) {
- for (I2=1;I2<=floord(I1-N1-1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=max(ceild(I1-N1,2),-2*I1+3*N1+1);I2<=floord(I1,6);I2++) {
- for (I3=I1-2*I2;I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(I1+1,6);I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=I1-2*I2;I3<=floord(I1+2*I2-1,2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(-I1+2*N1+1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-if (N1 >= 6) {
- if (3*N1%2 == 0) {
- I1 = 3*N1/2 ;
- for (I2=1;I2<=floord(N1-2,4);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- if (N1%4 == 0) {
- for (I3=I1-2*(N1/4);I3<=N1;I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- for (I2=ceild(N1+2,4);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
- }
-}
-for (I1=ceild(3*N1+1,2);I1<=2*N1-2;I1++) {
- for (I2=1;I2<=floord(-I1+2*N1,2);I2++) {
- for (I3=ceild(I1+2*I2,2);I3<=min(N1,floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
- for (I2=ceild(I1-N1,2);I2<=N1;I2++) {
- for (I3=max(max(ceild(I1-I2,2),I1-2*I2),1);I3<=min(I1-I2,N1);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-for (I1=2*N1-1;I1<=3*N1;I1++) {
- for (I2=max(ceild(I1-N1,2),1);I2<=N1;I2++) {
- for (I3=max(max(I1-2*I2,ceild(I1-I2,2)),1);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- }
-}
-
-
- /* statements print */
- fprintf(stderr, "S1 : %d\n", S1);
- fprintf(stderr, "S2 : %d\n", S2);
-
-
-}
-
-
-
-------=_Part_1422_26966204.1114622640387
-Content-Type: application/octet-stream; name=LUDom_OSP.type2.c
-Content-Transfer-Encoding: 7bit
-Content-Disposition: attachment; filename="LUDom_OSP.type2.c"
-
-/* Author : DaeGon Kim
- Date : Tue Apr 26 20:28:07 MDT 2005 */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#define max(x,y) ((x)>(y) ? (x) : (y))
-#define min(x,y) ((x)>(y) ? (y) : (x))
-#define ceild(x,y) ((x)+1) / (y)
-#define floord(x,y) (x) / (y)
-
-int main(int argc, char **argv) {
-
- /* parameters declaration */
- int N1 = 0;
-
- /* statements declaration */
- int S1 = 0;
- int S2 = 0;
-
- /* iterators declaration */
- int I1 = 0;
- int J1 = 0;
- int I2 = 0;
- int J2 = 0;
- int I3 = 0;
- int J3 = 0;
-
- /* check arguements and get values of parameters */
- if ( argc != 1 + 1) {
- printf("The number of arguements for %s is 1\n", argv[0]);
- exit(0);
- }
-
- N1 = atoi(argv[1]);
-
-/* Generated from ./INPUT/CLOOG/LUDom_OSP_cloog by CLooG v0.12.2 64 bits in 0.03s. */
-for (I1=0;I1<=3*N1;I1++) {
- for (I2=max(max(1,ceild(I1-2*N1+2,2)),I1-2*N1);I2<=N1;I2++) {
- for (I3=max(max(I1-2*I2,ceild(I1-I2,2)),1);I3<=min(min(N1,floord(I1+2*I2-1,2)),I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=ceild(I1+2*I2,2);I3<=min(min(N1,I1-2*I2-1),floord(2*I1+3*I2,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=max(I1-2*I2,ceild(I1+2*I2,2));I3<=min(N1,floord(2*I1+I2-1,3));I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- if ((2*I1+I2)%3 == 0) {
- I3 = (2*I1+I2)/3 ;
- J1 = -2*I1+3*I3 ;
- if ((2*I1+J1)%3 == 0) {
- J2 = (2*I1+J1)/3 ;
- J3 = 3*I1-4*J2 ;
- S1++;
- S2++;
- }
- }
- for (I3=max(I1-2*I2,ceild(2*I1+I2+1,3));I3<=min(min(N1,floord(2*I1+3*I2,3)),I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- for (I3=max(ceild(2*I1+3*I2+1,3),I1-2*I2);I3<=min(N1,I1-I2);I3++) {
- J3 = I1-(I2)-(I3) ;
- S1++;
- }
- for (I3=max(ceild(I1+2*I2,2),I1-I2+1);I3<=min(floord(2*I1+3*I2,3),N1);I3++) {
- J3 = -I1-2*(I2)+2*I3 ;
- S2++;
- }
- }
-}
-
-
- /* statements print */
- fprintf(stderr, "S1 : %d\n", S1);
- fprintf(stderr, "S2 : %d\n", S2);
-
-
-}
-
-
-
-------=_Part_1422_26966204.1114622640387--
-
-
diff --git a/test/reports/kristof_beyls_16-05-2005.txt b/test/reports/kristof_beyls_16-05-2005.txt
deleted file mode 100644
index dcda755..0000000
--- a/test/reports/kristof_beyls_16-05-2005.txt
+++ /dev/null
@@ -1,933 +0,0 @@
-Dear Dr. Bastoul,
-
-At the university of Ghent, we are starting to look
-at automatic optimization of loops to optimize the implementation
-in an FPGA. With the advent of your Cloog tool, we think
-it becomes possible to use the polyhedral model
-for the kind of optimizations we are thinking about, instead of using
-optimizations based on transforming abstract syntax trees.
-
-As a first test, we started with the representation of a
-wavelet decoder loop kernel in Cloog format. We do this
-by starting from a Fortran77-description, parse it
-using our FPT compiler and PolyAst-library, and then
-generate the Cloog data structures. Then we use
-the function cloog_program_dump_cloog to obtain an
-ASCII-file representing the code in Cloog-format.
-
-However, when trying to read in the generated file,
-we found that the generated file was incorrect, and
-I think the cause is in two small bugs in the
-function cloog_program_dump_cloog. After I've
-corrected them, the generated file seems correct
-(i.e. cloog can correctly read the generated file).
-
-I've attached the adapted program.c source file.
-I only changed the function cloog_program_dump_cloog,
-and now it looks as follows:
-
-void cloog_program_dump_cloog(FILE * foo, CloogProgram * program)
-{ int i, j ;
- Matrix * matrix ;
- Polyhedron * polyhedron ;
- CloogLoop * loop ;
-
- fprintf(foo,
- "# CLooG -> CLooG\n"
- "# This is an automatic dump of an input file from a CloogProgram data\n"
- "# structure. It can be correct ONLY if dumped before loop generation.\n") ;
-
- /* Language. */
- if (program->language == 'c')
- fprintf(foo,"# Langage: C\n") ;
- else
- fprintf(foo,"# Langage: FORTRAN\n") ;
- fprintf(foo,"%c\n\n",program->language) ;
-
- /* Context. */
- fprintf(foo,"# Context (%d parameter(s)):\n",program->context->Dimension) ;
- matrix = cloog_domain_domain2matrix(program->context) ;
- cloog_domain_matrix_print(foo,matrix);
- cloog_domain_matrix_free(matrix);
- fprintf(foo,"1 # Parameter name(s)\n") ;
- for (i=0;i<program->names->nb_parameters;i++)
- fprintf(foo,"%s ",program->names->parameters[i]) ;
-
- /* Statement number. */
- i = 0 ;
- loop = program->loop ;
- while (loop != NULL)
- { i++ ;
- loop = loop->next ;
- }
- fprintf(foo,"\n\n# Statement number:\n%d\n\n",i) ;
-
- /* Iteration domains. */
- i = 1 ;
- loop = program->loop ;
- while (loop != NULL)
- { /* Name of the domain. */
- fprintf(foo,"# Iteration domain of statement %d.\n",i) ;
-
- /* Number of polyhedron inside the union of disjoint polyhedra. */
- j = 0 ;
- polyhedron = /* KB 15.05.2005 remove program->, since otherwise
- the number of polytopes describing the iteration
- space of the first loop will be printed, instead
- of the number of polytopes for the current loop. program->*/loop->domain ;
- while (polyhedron != NULL)
- { j++ ;
- polyhedron = polyhedron->next ;
- }
- fprintf(foo,"%d\n",j) ;
-
- /* The polyhedra themselves. */
- polyhedron = loop->domain ;
- while (polyhedron != NULL)
- { matrix = cloog_domain_domain2matrix(polyhedron) ;
- cloog_domain_matrix_print(foo,matrix);
- cloog_domain_matrix_free(matrix);
- polyhedron = polyhedron->next ;
- }
- /* KB 15.05.2005 : options should be printed once per statement, not once
- per polytope */
- fprintf(foo,"0 0 0 # For future options.\n\n") ;
- i++ ;
- loop = loop->next ;
- }
- fprintf(foo,"\n1 # Iterator name(s)\n") ;
- for (i=0;i<program->names->nb_iterators;i++)
- fprintf(foo,"%s ",program->names->iterators[i]) ;
- fprintf(foo,"\n\n") ;
-
- /* Scattering functions (none since included inside domains). */
- fprintf(foo,"# No scattering functions.\n0\n\n") ;
-}
-
-
-The two changes are indicated by comments starting with the letters 'KB'.
-
-I'm sending you these changes, so that they can be incorporated in the
-next version of cloog, if you find them to be correct.
-
-with kinds regards,
-
-Kristof Beyls
-
-P.S.: I'm currently studying your work about loop chunking, since I'll
-need some kind of generalized loop tiling transformation that extends over
-multiple loop nests, to get an efficient implementation of the wavelet
-code in an FPGA.
-
-
--- -------------------------------------------------------------------- Parallel Information Systems Tel: +32(9)2649528 Universiteit Gent Fax: +32(9)2643594 St.-Pietersnieuwstraat 41 E-mail: Kristof.Beyls@elis.ugent.be B-9000 Gent, Belgium http://www.elis.ugent.be/~kbeyls --------------------------------------------------------------------
-
-
-
-
- /**-------------------------------------------------------------------**
- ** CLooG **
- **-------------------------------------------------------------------**
- ** program.c **
- **-------------------------------------------------------------------**
- ** First version: october 25th 2001 **
- **-------------------------------------------------------------------**/
-
-
-/******************************************************************************
- * CLooG : the Chunky Loop Generator (experimental) *
- ******************************************************************************
- * *
- * Copyright (C) 2001 Cedric Bastoul *
- * *
- * This is free software; you can redistribute it and/or modify it under the *
- * terms of the GNU General Public License as published by the Free Software *
- * Foundation; either version 2 of the License, or (at your option) any later *
- * version. *
- * *
- * This software is distributed in the hope that it will be useful, but *
- * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
- * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
- * for more details. *
- * *
- * You should have received a copy of the GNU General Public License along *
- * with software; if not, write to the Free Software Foundation, Inc., *
- * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
- * *
- * CLooG, the Chunky Loop Generator *
- * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
- * *
- ******************************************************************************/
-/* CAUTION: the english used for comments is probably the worst you ever read,
- * please feel free to correct and improve it !
- */
-
-
-# include <sys/types.h>
-# include <sys/time.h>
-# include <sys/resource.h>
-# include <stdlib.h>
-# include <stdio.h>
-# include <string.h>
-# include <ctype.h>
-# include "../include/cloog/cloog.h"
-
-
-/******************************************************************************
- * Structure display function *
- ******************************************************************************/
-
-/* cloog_program_print function:
- * This function prints the content of a CloogProgram structure (program) into a
- * file (foo, possibly stdout).
- */
-void cloog_program_print(FILE * foo, CloogProgram * program)
-{ fprintf(foo,"Program:\n") ;
- fprintf(foo,"Language %c.\n",program->language) ;
- fprintf(foo,"Scattering dimension number = %d.\n",program->scattdims) ;
-
- cloog_names_print(foo,program->names) ;
-
- fprintf(foo,"Under the context:\n") ;
- cloog_domain_print(foo,program->context) ;
- fprintf(foo,"\n") ;
- cloog_loop_print(foo,program->loop) ;
-}
-
-
-/* cloog_program_dump_cloog function:
- * This function dumps a CloogProgram structure supposed to be completely
- * filled in a CLooG input file (foo possibly stdout) such as CLooG can
- * rebuild almost exactly the data structure from the input file (the number
- * of scattering functions is lost since they are included inside the
- * iteration domains, this can only lead to a less beautiful pretty printing).
- * 27 june 2003: first version.
- */
-void cloog_program_dump_cloog(FILE * foo, CloogProgram * program)
-{ int i, j ;
- Matrix * matrix ;
- Polyhedron * polyhedron ;
- CloogLoop * loop ;
-
- fprintf(foo,
- "# CLooG -> CLooG\n"
- "# This is an automatic dump of an input file from a CloogProgram data\n"
- "# structure. It can be correct ONLY if dumped before loop generation.\n") ;
-
- /* Language. */
- if (program->language == 'c')
- fprintf(foo,"# Langage: C\n") ;
- else
- fprintf(foo,"# Langage: FORTRAN\n") ;
- fprintf(foo,"%c\n\n",program->language) ;
-
- /* Context. */
- fprintf(foo,"# Context (%d parameter(s)):\n",program->context->Dimension) ;
- matrix = cloog_domain_domain2matrix(program->context) ;
- cloog_domain_matrix_print(foo,matrix);
- cloog_domain_matrix_free(matrix);
- fprintf(foo,"1 # Parameter name(s)\n") ;
- for (i=0;i<program->names->nb_parameters;i++)
- fprintf(foo,"%s ",program->names->parameters[i]) ;
-
- /* Statement number. */
- i = 0 ;
- loop = program->loop ;
- while (loop != NULL)
- { i++ ;
- loop = loop->next ;
- }
- fprintf(foo,"\n\n# Statement number:\n%d\n\n",i) ;
-
- /* Iteration domains. */
- i = 1 ;
- loop = program->loop ;
- while (loop != NULL)
- { /* Name of the domain. */
- fprintf(foo,"# Iteration domain of statement %d.\n",i) ;
-
- /* Number of polyhedron inside the union of disjoint polyhedra. */
- j = 0 ;
- polyhedron = /* KB 15.05.2005 remove program->, since otherwise
- the number of polytopes describing the iteration
- space of the first loop will be printed, instead
- of the number of polytopes for the current loop. program->*/loop->domain ;
- while (polyhedron != NULL)
- { j++ ;
- polyhedron = polyhedron->next ;
- }
- fprintf(foo,"%d\n",j) ;
-
- /* The polyhedra themselves. */
- polyhedron = loop->domain ;
- while (polyhedron != NULL)
- { matrix = cloog_domain_domain2matrix(polyhedron) ;
- cloog_domain_matrix_print(foo,matrix);
- cloog_domain_matrix_free(matrix);
- polyhedron = polyhedron->next ;
- }
- /* KB 15.05.2005 : options should be printed once per statement, not once
- per polytope */
- fprintf(foo,"0 0 0 # For future options.\n\n") ;
- i++ ;
- loop = loop->next ;
- }
- fprintf(foo,"\n1 # Iterator name(s)\n") ;
- for (i=0;i<program->names->nb_iterators;i++)
- fprintf(foo,"%s ",program->names->iterators[i]) ;
- fprintf(foo,"\n\n") ;
-
- /* Scattering functions (none since included inside domains). */
- fprintf(foo,"# No scattering functions.\n0\n\n") ;
-}
-
-
-/* cloog_program_dump_loopgen function:
- * This function dumps a CloogProgram structure supposed to be completely
- * filled in a LoopGen input file (foo possibly stdout) such as LoopGen can
- * generate the code for this problem. If the user of CLooG had the bad idea
- * to put the scattering functions directly inside the iteration domains, the
- * time dimension of LoopGen is supposed to be 1.
- * 27 june 2003: first version (should work but do not...).
- */
-void cloog_program_dump_loopgen(FILE * foo, CloogProgram * program)
-{ int i, j, time ;
- Matrix * matrix ;
- Polyhedron * polyhedron ;
- CloogLoop * loop ;
-
- /* Statement number and time dimensions. */
- i = 0 ;
- loop = program->loop ;
- while (loop != NULL)
- { i++ ;
- loop = loop->next ;
- }
- if (program->scattdims)
- time = program->scattdims ;
- else
- time = 1 ;
- fprintf(foo,"%d %d 1\n\n",i,time) ;
-
- fprintf(foo,
- "# CLooG -> LoopGen\n"
- "# This is an automatic dump of an input file from a CloogProgram data\n"
- "# structure. It can be correct ONLY if dumped before loop generation.\n\n") ;
-
- /* Context. */
- fprintf(foo,"# Context (%d parameter(s)):\n1\n",program->context->Dimension) ;
- matrix = cloog_domain_domain2matrix(program->context) ;
- cloog_domain_matrix_print(foo,matrix);
- cloog_domain_matrix_free(matrix);
- fprintf(foo,"\n") ;
-
- /* Iteration domains. */
- i = 1 ;
- loop = program->loop ;
- while (loop != NULL)
- { /* Number of polyhedron inside the union of disjoint polyhedra. */
- j = 0 ;
- polyhedron = program->loop->domain ;
- while (polyhedron != NULL)
- { j++ ;
- polyhedron = polyhedron->next ;
- }
- fprintf(foo,"%d\n",j) ;
-
- /* Name of the domain. */
- fprintf(foo,"# Iteration domain of statement %d.\n",i) ;
-
- /* The polyhedra themselves. */
- polyhedron = loop->domain ;
- while (polyhedron != NULL)
- { matrix = cloog_domain_domain2matrix(polyhedron) ;
- cloog_domain_matrix_print(foo,matrix);
- cloog_domain_matrix_free(matrix);
- polyhedron = polyhedron->next ;
- }
- fprintf(foo,"\n") ;
- i++ ;
- loop = loop->next ;
- }
-}
-
-
-/* cloog_program_dump_omega function:
- * This function dumps a CloogProgram structure supposed to be completely
- * filled in a OMEGA Calculator file (foo possibly stdout) such as OC can
- * generate the code for this problem. If the user of CLooG had the bad idea
- * to put the scattering functions directly inside the iteration domains, they
- * will be added in the corresponding iteration domain for OMEGA with some
- * equalities, so he need to pray (because OMEGA and equalities are really
- * not friends)...
- * December 7th 2003: first version.
- */
-void cloog_program_dump_omega(FILE * foo, CloogProgram * program)
-{ int i, j, k, first, nb_iterators, nb_parameters, max_depth=0,
- statement_number ;
- Polyhedron * polyhedron ;
- CloogLoop * loop ;
- Value sign ;
-
- fprintf(foo,
- "# CLooG -> OMEGA\n"
- "# This is an automatic dump of an input file from a CloogProgram data\n"
- "# structure. It can be correct ONLY if dumped before loop generation.\n\n") ;
-
- nb_parameters = program->context->Dimension ;
-
- /* Context. */
- fprintf(foo,"# Context (%d parameter(s)).\n",nb_parameters) ;
- if (nb_parameters >= 1)
- { fprintf(foo,"Symbolic %s",program->names->parameters[0]) ;
- for (i=1;i<nb_parameters;i++)
- fprintf(foo,", %s",program->names->parameters[i]) ;
- fprintf(foo," ;\n\n") ;
- }
-
- /* Statements. */
- fprintf(foo,"# Iteration domains:\n") ;
- statement_number = 1 ;
- loop = program->loop ;
- while (loop != NULL)
- { nb_iterators = loop->domain->Dimension - nb_parameters ;
- if (nb_iterators > max_depth)
- max_depth = nb_iterators ;
-
- /* Name of the statement. */
- fprintf(foo,"IS%d0:={",statement_number) ;
-
- /* Dimensions. */
- fprintf(foo,"[") ;
- if (nb_iterators-program->scattdims >= 1)
- { fprintf(foo,"%s",program->names->iterators[program->scattdims]) ;
- for (j=program->scattdims+1;j<nb_iterators;j++)
- fprintf(foo,",%s",program->names->iterators[j]) ;
- }
- fprintf(foo,"]: ") ;
-
- /* Number of polyhedron inside the union of disjoint polyhedra
- * (must be 1 for OMEGA, we just check it).
- */
- j = 0 ;
- polyhedron = program->loop->domain ;
- while (polyhedron != NULL)
- { j++ ;
- polyhedron = polyhedron->next ;
- }
- if (j > 1)
- { fprintf(stderr,"[CLooG]ERROR: the problem cannot be dumped for OMEGA.\n");
- exit(0) ;
- }
-
- /* The polyhedra themselves. */
- polyhedron = loop->domain ;
- for (j=program->scattdims;j<polyhedron->NbConstraints;j++)
- { first = 1 ;
-
- if (j > program->scattdims)
- fprintf(foo," && ") ;
-
- /* The coefficients of the iterators and the parameters. */
- for (k=1;k<=polyhedron->Dimension;k++)
- if (polyhedron->Constraint[j][k] != 0)
- { if (!first)
- { if (polyhedron->Constraint[j][k] > 0)
- fprintf(foo,"+") ;
- }
- else
- first = 0 ;
-
- if ((polyhedron->Constraint[j][k] != 1) &&
- (polyhedron->Constraint[j][k] != -1))
- fprintf(foo,VALUE_FMT,polyhedron->Constraint[j][k]) ;
- else
- if (polyhedron->Constraint[j][k] == -1)
- fprintf(foo,"-") ;
-
- if (k<=nb_iterators)
- fprintf(foo,"%s",program->names->iterators[k-1]) ;
- else
- fprintf(foo,"%s",program->names->parameters[k-1-nb_iterators]) ;
- }
-
- /* The constant (k has the good value after the loop). */
- if (polyhedron->Constraint[j][k] != 0)
- { if (!first)
- { if (polyhedron->Constraint[j][k] > 0)
- fprintf(foo,"+") ;
- }
- fprintf(foo,VALUE_FMT,polyhedron->Constraint[j][k]) ;
- }
-
- /* The (in)equality to 0. */
- if (polyhedron->Constraint[j][0] == 0)
- fprintf(foo,"=0") ;
- else
- fprintf(foo,">=0") ;
- }
- fprintf(foo,"} ;\n") ;
-
- if ((loop = loop->next) != NULL)
- statement_number ++ ;
- }
-
- /* Scattering functions (scheduling for OMEGA). */
- loop = program->loop ;
- if (program->scattdims > 0)
- { statement_number = 1 ;
- loop = program->loop ;
- fprintf(foo,"\n# Schedules:\n") ;
-
- while (loop != NULL)
- { nb_iterators = loop->domain->Dimension - nb_parameters ;
- if (nb_iterators > max_depth)
- max_depth = nb_iterators ;
-
- /* Name of the statement. */
- fprintf(foo,"T%d0:={",statement_number) ;
-
- /* Dimensions. */
- fprintf(foo,"[") ;
- if (nb_iterators-program->scattdims >= 1)
- { fprintf(foo,"%s",program->names->iterators[program->scattdims]) ;
- for (j=program->scattdims+1;j<nb_iterators;j++)
- fprintf(foo,",%s",program->names->iterators[j]) ;
- }
- fprintf(foo,"] -> [") ;
-
- /* The functions themselves. */
- polyhedron = loop->domain ;
- for (j=0;j<program->scattdims;j++)
- { first = 1 ;
-
- if (j > 0)
- fprintf(foo,",") ;
-
- /* We assume that the coefficient of the scattering iterator is 1. */
- if ((polyhedron->Constraint[j][j+1] != 1) &&
- (polyhedron->Constraint[j][j+1] != -1))
- { fprintf(stderr,"[CLooG]ERROR: scattering dimension coefficients must "
- "be 1 or -1to dump for OMEGA.") ;
- exit(0) ;
- }
-
- /* Depending on the sign of the scattering coefficient, the
- * coefficient for the scheduling expression.
- */
- if (polyhedron->Constraint[j][j+1] == 1)
- sign = -1 ;
- else
- sign = 1 ;
-
- /* The coefficients of the iterators and the parameters. */
- for (k=program->scattdims+1;k<=polyhedron->Dimension;k++)
- if (polyhedron->Constraint[j][k] != 0)
- { if (!first)
- { if (sign*polyhedron->Constraint[j][k] > 0)
- fprintf(foo,"+") ;
- }
- else
- first = 0 ;
-
- if ((polyhedron->Constraint[j][k] != 1) &&
- (polyhedron->Constraint[j][k] != -1))
- fprintf(foo,VALUE_FMT,sign*polyhedron->Constraint[j][k]) ;
- else
- if (sign*polyhedron->Constraint[j][k] == -1)
- fprintf(foo,"-") ;
-
- if (k<=nb_iterators)
- fprintf(foo,"%s",program->names->iterators[k-1]) ;
- else
- fprintf(foo,"%s",program->names->parameters[k-1-nb_iterators]) ;
- }
-
- /* The constant (k has the good value after the loop). */
- if (polyhedron->Constraint[j][k] != 0)
- { if (!first)
- { if (sign*polyhedron->Constraint[j][k] > 0)
- fprintf(foo,"+") ;
- }
- fprintf(foo,VALUE_FMT,sign*polyhedron->Constraint[j][k]) ;
- }
- else
- { if (first)
- fprintf(foo,"0") ;
- }
- }
-
- /* The scheduling expressions 'a la CLooG' end with the original
- * dimensions...
- */
- if (nb_iterators >= 1)
- { for (j=program->scattdims;j<nb_iterators;j++)
- fprintf(foo,",%s",program->names->iterators[j]) ;
- }
-
- /* ...and possibly zeros in order for the scheduling functions to have
- * the same dimension number.
- */
- for (j=nb_iterators;j<max_depth;j++)
- fprintf(foo,",0") ;
-
- fprintf(foo,"]} ;\n") ;
-
- if ((loop = loop->next) != NULL)
- statement_number ++ ;
- }
- }
-
- /* The codegen call. */
- fprintf(foo,"\n# CodeGen call:\n") ;
- fprintf(foo,"codegen %d ",max_depth) ;
- if (statement_number > 0)
- { if (program->scattdims != 0)
- fprintf(foo,"T10:") ;
- fprintf(foo,"IS10") ;
- for (i=1;i<statement_number;i++)
- { fprintf(foo,", ") ;
- if (program->scattdims != 0)
- fprintf(foo,"T%d0:",i+1) ;
- fprintf(foo,"IS%d0",i+1) ;
- }
- }
- fprintf(foo," ;\n") ;
-}
-
-
-/* cloog_program_pprint function:
- * This function prints the content of a CloogProgram structure (program) into a
- * file (foo, possibly stdout), in a C-like language.
- */
-void cloog_program_pprint(foo, program, options)
-FILE * foo ;
-CloogProgram * program ;
-CloogOptions * options ;
-{ CloogInfos * infos ;
-
- infos = (CloogInfos *)malloc(sizeof(CloogInfos)) ;
- infos->nb_iterators = program->names->nb_iterators ;
- infos->nb_parameters = program->names->nb_parameters ;
- infos->iterators = program->names->iterators ;
- infos->parameters = program->names->parameters ;
- infos->scattdims = program->scattdims ;
- infos->options = options ;
- /* Allocation for the array of strides, there is a +1 since the statement can
- * be included inside an external loop without iteration domain.
- */
- infos->stride =(Value *)malloc((infos->nb_iterators+1)*sizeof(Value)) ;
-
- if (program->language == 'f')
- infos->language = LANGUAGE_FORTRAN ;
- else
- infos->language = LANGUAGE_C ;
-
- if (program->language == 'f')
- fprintf(foo,"! Generated from %s by CLooG v%s %s bits in %.2fs.\n",
- options->name,CLOOG_RELEASE,CLOOG_VERSION,options->time) ;
- else
- fprintf(foo,"/* Generated from %s by CLooG v%s %s bits in %.2fs. */\n",
- options->name,CLOOG_RELEASE,CLOOG_VERSION,options->time) ;
-
- pprint(foo,program->loop,NULL,1,0,infos) ;
-
- free(infos->stride) ;
- free(infos) ;
-}
-
-
-/******************************************************************************
- * Memory deallocation function *
- ******************************************************************************/
-
-
-/* cloog_program_free function:
- * This function frees the allocated memory for a CloogProgram structure.
- */
-void cloog_program_free(CloogProgram * program)
-{ cloog_names_free(program->names) ;
- cloog_loop_free(program->loop) ;
- cloog_domain_free(program->context) ;
- free(program) ;
-}
-
-
-/******************************************************************************
- * Reading function *
- ******************************************************************************/
-
-
-/* cloog_program_read function:
- * This function read the informations to put in a CloogProgram structure from
- * a file (foo, possibly stdin). It returns a pointer to a CloogProgram
- * structure containing the read informations.
- * October 25th 2001: first version.
- * September 9th 2002: - the big reading function is now splitted in several
- * functions (one per read data structure).
- * - adaptation to the new file format with naming.
- */
-CloogProgram * cloog_program_read(FILE * foo)
-{ int i, nb_statements, nb_parameters, nb_iterators ;
- char s[MAX_STRING], language, ** scat_names, prefix[2]={'c','\0'} ;
- CloogLoop * current, * next ;
- CloogNames * names ;
- CloogDomainList * scattering ;
- CloogProgram * p ;
-
- /* Memory allocation for the CloogProgram structure. */
- p = (CloogProgram *)malloc(sizeof(CloogProgram)) ;
- if (p == NULL)
- { fprintf(stderr, "[CLooG]ERROR: memory overflow.\n") ;
- exit(1) ;
- }
-
- /* Memory allocation for the CloogNames structure. */
- names = (CloogNames *)malloc(sizeof(CloogNames)) ;
- if (names == NULL)
- { fprintf(stderr, "[CLooG]ERROR: memory overflow.\n") ;
- exit(1) ;
- }
-
- /* First of all, we read the language to use. */
- while (fgets(s,MAX_STRING,foo) == 0) ;
- while ((*s=='#'||*s=='\n') || (sscanf(s," %c",&language)<1))
- fgets(s,MAX_STRING,foo) ;
- p->language = language ;
-
- /* We then read the context data. */
- p->context = cloog_domain_read(foo) ;
- nb_parameters = p->context->Dimension ;
-
- /* Reading of the parameter names. */
- names->nb_parameters = nb_parameters ;
- names->parameters = cloog_names_read(foo,nb_parameters,NULL,FIRST_PARAMETER) ;
-
- /* We read the statement number. */
- while (fgets(s,MAX_STRING,foo) == 0) ;
- while ((*s=='#'||*s=='\n') || (sscanf(s," %d",&nb_statements)<1))
- fgets(s,MAX_STRING,foo) ;
-
- /*printf("%d ",nb_statements) ;*/
-
- /* Domains reading for each statement. */
- if (nb_statements > 0)
- { /* Reading of the first domain. */
- p->loop = cloog_loop_read(foo,1,nb_parameters) ;
- if (p->loop->domain != NULL)
- nb_iterators = p->loop->domain->Dimension - nb_parameters ;
- else
- nb_iterators = 0 ;
-
- /* And the same for each next domain. */
- current = p->loop ;
- for (i=2;i<=nb_statements;i++)
- { next = cloog_loop_read(foo,i,nb_parameters) ;
- if (next->domain != NULL)
- if (next->domain->Dimension - nb_parameters > nb_iterators)
- nb_iterators = next->domain->Dimension - nb_parameters ;
-
- current->next = next ;
- current = current->next ;
- }
-
- /* Reading of the iterator names. */
- names->nb_iterators = nb_iterators ;
- names->iterators = cloog_names_read(foo,nb_iterators,NULL,FIRST_ITERATOR) ;
- p->names = names ;
-
- /* Reading and puting the scattering data in program structure. */
- scattering = cloog_domain_list_read(foo) ;
-
- if (scattering != NULL)
- { if (cloog_domain_list_quick_same(scattering))
- { fprintf(stderr, "[CLooG]WARNING: some scattering functions are "
- "similar.\n") ;
- }
-
- p->scattdims = scattering->domain->Dimension - p->loop->domain->Dimension;
- scat_names = cloog_names_read(foo,p->scattdims,prefix,'1') ;
- cloog_program_scatter(p,scattering,scat_names) ;
- cloog_domain_list_free(scattering) ;
- /* Now we can free scat_names since cloog_program_scatter copied it. */
- for (i=0;i<p->scattdims;i++)
- free(scat_names[i]) ;
- free(scat_names) ;
- }
- else
- p->scattdims = 0 ;
- }
- else
- { p->loop = NULL ;
- p->names = NULL ;
- }
-
- return(p) ;
-}
-
-
-/******************************************************************************
- * Processing functions *
- ******************************************************************************/
-
-
-/* cloog_program_statement_count function:
- * This function returns the number of statements in the whole program. This has
- * nothing to do here, and I don't remember why and when I wrote it, anyway...
- */
-int cloog_program_statement_count(CloogLoop * start)
-{ int count=0 ;
- CloogLoop * loop ;
- CloogStatement * statement ;
-
- loop = start ;
-
- while (loop != NULL)
- { if (loop->inner != NULL)
- count += cloog_program_statement_count(loop->inner) ;
-
- statement = loop->statement ;
-
- while (statement != NULL)
- { count ++ ;
- statement = statement->next ;
- }
- loop = loop->next ;
- }
-
- return count ;
-}
-
-
-/* cloog_program_generate function:
- * This function calls the Quillere algorithm for loop scanning. (see the
- * Quillere paper) and calls the loop simplification function.
- * - depth is the loop depth we want to optimize (guard free as possible),
- * the first loop depth is 1 and anegative value is the infinity depth.
- * - sep_level is the level number where we want to start loop separation.
- * October 26th 2001: first version.
- */
-CloogProgram * cloog_program_generate(program, options)
-CloogProgram * program ;
-CloogOptions * options ;
-{ float time ;
- struct rusage start, end ;
- CloogLoop * loop, * simplified ;
-
- if ((program->scattdims > options->l) && (options->l > 0))
- fprintf(stderr, "[CLooG]WARNING: -l depth is less than scattering dimension "
- "number (the generated code may be illegal).\n") ;
-
- if (program->loop == NULL)
- return program ;
- else
- { loop = program->loop ;
- getrusage(RUSAGE_SELF, &start) ;
-
- /* Here we go ! */
- loop = cloog_loop_generate(loop,program->context,1,
- program->context->Dimension,options) ;
-
- getrusage(RUSAGE_SELF, &end) ;
- /* We calculate the time spent in code generation. */
- time = (end.ru_utime.tv_usec - start.ru_utime.tv_usec)/(float)(MEGA) ;
- time += (float)(end.ru_utime.tv_sec - start.ru_utime.tv_sec) ;
- options->time = time ;
-
- if (loop == NULL)
- { program->loop = NULL ;
- return program ;
- }
- else
- { /*cloog_loop_print(stdout,loop) ;*/
- simplified = cloog_loop_simplify(loop,program->context,1,
- program->context->Dimension);
- program->loop = simplified ;
- /*program->loop = loop ;*/
- return program ;
- }
- }
-}
-
-
-/* cloog_program_scatter function:
- * This function adds the scattering (scheduling) informations in a program.
- * If names is NULL, this function create names itself such that the i^th
- * name is ci.
- * November 6th 2001: first version.
- */
-void cloog_program_scatter(program, scattering, names)
-CloogProgram * program ;
-CloogDomainList * scattering ;
-char ** names ;
-{ int i, scattering_dim, scattering_dim2, new_dim, not_enough_constraints=0 ;
- char ** iterators ;
- CloogLoop * loop ;
-
- if ((program != NULL) && (scattering != NULL))
- { loop = program->loop ;
-
- /* We compute the scattering dimension and check it is >=0. */
- scattering_dim = scattering->domain->Dimension - loop->domain->Dimension ;
- if (scattering_dim <= 0)
- { fprintf(stderr, "[CLooG]ERROR: scattering has not enough dimensions.\n") ;
- exit(1) ;
- }
- if (scattering_dim >= scattering->domain->NbConstraints)
- not_enough_constraints ++ ;
-
- /* We add scattering names in program->iterators. */
- new_dim = program->names->nb_iterators + scattering_dim ;
- iterators = (char **)malloc(new_dim*sizeof(char *)) ;
- if (iterators == NULL)
- { fprintf(stderr, "[CLooG]ERROR: memory overflow.\n") ;
- exit(1) ;
- }
- for (i=0;i<scattering_dim;i++)
- { iterators[i] = (char *)malloc(MAX_NAME*sizeof(char)) ;
- if (iterators[i] == NULL)
- { fprintf(stderr, "[CLooG]ERROR: memory overflow.\n") ;
- exit(1) ;
- }
- if (names != NULL)
- strcpy(iterators[i],names[i]) ;
- else
- sprintf(iterators[i],"c%d",i+1) ;
- }
- for (i=scattering_dim;i<new_dim;i++)
- iterators[i] = program->names->iterators[i-scattering_dim] ;
- free(program->names->iterators) ;
- program->names->iterators = iterators ;
-
- /* We update nb_iterators. */
- program->names->nb_iterators = new_dim ;
-
- /* Finally we scatter all loops. */
- cloog_loop_scatter(loop,scattering->domain) ;
- loop = loop->next ;
- scattering = scattering->next ;
-
- while ((loop != NULL) && (scattering != NULL))
- { scattering_dim2 = scattering->domain->Dimension - loop->domain->Dimension;
- if (scattering_dim2 != scattering_dim)
- { fprintf(stderr, "[CLooG]ERROR: "
- "scattering dimensions are not the same.\n") ;
- exit(1) ;
- }
- if (scattering_dim2 >= scattering->domain->NbConstraints)
- not_enough_constraints ++ ;
-
- cloog_loop_scatter(loop,scattering->domain) ;
- loop = loop->next ;
- scattering = scattering->next ;
- }
- if ((loop != NULL) || (scattering != NULL))
- fprintf(stderr, "[CLooG]WARNING: "
- "there is not a scattering for each statement.\n");
-
- if (not_enough_constraints)
- fprintf(stderr, "[CLooG]WARNING: not enough constraints for "
- "%d scattering function(s).\n",not_enough_constraints) ;
- }
-}
-
diff --git a/test/reports/michael_classen_03-05-2005.eml b/test/reports/michael_classen_03-05-2005.eml
deleted file mode 100644
index 9a093dd..0000000
--- a/test/reports/michael_classen_03-05-2005.eml
+++ /dev/null
@@ -1,333 +0,0 @@
-X-UIDL: 39081.1115129722
-X-Mozilla-Status: 0003
-X-Mozilla-Status2: 00000000
-Received: from soleil.uvsq.fr (soleil.uvsq.fr [193.51.24.1])
- by relay-4m.club-internet.fr (Postfix) with ESMTP id 6C12EE778
- for <netced@club-internet.fr>; Tue, 3 May 2005 16:15:21 +0200 (CEST)
-Received: from torquenada.prism.uvsq.fr (torquenada.prism.uvsq.fr [193.51.25.9])
- by soleil.uvsq.fr (8.12.11/jtpda-5.4) with ESMTP id j43EFKjc067378
- for <netced@club-internet.fr>; Tue, 3 May 2005 16:15:20 +0200 (CEST)
-Received: from soleil.uvsq.fr (root@soleil.uvsq.fr [193.51.24.1])
- by torquenada.prism.uvsq.fr (8.11.4/jtpda-5.3.2) with ESMTP id j43EFKC22332
- for <cedric.bastoul@prism.uvsq.fr>; Tue, 3 May 2005 16:15:20 +0200 (MEST)
-Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78])
- by soleil.uvsq.fr (8.12.11/jtpda-5.4) with ESMTP id j43EFKO1067308
- for <cedric.bastoul@prism.uvsq.fr>; Tue, 3 May 2005 16:15:20 +0200 (CEST)
-Received: from rproxy.gmail.com (rproxy.gmail.com [64.233.170.198])
- by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j43EFEcx010341
- for <cedric.bastoul@inria.fr>; Tue, 3 May 2005 16:15:14 +0200
-Received: by rproxy.gmail.com with SMTP id g11so2187724rne
- for <cedric.bastoul@inria.fr>; Tue, 03 May 2005 07:15:13 -0700 (PDT)
-DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws;
- s=beta; d=gmail.com;
- h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type;
- b=mURNw2A/GhnOJGVL9JU10V0oyuem20F2o2SyAnQ92afBYYjaL6F4nCHAOvnFR22dO+BnJzjCtHtWrYaPY7pVPC3GTAwhbJWc6GryjUljT42k06fdCCQtJiveQf+80nbowL2H2d+S+sCP6WUU6l97qjkKidMRQJ5HX7+aZUGL9PQ=
-Received: by 10.38.72.63 with SMTP id u63mr7621232rna;
- Tue, 03 May 2005 07:15:13 -0700 (PDT)
-Received: by 10.38.76.64 with HTTP; Tue, 3 May 2005 07:15:12 -0700 (PDT)
-Message-ID: <fb09e0cb05050307157dc259b4@mail.gmail.com>
-Date: Tue, 3 May 2005 16:15:12 +0200
-From: Michael Classen <michael.classen@gmail.com>
-Reply-To: michael.classen@gmx.net
-To: =?ISO-8859-1?Q?C=E9dric_Bastoul?= <cedric.bastoul@inria.fr>
-Subject: Boehm garbage-collector for CLooG
-Mime-Version: 1.0
-Content-Type: multipart/mixed;
- boundary="----=_Part_4295_2513784.1115129712334"
-X-Miltered: at soleil.uvsq.fr with ID 42778778.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!
-X-Miltered: at soleil.uvsq.fr with ID 42778778.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!
-X-Miltered: at nez-perce with ID 42778772.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!
-X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.7.5 (soleil.uvsq.fr [193.51.24.1]); Tue, 03 May 2005 16:15:20 +0200 (CEST)
-X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-1.7.5 (soleil.uvsq.fr [193.51.24.1]); Tue, 03 May 2005 16:15:20 +0200 (CEST)
-X-j-chkmail-Score: MSGID : 42778778.000 on soleil.uvsq.fr : j-chkmail score : X : 0/50 1
-X-Antivirus: scanned by sophie at soleil.uvsq.fr
-X-Antivirus: scanned by sophie at soleil.uvsq.fr
-Status:
-X-Mmail: \Recent
-X-M-Uid: 39081.1115129722
-
-------=_Part_4295_2513784.1115129712334
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: quoted-printable
-Content-Disposition: inline
-
-Hello C=E9dric!
-
-As I currently fill you up with annoying problems and work, I thought
-I could in turn provide some help myself.
-
-I played around with the famous B=F6hm garbage-collector for C/C++ (see:
-http://www.hpl.hp.com/personal/Hans_Boehm/gc/) and managed to
-integrate it into a version of CLooG (0.12.3). I modified the
-configure.in script to include a new option "--with-boehm-gc DIR" in
-order to be able to use it if one wants to.
-
-All changes in the source-code of your files are restricted to a
-simple #include "gc.h" directive, that is guarded by a #ifdef
-USE_BOEHMGC. This include directive is inserted at the top of each
-source file and it includes a small header file that performs some
-includes and defines.
-
-I'm sending you my modified configure.in, the additional header file
-and an example of the modiefied source files for a start. If you need
-further information, feel free to ask me.
-
-This garbage collector seems not to improve CLooG's memory usage by
-far, but it could help in your future development (it usually speeds
-up the development process by a big factor).
-
-ciao,
-Michael
-
-------=_Part_4295_2513784.1115129712334
-Content-Type: application/octet-stream; name="configure.in"
-Content-Transfer-Encoding: base64
-Content-Disposition: attachment; filename="configure.in"
-
-CmRubCAvKiotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
-LS0tLS0tLS0tLS0tLS0tLS0tKioKZG5sICAqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-IENMb29HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKgpkbmwgICoqLS0tLS0tLS0t
-LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
-LSoqCmRubCAgKiogICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmUuaW4gICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgKioKZG5sICAqKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
-LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qKgpkbmwgICoqICAgICAg
-ICAgICAgICAgICAgIEZpcnN0IHZlcnNpb246IGF1Z3VzdCA3dGggMjAwMiAgICAgICAgICAgICAg
-ICAgICoqCmRubCAgKiotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
-LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKiovCmRubApkbmwgSW5wdXQgZmlsZSBmb3IgYXV0b2Nv
-bmYgdG8gYnVpbGQgYSBjb25maWd1cmF0aW9uIHNoZWxsc2NyaXB0LgpkbmwgVG8gYnVpbGQgdGhl
-IGNvbmZpZ3VyZSBzY3JpcHQgZnJvbSB0aGUgQ0xvb0cncyB0b3AtbGV2ZWwgZGlyZWN0b3J5LCB1
-c2UKZG5sIGF1dG9jb25mIC1sIGF1dG9jb25mIGF1dG9jb25mL2NvbmZpZ3VyZS5pbiA+IGNvbmZp
-Z3VyZQoKZG5sIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKgpkbmwgKiAgICAgICAgICAgICAgIENMb29HIDog
-dGhlIENodW5reSBMb29wIEdlbmVyYXRvciAoZXhwZXJpbWVudGFsKSAgICAgICAgICAqCmRubCAq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioKZG5sICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpkbmwgKiBDb3B5cmlnaHQg
-KEMpIDIwMDEgQ2VkcmljIEJhc3RvdWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAqCmRubCAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKZG5sICogVGhpcyBpcyBmcmVlIHNvZnR3YXJl
-OyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5IGl0IHVuZGVyICAgKgpkbmwg
-KiB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hl
-ZCBieSB0aGUgRnJlZSAgICAqCmRubCAqIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJz
-aW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yIChhdCB5b3VyICAgICAgICoKZG5sICogb3B0aW9uKSBh
-bnkgbGF0ZXIgdmVyc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgKgpkbmwgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCmRubCAqIFRoaXMgc29mdHdhcmUgaXMgZGlz
-dHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0ICAgICoKZG5s
-ICogV0lUSE9VVCBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50
-eSBvZiAgICAgICAgICAgICAgKgpkbmwgKiBNRVJDSEFOVEFCSUxJVFlvciBGSVRORVNTIEZPUiBB
-IFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgR05VICAgICAgICAqCmRubCAqIEdlbmVyYWwg
-UHVibGljIExpY2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4gICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICoKZG5sICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpkbmwgKiBZb3Ugc2hvdWxkIGhhdmUgcmVj
-ZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhbG9uZyAqCmRu
-bCAqIHdpdGggc29mdHdhcmU7IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUgRm91
-bmRhdGlvbiwgSW5jLiwgICAgICoKZG5sICogNTkgVGVtcGxlIFBsYWNlLCBTdWl0ZSAzMzAsIEJv
-c3RvbiwgTUEgIDAyMTExLTEzMDcgVVNBICAgICAgICAgICAgICAgICAgKgpkbmwgKiAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAqCmRubCAqIENMb29HLCB0aGUgQ2h1bmt5IExvb3AgR2VuZXJhdG9yICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKZG5sICogV3JpdHRlbiBieSBDZWRyaWMg
-QmFzdG91bCwgQ2VkcmljLkJhc3RvdWxAaW5yaWEuZnIgICAgICAgICAgICAgICAgICAgICAgKgpk
-bmwgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAqCmRubCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCgpBQ19QUkVSRVEo
-Mi4xMykKQUNfSU5JVChzb3VyY2UvY2xvb2cuYykKQUNfQ09ORklHX0FVWF9ESVIoYXV0b2NvbmYp
-ClJFTEVBU0U9IjAuMTIuMyIKZG5sIGRlZmF1bHQgdmVyc2lvbgpWRVJTSU9OPSI2NCIKCmRubCAv
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioKZG5sICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2hl
-Y2tpbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpkbmwgICoqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqLwoKCmRubCBDaGVja3MgZm9yIHR5cGVkZWZzLCBzdHJ1Y3R1cmVzLCBhbmQgY29tcGls
-ZXIgY2hhcmFjdGVyaXN0aWNzLgpBQ19DQU5PTklDQUxfU1lTVEVNIAoKCmRubCBDaGVja3MgZm9y
-IHByb2dyYW1zLgpBQ19QUk9HX0NDCkFDX1BST0dfTE5fUwpBQ19QUk9HX1JBTkxJQgpBQ19QUk9H
-X01BS0VfU0VUCkFDX0NIRUNLX1BST0coQ0QsIGNkKQpkbmwgQ29uZmlndXJlIG5lZWRzIGFuIGVt
-cHR5IGluc3RhbGwuc2ggZmlsZSB3aXRoIHRoaXMsIGkgSEFURSB0aGF0Li4uCkFDX1BST0dfSU5T
-VEFMTAoKCmRubCBDaGVja3MgZm9yIHR5cGVkZWZzLCBzdHJ1Y3R1cmVzLCBhbmQgY29tcGlsZXIg
-Y2hhcmFjdGVyaXN0aWNzLgpBQ19DX0NPTlNUCkFDX1RZUEVfU0laRV9UCgoKZG5sIENoZWNrcyBm
-b3IgbGlicmFyaWVzLgpkbmwgUmVwbGFjZSBgbWFpbicgd2l0aCBhIGZ1bmN0aW9uIGluIC1sYzoK
-QUNfQ0hFQ0tfTElCKGMsbWFpbikKCgpkbmwgQ2hlY2tzIGZvciBoZWFkZXIgZmlsZXMuCkFDX0hF
-QURFUl9TVERDCgoKZG5sIENoZWNrcyBmb3IgbGlicmFyeSBmdW5jdGlvbnMuCkFDX0NIRUNLX0ZV
-TkNTKHN0cnRvbCkKCgpkbmwgU2V0IHNvbWUgc3lzdGVtIGRlcGVuZGFudCB2YWx1ZXMuCmNhc2Ug
-IiR0YXJnZXQiIGluCiAgaSotcGMtY3lnd2luKQoJU0hFWFQ9ImRsbCIKCUVYRUNfU1VGRklYPSIu
-ZXhlIgkKCUVYVFJBX0ZMQUdTPSItRENZR1dJTiIKCUVYVFJBX0xJQlM9Ii1sY3lnd2luIC1sa2Vy
-bmVsMzIiCglDTE9PR0xJQj0iY2xvb2dzdGF0aWNsaWIiCglJTlNUQUxMX0NMT09HTElCPSJpbnN0
-YWxsX2Nsb29nc3RhdGljbGliIiA7OwogICopCglTSEVYVD0ic28iCglFWEVDX1NVRkZJWD0iIgoJ
-RVhUUkFfRkxBR1M9IiIKCUVYVFJBX0xJQlM9IiIKCUNMT09HTElCPSJjbG9vZ3NoYXJlZGxpYiBj
-bG9vZ3N0YXRpY2xpYiIKCUlOU1RBTExfQ0xPT0dMSUI9Imluc3RhbGxfY2xvb2dzaGFyZWRsaWIg
-aW5zdGFsbF9jbG9vZ3N0YXRpY2xpYiIgOzsKZXNhYwoKCmRubCAvKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioK
-ZG5sICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPcHRpb24gc2V0dGluZyAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgKgpkbmwgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwoKCmRubCBUaGUg
-dHdvIGRpZmZlcmVudCBwYWNrYWdlcyB0aGF0IGNhbiBiZSBidWlsdCBhbmQgaW5zdGFsbGVkLgpD
-TE9PRz0iY2xvb2ciCklOU1RBTExfQ0xPT0c9Imluc3RhbGxfY2xvb2ciCgoKZG5sIE9wdGlvbnMu
-CmRubCAtLXdpdGgtY2xvb2c9eWVzLCAtLXdpdGgtY2xvb2c9bm8gb3UgLS13aXRob3V0LWNsb29n
-CkFDX0FSR19XSVRIKGNsb29nLAogICAgICAgICAgICBbICAtLXdpdGhvdXQtY2xvb2cgICAgICAg
-ICBkaXNhYmxlIHRoZSBjb21waWxhdGlvbiBvZiBjbG9vZ10sCiAgICAgICAgICAgIFsgZWNobyAi
-UGFja2FnZSBjbG9vZyA6ICR3aXRodmFsIiAmJgogICAgICAgICAgICAgIGlmIHRlc3QgIiR3aXRo
-dmFsIj0ibm8iIDsgdGhlbiAJCiAgICAgICAgICAgICAgICBDTE9PRz0iIgogICAgICAgICAgICAg
-ICAgSU5TVEFMTF9DTE9PRz0iIgogICAgICAgICAgICAgIGZpIF0pCmRubCAtLXdpdGgtbGliPXll
-cywgICAtLXdpdGgtbGliPW5vICAgb3UgLS13aXRob3V0LWxpYgpBQ19BUkdfV0lUSChsaWIsCiAg
-ICAgICAgICAgIFsgIC0td2l0aG91dC1saWIgICAgICAgICAgIGRpc2FibGUgdGhlIGNvbXBpbGF0
-aW9uIG9mIGNsb29nJ3MgbGliXSwKICAgICAgICAgICAgWyBlY2hvICJQYWNrYWdlIGNsb29nbGli
-IDogJHdpdGh2YWwiICYmCiAgICAgICAgICAgICAgaWYgdGVzdCAiJHdpdGh2YWwiPSJubyIgOyB0
-aGVuIAkKICAgICAgICAgICAgICAgIENMT09HTElCPSIiCiAgICAgICAgICAgICAgICBJTlNUQUxM
-X0NMT09HTElCPSIiCiAgICAgICAgICAgICAgZmkgXSkKZG5sIC0td2l0aC1wb2x5bGliPXBvbHls
-aWItcGF0aApBQ19BUkdfV0lUSChwb2x5bGliLAogICAgICAgICAgICBbICAtLXdpdGgtcG9seWxp
-Yj1ESVIgICAgICBESVIgTG9jYXRpb24gb2YgdGhlIFBvbHlMaWJdLAogICAgICAgICAgICBbIGVj
-aG8gIlBhY2thZ2UgcG9seWxpYiA6ICR3aXRodmFsIiAmJiBwb2x5bGliX3BhY2thZ2U9JHdpdGh2
-YWxdLAogICAgICAgICAgICBbIHBvbHlsaWJfcGFja2FnZT15ZXMgXSkKQUNfQVJHX1dJVEgoYml0
-cywKCSAgICBbICAtLXdpdGgtYml0cz0zMnw2NCAgICAgICBQb2x5TGliIGxpYnJhcnkgdHlwZSB0
-byB1c2VdLAoJICAgIFsgZWNobyAicG9seWxpYiR3aXRodmFsIjsgVkVSU0lPTj0kd2l0aHZhbCBd
-KQoKZG5sIC0td2l0aC1ib2VobWdjPWJvZWhtZ2MtcGF0aApBQ19BUkdfV0lUSChib2VobWdjLAog
-ICAgICAgICAgICBbICAtLXdpdGgtYm9laG1nYz1ESVIgICAgICBESVIgTG9jYXRpb24gb2YgdGhl
-IEJvZWhtZ2NdLAogICAgICAgICAgICBbIGVjaG8gIlBhY2thZ2UgYm9laG1nYyA6ICR3aXRodmFs
-IiAmJiBib2VobWdjX3BhY2thZ2U9JHdpdGh2YWxdLAogICAgICAgICAgICBbIGJvZWhtZ2NfcGFj
-a2FnZT15ZXMgXSkKCmRubCBQYWNrYWdlcyB0byBidWlsZC4KUEFDS0FHRVM9IiRDTE9PR0xJQiAk
-Q0xPT0ciCklOU1RBTExfUEFDS0FHRVM9IiRJTlNUQUxMX0NMT09HTElCICRJTlNUQUxMX0NMT09H
-IgoKCmRubCAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioKZG5sICAqICAgICAgICAgICAgICAgICAgICAgICAg
-ICBXaGVyZSBpcyBQb2x5TGliPyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpkbmwgICoq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqLwoKcG9seWxpYnM9InBvbHlsaWI2NCBwb2x5bGliMzIiCmNhc2UgIiRW
-RVJTSU9OIiBpbgogICAgMzIpCglwb2x5bGlicz1wb2x5bGliMzIKICAgIDs7CiAgICA2NCkKCXBv
-bHlsaWJzPXBvbHlsaWI2NAogICAgOzsKICAgIGdtcCkKCUFDX01TR19FUlJPUihnbXAgcG9seWxp
-YiBub3Qgc3VwcG9ydGVkICh5ZXQpKQogICAgOzsKZXNhYwoKZG5sIENoZWNraW5nIGZvciBQb2x5
-TGliCkFDX1NVQlNUKGNsX2N2X3BvbHlsaWIpCkFDX01TR19DSEVDS0lORyh3aGV0aGVyIFBvbHlM
-aWIgd29ya3MpCmlmIHRlc3QgIiRwb2x5bGliX3BhY2thZ2UiID0gIm5vIjsgdGhlbgogIEFDX01T
-R19SRVNVTFQobm8pCiAgQUNfTVNHX0VSUk9SKENhbid0IGZpbmQgUG9seUxpYi4pCmVsc2UKICBB
-Q19NU0dfUkVTVUxUKCkKICBpZiB0ZXN0ICIkcG9seWxpYl9wYWNrYWdlIiAhPSAieWVzIjsgdGhl
-bgogICAgUE9MWUxJQl9ESVI9JHBvbHlsaWJfcGFja2FnZQogICAgUE9MWUxJQl9MSUI9JFBPTFlM
-SUJfRElSL2xpYgogICAgQ1BQRkxBR1M9Ii1JJFBPTFlMSUJfRElSL2luY2x1ZGUgJENQUEZMQUdT
-IgogICAgTERGTEFHUz0iLUwkUE9MWUxJQl9ESVIvbGliICRMREZMQUdTIgogIGZpCiAgZm9yIGNs
-X2N2X3BvbHlsaWIgaW4gJHBvbHlsaWJzOyBkbwogICAgQUNfQ0hFQ0tfTElCKCRjbF9jdl9wb2x5
-bGliLFBvbHloZWRyb25UU29ydCxbYnJlYWtdKQogICAgY2xfY3ZfcG9seWxpYj1taXNzaW5nCiAg
-ZG9uZQogIGlmIHRlc3QgIiRjbF9jdl9wb2x5bGliIiA9ICJtaXNzaW5nIjsgdGhlbgogICAgQUNf
-TVNHX0VSUk9SKENhbid0IGZpbmQgUG9seUxpYi4pCiAgZWxzZQogICAgTElCUz0iLWwkY2xfY3Zf
-cG9seWxpYiAkTElCUyIKICBmaQogIEFDX0NIRUNLX0hFQURFUihwb2x5bGliLyRjbF9jdl9wb2x5
-bGliLmgsW10sCiAgICAgICAgICAgICAgIFtBQ19NU0dfRVJST1IoQ2FuJ3QgZmluZCBQb2x5TGli
-IGhlYWRlcnMuKV0pCmZpCgpkbmwgQ2hlY2tpbmcgZm9yIEJvZWhtZ2MKQUNfTVNHX0NIRUNLSU5H
-KHdoZXRoZXIgQm9laG1nYyB3b3JrcykKaWYgdGVzdCAiJGJvZWhtZ2NfcGFja2FnZSIgPSAibm8i
-OyB0aGVuCiAgQUNfTVNHX1JFU1VMVChubykKICBBQ19NU0dfRVJST1IoQ2FuJ3QgZmluZCBCb2Vo
-bWdjLikKZWxzZQogIEFDX01TR19SRVNVTFQoKQogIGlmIHRlc3QgIiRib2VobWdjX3BhY2thZ2Ui
-ICE9ICJ5ZXMiOyB0aGVuCiAgICBCT0VITUdDX0RJUj0kYm9laG1nY19wYWNrYWdlCiAgICBCT0VI
-TUdDX0xJQj0kQk9FSE1HQ19ESVIvbGliCiAgICBDUFBGTEFHUz0iLUkkQk9FSE1HQ19ESVIvaW5j
-bHVkZSAkQ1BQRkxBR1MiCiAgICBMREZMQUdTPSItTCRCT0VITUdDX0RJUi9saWIgJExERkxBR1Mi
-CiAgZmkKICBBQ19DSEVDS19MSUIoZ2MsR0NfbWFsbG9jLFtib2VobWdjPWZvdW5kXSkKICBpZiB0
-ZXN0ICIkYm9laG1nYyIgIT0gImZvdW5kIjsgdGhlbgogICAgQUNfTVNHX0VSUk9SKENhbid0IGZp
-bmQgQm9laG1nYy4pCiAgZWxzZQogICAgTElCUz0iJExJQlMgLWxnYyIKICAgIENQUEZMQUdTPSIt
-RFVTRV9CT0VITUdDICRDUFBGTEFHUyIKICBmaQpmaQoKCmRubCAvKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioK
-ZG5sICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN1YnN0aXR1dGlvbnMgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgKgpkbmwgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwoKCmRubCBTdWJz
-dGl0dXRpb25zIHRvIGRvIGluIE1ha2VmaWxlLmluLgpBQ19TVUJTVChSRUxFQVNFKQpBQ19TVUJT
-VCh0YXJnZXQpCkFDX1NVQlNUKENDKQpBQ19TVUJTVChMTl9TKQpBQ19TVUJTVChSQU5MSUIpCkFD
-X1NVQlNUKFNIRVhUKQpBQ19TVUJTVChFWEVDX1NVRkZJWCkKQUNfU1VCU1QoRVhUUkFfRkxBR1Mp
-CkFDX1NVQlNUKEVYVFJBX0xJQlMpCgpBQ19TVUJTVChQT0xZTElCX0xJQikKQUNfU1VCU1QocHJl
-Zml4KQpBQ19TVUJTVChleGVjX3ByZWZpeCkKQUNfU1VCU1QoSU5TVEFMTCkKQUNfU1VCU1QoUEFD
-S0FHRVMpCkFDX1NVQlNUKElOU1RBTExfUEFDS0FHRVMpCgpBQ19TVUJTVChWRVJTSU9OKQoKZG5s
-IE1ha2VmaWxlIGNyZWF0aW9uLgpBQ19PVVRQVVQoYXV0b2NvbmYvbWFrZWZpbGUgaW5jbHVkZS9j
-bG9vZy9jbG9vZy5oKQoKbXYgYXV0b2NvbmYvbWFrZWZpbGUgLgoKZWNobyAiICAgICAgICAgICAg
-IC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qIgplY2hv
-ICIgICAgICAgICAgICAgICogICAgICAgICAgIENMb29HIGNvbmZpZ3VyYXRpb24gaXMgT0sgICAg
-ICAgICAgICoiCmVjaG8gIiAgICAgICAgICAgICAgKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
-LS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8iCmVjaG8gIkl0IGFwcGVhcnMgdGhhdCB5b3VyIHN5c3Rl
-bSBpcyBPSyB0byBzdGFydCBDTG9vRyBjb21waWxhdGlvbi4gWW91IG5lZWQiCmVjaG8gIm5vdyB0
-byB0eXBlIFwibWFrZVwiLiBBZnRlciBjb21waWxhdGlvbiwgeW91IHNob3VsZCBjaGVjayBDTG9v
-RyBieSB0eXBpbmciCmVjaG8gIlwibWFrZSBjaGVja1wiLiBJZiBubyBwcm9ibGVtIG9jY3VyLCB5
-b3UgY2FuIHR5cGUgXCJtYWtlIHVuaW5zdGFsbFwiIGlmIgplY2hvICJ5b3UgYXJlIHVwZ3JhZGlu
-ZyBhbiBvbGQgdmVyc2lvbi4gTGFzdGx5IHR5cGUgXCJtYWtlIGluc3RhbGxcIiB0byBpbnN0YWxs
-IgplY2hvICJDTG9vRyBvbiB5b3VyIHN5c3RlbSAobG9nIGFzIHJvb3QgaWYgbmVjZXNzYXJ5KS4i
-Cg==
-
-------=_Part_4295_2513784.1115129712334
-Content-Type: application/octet-stream; name="boehmgc_def.h"
-Content-Transfer-Encoding: base64
-Content-Disposition: attachment; filename="boehmgc_def.h"
-
-I2RlZmluZSBHQ19ERUJVRw0KI2luY2x1ZGUgImdjLmgiDQojZGVmaW5lIG1hbGxvYyhuKSBHQ19t
-YWxsb2MobikNCiNkZWZpbmUgY2FsbG9jKG0sbikgR0NfbWFsbG9jKChtKSoobikpDQojZGVmaW5l
-IGZyZWUocCkgR0NfZnJlZShwKQ0KI2RlZmluZSByZWFsbG9jKHAsbikgR0NfcmVhbGxvYygocCks
-KG4pKQ0KI2RlZmluZSBDSEVDS19MRUFLUygpIEdDX2djb2xsZWN0KCkNCg==
-
-------=_Part_4295_2513784.1115129712334
-Content-Type: application/octet-stream; name="cloog.c"
-Content-Transfer-Encoding: base64
-Content-Disposition: attachment; filename="cloog.c"
-
-DQogICAvKiotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
-LS0tLS0tLS0tLS0tLS0tLS0tKioNCiAgICAqKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-IENMb29HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKg0KICAgICoqLS0tLS0tLS0t
-LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
-LSoqDQogICAgKiogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsb29nLmMgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgKioNCiAgICAqKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
-LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qKg0KICAgICoqICAgICAg
-ICAgICAgICAgICBGaXJzdCB2ZXJzaW9uOiBvY3RvYmVyIDI1dGggMjAwMSAgICAgICAgICAgICAg
-ICAgICoqDQogICAgKiotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t
-LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKiovDQoNCg0KLyoqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0K
-ICogICAgICAgICAgICAgICBDTG9vRyA6IHRoZSBDaHVua3kgTG9vcCBHZW5lcmF0b3IgKGV4cGVy
-aW1lbnRhbCkgICAgICAgICAgICAgKg0KICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KICogICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgKg0KICogQ29weXJpZ2h0IChDKSAyMDAxIENlZHJpYyBCYXN0b3VsICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKg0KICogICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgKg0KICogVGhpcyBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBh
-bmQvb3IgbW9kaWZ5IGl0IHVuZGVyIHRoZSAgKg0KICogdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFs
-IFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSAgKg0KICog
-Rm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiBvZiB0aGUgTGljZW5zZSwgb3IgKGF0IHlvdXIg
-b3B0aW9uKSBhbnkgbGF0ZXIgKg0KICogdmVyc2lvbi4JCQkJCQkJICAgICAgICAgICAgICAqDQog
-KiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAqDQogKiBUaGlzIHNvZnR3YXJlIGlzIGRpc3RyaWJ1dGVkIGlu
-IHRoZSBob3BlIHRoYXQgaXQgd2lsbCBiZSB1c2VmdWwsIGJ1dCAgICAgICAqDQogKiBXSVRIT1VU
-IEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNI
-QU5UQUJJTElUWSAqDQogKiBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNl
-ZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgICAqDQogKiBmb3IgbW9yZSBkZXRhaWxz
-LgkJCQkJCQkgICAgICAqDQogKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqDQogKiBZb3Ugc2hvdWxkIGhh
-dmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhbG9u
-ZyAgICAqDQogKiB3aXRoIHNvZnR3YXJlOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3
-YXJlIEZvdW5kYXRpb24sIEluYy4sICAgICAgICAqDQogKiA1OSBUZW1wbGUgUGxhY2UsIFN1aXRl
-IDMzMCwgQm9zdG9uLCBNQSAgMDIxMTEtMTMwNyBVU0EgICAgICAgICAgICAgICAgICAgICAqDQog
-KiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAqDQogKiBDTG9vRywgdGhlIENodW5reSBMb29wIEdlbmVyYXRv
-ciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqDQogKiBXcml0dGVu
-IGJ5IENlZHJpYyBCYXN0b3VsLCBDZWRyaWMuQmFzdG91bEBpbnJpYS5mciAgICAgICAgICAgICAg
-ICAgICAgICAgICAqDQogKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
-ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqDQogKioqKioqKioqKioqKioqKioq
-KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
-KioqLw0KDQojIGluY2x1ZGUgPHN0ZGxpYi5oPg0KIyBpbmNsdWRlIDxzdGRpby5oPg0KIyBpbmNs
-dWRlICIuLi9pbmNsdWRlL2Nsb29nL2Nsb29nLmgiDQoNCiNpZmRlZiBVU0VfQk9FSE1HQw0KI2lu
-Y2x1ZGUgIi4uL2luY2x1ZGUvYm9laG1nY19kZWYuaCINCiNlbmRpZg0KDQpleHRlcm4gaW50IGNs
-b29nX2RvbWFpbl9hbGxvY2F0ZWQgOw0KZXh0ZXJuIGludCBjbG9vZ19kb21haW5fZnJlZWQgOw0K
-ZXh0ZXJuIGludCBjbG9vZ19kb21haW5fbWF4IDsNCmV4dGVybiBpbnQgY2xvb2dfbG9vcF9hbGxv
-Y2F0ZWQgOw0KZXh0ZXJuIGludCBjbG9vZ19sb29wX2ZyZWVkIDsNCmV4dGVybiBpbnQgY2xvb2df
-bG9vcF9tYXggOw0KZXh0ZXJuIGludCBjbG9vZ19zdGF0ZW1lbnRfYWxsb2NhdGVkIDsNCmV4dGVy
-biBpbnQgY2xvb2dfc3RhdGVtZW50X2ZyZWVkIDsNCmV4dGVybiBpbnQgY2xvb2dfc3RhdGVtZW50
-X21heCA7DQoNCg0KaW50IG1haW4oaW50IGFyZ3YsIGNoYXIgKiBhcmdjW10pDQp7IENsb29nUHJv
-Z3JhbSAqIHByb2dyYW0gOw0KICBDbG9vZ09wdGlvbnMgKiBvcHRpb25zIDsNCiAgRklMRSAqIGlu
-cHV0LCAqIG91dHB1dCA7DQogICANCiAgLyogT3B0aW9ucyBhbmQgaW5wdXQvb3V0cHV0IGZpbGUg
-c2V0dGluZy4gKi8NCiAgY2xvb2dfb3B0aW9uc19yZWFkKGFyZ3YsYXJnYywmaW5wdXQsJm91dHB1
-dCwmb3B0aW9ucykgOw0KDQogIC8qIFJlYWRpbmcgdGhlIHByb2dyYW0gaW5mb3JtYXRpb25zLiAq
-Lw0KICBwcm9ncmFtID0gY2xvb2dfcHJvZ3JhbV9yZWFkKGlucHV0KSA7DQogIGZjbG9zZShpbnB1
-dCkgOw0KICAgIA0KICAvKiBHZW5lcmF0aW5nIGFuZCBwcmludGluZyB0aGUgY29kZS4gKi8NCiAg
-cHJvZ3JhbSA9IGNsb29nX3Byb2dyYW1fZ2VuZXJhdGUocHJvZ3JhbSxvcHRpb25zKSA7DQogIC8q
-Y2xvb2dfcHJvZ3JhbV9wcmludChzdGRvdXQscHJvZ3JhbSkgOyovDQogIGNsb29nX3Byb2dyYW1f
-cHByaW50KG91dHB1dCxwcm9ncmFtLG9wdGlvbnMpIDsNCiAgY2xvb2dfcHJvZ3JhbV9mcmVlKHBy
-b2dyYW0pIDsNCg0KICAvKiBQcmludGluZyB0aGUgYWxsb2NhdGlvbiBzdGF0aXN0aWNzIGlmIGFz
-a2VkLiAqLw0KICBpZiAob3B0aW9ucy0+bGVha3MpDQogIHsgZnByaW50ZihvdXRwdXQsIi8qIERv
-bWFpbnMgICAgOiBhbGxvY2F0ZWQ9JTVkLCBmcmVlZD0lNWQsIG1heD0lNWQuICovXG4iLA0KICAg
-ICAgICAgICBjbG9vZ19kb21haW5fYWxsb2NhdGVkLGNsb29nX2RvbWFpbl9mcmVlZCxjbG9vZ19k
-b21haW5fbWF4KTsNCiAgICBmcHJpbnRmKG91dHB1dCwiLyogTG9vcHMgICAgICA6IGFsbG9jYXRl
-ZD0lNWQsIGZyZWVkPSU1ZCwgbWF4PSU1ZC4gKi9cbiIsDQogICAgICAgICAgIGNsb29nX2xvb3Bf
-YWxsb2NhdGVkLGNsb29nX2xvb3BfZnJlZWQsY2xvb2dfbG9vcF9tYXgpIDsNCiAgICBmcHJpbnRm
-KG91dHB1dCwiLyogU3RhdGVtZW50cyA6IGFsbG9jYXRlZD0lNWQsIGZyZWVkPSU1ZCwgbWF4PSU1
-ZC4gKi9cbiIsDQogICAgICAgICAgIGNsb29nX3N0YXRlbWVudF9hbGxvY2F0ZWQsY2xvb2dfc3Rh
-dGVtZW50X2ZyZWVkLGNsb29nX3N0YXRlbWVudF9tYXgpOw0KICB9DQoNCiAgY2xvb2dfb3B0aW9u
-c19mcmVlKG9wdGlvbnMpIDsNCiAgZmNsb3NlKG91dHB1dCkgOw0KICByZXR1cm4gMDsNCn0NCg0K
-
-------=_Part_4295_2513784.1115129712334--
-
-
diff --git a/test/reports/michael_classen_27-10-2004.txt b/test/reports/michael_classen_27-10-2004.txt
deleted file mode 100644
index 5b09c24..0000000
--- a/test/reports/michael_classen_27-10-2004.txt
+++ /dev/null
@@ -1,59 +0,0 @@
-On Wed, 27 Oct 2004 11:46:07 +0200, Cédric Bastoul
-<cedric.bastoul@prism.uvsq.fr> wrote:
-
->> Hi Michael,
->> here is CLooG GMP (a light version of the future CLooG 1.0, with still
->> some memory leaks and bugs). You should get and build the GMP library
->> (http://www.swox.com/gmp/ ) and build the PolyLib GMP
->> (http://icps.u-strasbg.fr/polylib/ then use the option
->> --with-libgmp=/gmp_install_directory for the configure script). For
->> CLooG you have to use the --with-bits=gmp and
->> --with-libgmp=/gmp_install_directory for the configure script. There is
->> no -cpp option in this CLooG version, I hope you don't use it. Be aware
->> that your example needs a lot of memory (more than 256MB), I did not
->> succeed to find the result on my laptop, but at least there were no
->> other problems.
->> Good luck, please feel free to send me some feedbacks about this
->> version, and please, please, do not distribute it.
->> Cheers,
->>
->> Cedric
-
-
-Hello Cedric,
-
-I'd like to thank you for your very quick response to my problem. I
-tried to build CLooG-GMP with our version of Polylib5.11.1 with
-gmp-support enabled. The only problem that occured to me was that I
-had to include "-lgmp" to the default library-flags in CLooG's
-makefile.in.
-
-Also, I always have a little trouble, because we use polylib as a
-statically linked library, but there is no target in the CLooG
-makefile for building the executable using static linking. It's no big
-deal, I just add a little "-static" to the linking options. I don't
-know if it would be usefull to others, but as you provide a static and
-shared option for the CLooG library targets, could you think about
-providing a similar option for the executable, too? Again, that is
-only a very minor issue, I don' want to waste your time on things like
-that...
-
-One more important thing: there is that "MAX_RAYS" constant that is
-hard-coded to 200 in the domain.h file. This is simply too low for
-most of my bigger examples. I think it would be quite usefull in the
-future to give an additional option for CLooG to set the number of
-MAX_RAYS without having to re-compile CLooG.
-
-At the moment, I try to get my example done, CLooG has been running
-now for about 50min on my Athlon-64 with 2GB physical and 4GB swap
-memory (of which CLooG is using 2.5GB at the moment).
-I doubt that it will finish with a result, but that is simply because
-the example seems to be too difficult (although I still don't see how
-I could reduce it...).
-
-Thanks again for the GMP-version!
-
-greetings,
-Michael
-
-
diff --git a/test/reports/nicolas_vasilache_03-05-2005.eml b/test/reports/nicolas_vasilache_03-05-2005.eml
deleted file mode 100644
index 2e2631f..0000000
--- a/test/reports/nicolas_vasilache_03-05-2005.eml
+++ /dev/null
@@ -1,306 +0,0 @@
-X-UIDL: 39066.1115110713
-X-Mozilla-Status: 0001
-X-Mozilla-Status2: 00000000
-Received: from soleil.uvsq.fr (soleil.uvsq.fr [193.51.24.1])
- by relay-5m.club-internet.fr (Postfix) with ESMTP id BC73EE06B
- for <netced@club-internet.fr>; Tue, 3 May 2005 10:58:32 +0200 (CEST)
-Received: from torquenada.prism.uvsq.fr (torquenada.prism.uvsq.fr [193.51.25.9])
- by soleil.uvsq.fr (8.12.11/jtpda-5.4) with ESMTP id j438wWHF077509
- for <netced@club-internet.fr>; Tue, 3 May 2005 10:58:32 +0200 (CEST)
-Received: from soleil.uvsq.fr (root@soleil.uvsq.fr [193.51.24.1])
- by torquenada.prism.uvsq.fr (8.11.4/jtpda-5.3.2) with ESMTP id j438wVC14523
- for <cedric.bastoul@prism.uvsq.fr>; Tue, 3 May 2005 10:58:31 +0200 (MEST)
-Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78])
- by soleil.uvsq.fr (8.12.11/jtpda-5.4) with ESMTP id j438wVeJ077472
- for <cedric.bastoul@prism.uvsq.fr>; Tue, 3 May 2005 10:58:31 +0200 (CEST)
-Received: from achille.futurs.inria.fr (achille.futurs.inria.fr [195.83.212.184])
- by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j438wP9Z005161
- (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
- for <cedric.bastoul@prism.uvsq.fr>; Tue, 3 May 2005 10:58:26 +0200
-Received: from [127.0.0.1] (localhost [127.0.0.1])
- by achille.futurs.inria.fr (8.13.0/8.12.10) with ESMTP id j438wPL3027759
- for <cedric.bastoul@prism.uvsq.fr>; Tue, 3 May 2005 10:58:25 +0200
-Message-ID: <42773D31.4050400@inria.fr>
-Date: Tue, 03 May 2005 10:58:25 +0200
-From: Nicolas Vasilache <Nicolas.Vasilache@inria.fr>
-User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040916
-X-Accept-Language: en-us, en
-MIME-Version: 1.0
-To: =?ISO-8859-1?Q?C=E9dric_Bastoul?= <cedric.bastoul@prism.uvsq.fr>
-Subject: Test case matmul
-Content-Type: multipart/mixed;
- boundary="------------030606060102070406010005"
-X-Miltered: at soleil.uvsq.fr with ID 42773D38.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!
-X-Miltered: at soleil.uvsq.fr with ID 42773D37.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!
-X-Miltered: at nez-perce with ID 42773D31.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)!
-X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-1.7.5 (soleil.uvsq.fr [193.51.24.1]); Tue, 03 May 2005 10:58:32 +0200 (CEST)
-X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-1.7.5 (soleil.uvsq.fr [193.51.24.1]); Tue, 03 May 2005 10:58:31 +0200 (CEST)
-X-j-chkmail-Score: MSGID : 42773D38.000 on soleil.uvsq.fr : j-chkmail score : XX : 10/50 0
-X-j-chkmail-Score: MSGID : 42773D37.001 on soleil.uvsq.fr : j-chkmail score : XX : 10/50 0
-X-Antivirus: scanned by sophie at soleil.uvsq.fr
-X-Antivirus: scanned by sophie at soleil.uvsq.fr
-Status:
-X-Mmail: \Recent
-X-M-Uid: 39066.1115110713
-
-This is a multi-part message in MIME format.
---------------030606060102070406010005
-Content-Type: text/plain; charset=ISO-8859-1; format=flowed
-Content-Transfer-Encoding: 7bit
-
-Options:
-cloog -f 8 -l 9 matmul.B.main.scop1.cloog
-
-Code correct:
-S1;
-S2;
-for (p0=0;p0<=N-1;p0++) {
- for (p1=0;p1<=N-1;p1++) {
- S4(i = p0,j = p1);
- S5(i = p0,j = p1);
- }
-}
-for (p0=0;p0<=N-1;p0++) {
- for (p1=0;p1<=N-1;p1++) {
- for (p2=0;p2<=floord(N-1,32);p2++) {
- S7(i = p0,j = p1,k = p2,l = 32*p2);
- for (p3=32*p2+1;p3<=min(N-1,32*p2+31);p3++) {
- S6(i = p0,j = p1,k = p2,l = p3-1);
- S7(i = p0,j = p1,k = p2,l = p3);
- }
- if (p2 >= ceild(N-32,32)) {
- S6(i = p0,j = p1,k = p2,l = N-1);
- }
- if (p2 <= floord(N-33,32)) {
- S6(i = p0,j = p1,k = p2,l = 32*p2+31);
- }
- }
- }
-}
-S8;
-
-
-Code incorrect:
-S1 ;
-S2 ;
-for (p1=0;p1<=N-1;p1++) {
- for (p3=0;p3<=N-1;p3++) {
- S4(i = p1,j = p3) ;
- S5(i = p1,j = p3) ;
- }
-}
-for (p1=0;p1<=N-1;p1++) {
- for (p3=0;p3<=N-1;p3++) {
- for (p5=0;p5<=floord(N-1,32);p5++) {
- if (p5 <= 0) {
- S7(i = p1,j = p3,k = p5,l = 0) ;
- }
- p7 = 32*p5 ;
- l = 32*p5 ;
- S7(i = p1,j = p3,k = p5) ;
- for (p7=max(32*p5+1,1);p7<=min(32*p5+31,N-1);p7++) {
- l = p7-1 ;
- S6(i = p1,j = p3,k = p5) ;
- S7(i = p1,j = p3,k = p5,l = p7) ;
- }
- if (p5 >= ceild(N-32,32)) {
- l = N-1 ;
- S6(i = p1,j = p3,k = p5) ;
- }
- p7 = 32*p5+32 ;
- l = 32*p5+31 ;
- S6(i = p1,j = p3,k = p5) ;
- }
- }
-}
-S8 ;
-
-
---------------030606060102070406010005
-Content-Type: text/plain;
- name="matmul.B.main.scop1.cloog"
-Content-Transfer-Encoding: 7bit
-Content-Disposition: inline;
- filename="matmul.B.main.scop1.cloog"
-
-c # language is C
-# ---------- CONTEXT ----------
-1 # Context (constraints on parameters)
-2 4 # 1 lines, 4 columns
-1 -1 0 3
-1 0 1 -100
-
-
-0 # Automatically find parameter names
-
-# ---------- STATEMENTS ----------
-8 # Number of statements
-
-1 # Statement has a non resticted domain
-1 4
-1 0 0 0
-0 0 0
-
-1 # Statement has a non resticted domain
-1 4
-1 0 0 0
-0 0 0
-
-1 # Statement has 1 domain
-1 4
-1 1 0 -79
-0 0 0
-
-1 # Statement has 1 domain
-4 6
-1 1 0 0 0 0
-1 -1 0 0 1 -1
-1 0 1 0 0 0
-1 0 -1 0 1 -1
-0 0 0
-
-1 # Statement has 1 domain
-4 6
-1 1 0 0 0 0
-1 -1 0 0 1 -1
-1 0 1 0 0 0
-1 0 -1 0 1 -1
-0 0 0
-
-1 # Statement has 1 domain
-8 8
-1 1 0 0 0 0 0 0
-1 -1 0 0 0 0 1 -1
-1 0 1 0 0 0 0 0
-1 0 -1 0 0 0 1 -1
-1 0 0 0 1 0 0 0
-1 0 0 0 -1 0 1 -1
-1 0 0 -32 1 0 0 0
-1 0 0 32 -1 0 0 31
-0 0 0
-
-1 # Statement has 1 domain
-8 8
-1 1 0 0 0 0 0 0
-1 -1 0 0 0 0 1 -1
-1 0 1 0 0 0 0 0
-1 0 -1 0 0 0 1 -1
-1 0 0 0 1 0 0 0
-1 0 0 0 -1 0 1 -1
-1 0 0 -32 1 0 0 0
-1 0 0 32 -1 0 0 31
-0 0 0
-
-1 # Statement has a non resticted domain
-1 4
-1 0 0 0
-0 0 0
-
-0 # Automatically find iterator names.
-
-# ---------- SCATTERING FUNCTIONS ----------
-8 # Number of scattering functions
-
-9 13
-# p0 p1 p2 p3 p4 p5 p6 p7 p8
-0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 0
-0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1
-0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2
-0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3
-0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3
-0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4
-0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4
-
-9 13
-# p0 p1 p2 p3 p4 p5 p6 p7 p8
-0 1 0 0 0 0 0 0 0 0 0 0 -1 # Beta 0
-0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1
-0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2
-0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3
-0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3
-0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4
-0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4
-
-9 13
-# p0 p1 p2 p3 p4 p5 p6 p7 p8
-0 1 0 0 0 0 0 0 0 0 0 0 -2 # Beta 0
-0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1
-0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2
-0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3
-0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3
-0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4
-0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4
-
-9 15
-# p0 p1 p2 p3 p4 p5 p6 p7 p8
-0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 0
-0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1
-0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 2
-0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3
-0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3
-0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 4
-0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 4
-
-9 15
-# p0 p1 p2 p3 p4 p5 p6 p7 p8
-0 1 0 0 0 0 0 0 0 0 0 0 0 0 -3 # Beta 0
-0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 1
-0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 0 0 0 0 0 0 0 -1 # Beta 2
-0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 3
-0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 3
-0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 4
-0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 4
-
-9 17
-# p0 p1 p2 p3 p4 p5 p6 p7 p8
-0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 0
-0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1
-0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2
-0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 3
-0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3
-0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 -1 # Alpha & Gamma 4
-0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 4
-
-9 17
-# p0 p1 p2 p3 p4 p5 p6 p7 p8
-0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -4 # Beta 0
-0 0 1 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 # Beta 1
-0 0 0 0 1 0 0 0 0 0 0 -1 0 0 0 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 # Beta 2
-0 0 0 0 0 0 1 0 0 0 0 0 -1 0 0 0 0 # Alpha & Gamma 3
-0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 3
-0 0 0 0 0 0 0 0 1 0 0 0 0 -1 0 0 0 # Alpha & Gamma 4
-0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 -1 # Beta 4
-
-9 13
-# p0 p1 p2 p3 p4 p5 p6 p7 p8
-0 1 0 0 0 0 0 0 0 0 0 0 -5 # Beta 0
-0 0 1 0 0 0 0 0 0 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 0 0 0 0 0 0 # Beta 1
-0 0 0 0 1 0 0 0 0 0 0 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 0 0 0 0 0 0 # Beta 2
-0 0 0 0 0 0 1 0 0 0 0 0 0 # Alpha & Gamma 3
-0 0 0 0 0 0 0 1 0 0 0 0 0 # Beta 3
-0 0 0 0 0 0 0 0 1 0 0 0 0 # Alpha & Gamma 4
-0 0 0 0 0 0 0 0 0 1 0 0 0 # Beta 4
-
-1 # Set the scattering parameter names.
-p0 p1 p2 p3 p4 p5 p6 p7 p8
-
-
---------------030606060102070406010005--
-
-
diff --git a/test/reports/nicolas_vasilache_09-05-2005.txt b/test/reports/nicolas_vasilache_09-05-2005.txt
deleted file mode 100644
index ceaeba0..0000000
--- a/test/reports/nicolas_vasilache_09-05-2005.txt
+++ /dev/null
@@ -1,44 +0,0 @@
-Hello,
-
-Un bug etait reste dans la fonction, voici le code correct a remplacer ... a priori c'est juste sur les parametres de Vector_Combine.
-Teste et fonctionne.
-
-Tu es la demain ?
-
-
-if(singlePoint == 1){
- for(i=0; i<m->NbRows; i++){
- int j = 0;
- if(i != lineNum){
- for(j=1; j<m->NbColumns; j++){
- if(m->p[i][level] != 0){
- int sign = (m->p[i][level] * m->p[lineNum][level] > 0) ? -1 : 1;
- Vector *tmpResVec = Vector_Alloc(m->NbColumns - 1);
- Vector_Combine(&(m->p[i][1]), &(m->p[lineNum][1]), tmpResVec->p, sign*m->p[lineNum][level],
- -sign*m->p[i][level], m->NbColumns - 1);
- Value gcd;
- Vector_Gcd(tmpResVec->p, m->NbColumns - 1, &gcd);
- Vector_AntiScale(tmpResVec->p, &(m->p[i][1]), gcd, m->NbColumns - 1);
- Vector_Free(tmpResVec);
- }
- }
- }
- }
- Cédric Bastoul wrote:
-
-> Merci beaucoup, je le place localement dans le pprint sans doute la semaine prochaine comme ça je ferais une option sans backtrack et -f safe, enfin j'espère ! 2 bugs en une semaine :-/ (l'autre c'était pour le -cpp je crois que tu t'en fous) !
-> A+
->
-> Ced.
->
-> Nicolas Vasilache a écrit :
->
->>
->> void cloog_loop_normalize(CloogLoop *loop, int level){
->>
->> }
->>
->>
->
->
-
diff --git a/test/reports/sergej_schwenk_01-06-2004.txt b/test/reports/sergej_schwenk_01-06-2004.txt
deleted file mode 100644
index 997bbaa..0000000
--- a/test/reports/sergej_schwenk_01-06-2004.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-Dear Cedric Bastoul,
-
-
->> As you may know, the code generator prototype is freely available at
->> http://www.prism.uvsq.fr/~cedb/bastools/cloog.html
->> then you can easily test the proposed improvements for code generation.
->> Please do not hesitate to ask me for further details.
->> Best regards,
->>
->> Cédric Bastoul
-
-
-
-thank you very much for the last information. I built already cloog static libraries and cloog, but I have still some troubles to make the shared library of cloog-0.12.2. I can work with the static version, but it may be also interesting to have a shared library too.
-
-I am using the polylib-library 5.20.0 (64 bit) and gcc version 2.95.3 (20010315). The error message is:
-
- /*-----------------------------------------------*
- * MAKING ClooG (shared lib) *
- *-----------------------------------------------*/
-ld ./obj_sparc-sun-solaris2.9/cloog.o ./obj_sparc-sun-solaris2.9/program.o ./obj_sparc-sun-solaris2.9/loop.o ./obj_sparc-sun-solaris2.9/pprint.o ./obj_sparc-sun-solaris2.9/names.o ./obj_sparc-sun-solaris2.9/statement.o ./obj_sparc-sun-solaris2.9/domain.o ./obj_sparc-sun-solaris2.9/options.o -o ./obj_sparc-sun-solaris2.9/libcloog.so.0.12.2 \
--lc -shared -fPIC -L/project/suif/polylib-5.20.0/lib -lpolylib64 -lc
-ld: fatal: option -h and building a dynamic executable are incompatible
-ld: fatal: option -f and building a dynamic executable are incompatible
-ld: fatal: Flags processing errors
-gmake: *** [cloogsharedlib] Error 1
-
-Deleting the option -fPIC solve the problem with the second error message "option -f ..."
-
-Did you have any idea how to solve the problem ? I just called configure --with-polylib=... and then make. Polylib libraries (shared and static) are build successfully (all tests ran properly)
-
-Thank you in advance.
-
-Regards,
-
-Sergej Schwenk
-
-
--- Sergej Schwenk University of Dortmund Department of Computer Science 12 (Embedded Systems Group) Otto-Hahn-Strasse 16 44221 Dortmund Germany
diff --git a/test/reports/sylvain_girbal_01-11-2004.txt b/test/reports/sylvain_girbal_01-11-2004.txt
deleted file mode 100644
index 04fce0a..0000000
--- a/test/reports/sylvain_girbal_01-11-2004.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-
-Salut,
-
-J'ai noté que dans la doc de cloog library, a propos de la structure CloogProgram, names pouvait être NULL si on utilisait pas le pretty printer de cloog.
-
-Or, avec le champs names a NULL, cloog_program_scatter seg fault...
-
-Pas de problème si je malloc un CloogName et que je met ses champs à NULL et 0 (pour la double paire de noms / nombre de noms)
-
-Sylvai
-n.
diff --git a/test/reports/sylvain_girbal_24-02-2004.txt b/test/reports/sylvain_girbal_24-02-2004.txt
deleted file mode 100644
index 48af62e..0000000
--- a/test/reports/sylvain_girbal_24-02-2004.txt
+++ /dev/null
@@ -1,135 +0,0 @@
-Salut,
-
-J'essaye d'utiliser CLooG pour générer le code d'une boucle strip-minée.
-
-Le code de départ (avant stripmine) est
-
-for(i=0;i<=999;i++
-{ S1(i);
-}
-
-et est correctement généré par cloog.
-
-Apres un strip mine de p, j'esperais arriver a qqch du genre
-
-for(i=0;i<=999;i+=p)
-{ for(j=i;j<min(i+p,999);j++)
- { S1(i)
- }
-}
-
-Mais j'obtiens un assez laid
-
-for(i=-9;i<=999;i++)
-{ for(j=max(0,i);j<=min(i+p,999);j++)
- { if(i%p == 0)
- { S1(i)
- }
- }
-}
-
-avec le cacul d'un modulo dans la boucle interne qui detruit toutes les
-perfs.
-
-Y a t'il moyen d'améliorer les choses avec une des options de cloog, ou en
-changeant qqch dans mon fichier d'entree ?
-Albert m'a dit qu'il y avait qqch pour les strides.
-
-Pour info, j'utilise
-Piplib 1.3.2
-ClooG 0.12.1
-
-Merci d'avance,
-Sylvain.
-
-et le fichier d'entree pour cloog est:
-
-c # language is C
-# ---------- CONTEXT ----------
-1 # Context (no constraints on parameters)
-1 2 # 1 lines, 2 columns
-0 0
-
-0 # Automatically find parameter names
-
-# ---------- STATEMENTS ----------
-5 # Number of statements
-
-1 # Statement has a non resticted domain
-1 2
-1 0
-0 0 0
-
-1 # Statement has a non resticted domain
-1 2
-1 0
-0 0 0
-
-1 # Statement has 1 domain STATEMENT QUI ME PAUSE PB
-6 5
-# i j p 1
-1 0 1 0 0 # 0 <= j <= 999
-1 0 -1 0 999
-1 -1 1 0 0 # j <= i <= j + 9
-1 1 -1 0 9
-1 -1 0 10 0 # i = 10 * p
-1 1 0 -10 0
-0 0 0
-
-1 # Statement has a non resticted domain
-1 2
-1 0
-0 0 0
-
-1 # Statement has a non resticted domain
-1 2
-1 0
-0 0 0
-
-0 # Automatically find iterator names.
-
-# ---------- SCATTERING FUNCTIONS ----------
-5 # Number of scattering functions
-
-5 7
-# p0 p1 p2 p3 p4
-0 1 0 0 0 0 0 # Beta 0
-0 0 1 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 # Beta 1
-0 0 0 0 1 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 # Beta 2
-
-5 7
-# p0 p1 p2 p3 p4
-0 1 0 0 0 0 -1 # Beta 0
-0 0 1 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 # Beta 1
-0 0 0 0 1 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 # Beta 2
-
-5 10
-# p0 p1 p2 p3 p4
-0 1 0 0 0 0 0 0 0 -2 # Beta 0
-0 0 1 0 0 0 -1 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 0 0 0 # Beta 1
-0 0 0 0 1 0 0 -1 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 0 0 0 # Beta 2
-
-5 7
-# p0 p1 p2 p3 p4
-0 1 0 0 0 0 -3 # Beta 0
-0 0 1 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 # Beta 1
-0 0 0 0 1 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 # Beta 2
-
-5 7
-# p0 p1 p2 p3 p4
-0 1 0 0 0 0 -4 # Beta 0
-0 0 1 0 0 0 0 # Alpha & Gamma 1
-0 0 0 1 0 0 0 # Beta 1
-0 0 0 0 1 0 0 # Alpha & Gamma 2
-0 0 0 0 0 1 0 # Beta 2
-
-1 # Set the scattering parameter names.
-p0 p1 p2 p3 p4