Форум программистов, компьютерный форум CyberForum.ru

Программа Пентамино - C++

Войти
Регистрация
Восстановить пароль
Другие темы раздела
C++ error C2078: слишком много инициализаторов при создании массива http://www.cyberforum.ru/cpp-beginners/thread785400.html
Создаю текстовый массив. Выдает ошибку "error C2078: слишком много инициализаторов". При создании Int массива все нормально, а при создании екстового валит ошибку ( error C2078: слишком много инициализаторов ): char students = {"a", "b", "c"}; Что я наделал?)
C++ Исправьте массив Решение проблемы нашел. Удалите тему пожалуйста. http://www.cyberforum.ru/cpp-beginners/thread785392.html
Использование оператора fgets C++
Помогите решить задачу, пожалуйста, с использованием функции fgets. В командной строке программе передаются два числа. Из файла с текстом своей программы выполнить чтение соответствующих строк, найти в них самое длинное слово и поменять местами четные и нечетные символы этого слова.
Стек (связный список). Нужно ли проверять на пустоту? C++
Всем добра, у меня к Вам есть парочка вопросов о стеке, буду благодарен за помощь. Передо мной стояла задача: 1) Инициализировать стек; 2) Заполнить его значениями; 3) Добавить одно значение, через консоль; 4) Удалить значение, которое добавили. Вот мой код, он рабочий. #include "stdafx.h"
C++ сделать функцию, которая вычисляет сумму всех нечетных значений переданного ей массива http://www.cyberforum.ru/cpp-beginners/thread785347.html
сделать функцию, которая вычисляет сумму всех нечетных значений переданного ей массива функция рекурсивная
C++ заданы 2 строки, состоящие из слов, разделенных пробелами заданы 2 строки, состоящие из слов, разделенных пробелами. Если последнее слово больше предпоследнего , то заменить первые пять буквой "а", в противном случае все символы заменить на "*". подробнее

Показать сообщение отдельно
paserge
-3 / 0 / 0
Регистрация: 16.01.2013
Сообщений: 42
19.02.2013, 15:34  [ТС]     Программа Пентамино
Переделал код но возникла другая сложность есть вложенные циклы for

вот пример
for(ai=0;ai<1000; ai+=5)
{условие1
for(bi=0;bi<500; bi+=5)
{условие2
for(di=0;di<700; di+=5)
{
}}}

необходимо чтобы
условие1 выполнялось при выходе из цикла for (bi ,
условие2 выполнялось при выходе из цикла for (di ,

к сожалению при выходе из цикла for (bi , происходит онуление bi
а при выходе из цикла for (di , происходит онуление bi

еслиб это не происходило то моя программа бы работала нормально
вот код с возможностью увидеть результат обработки:

Кликните здесь для просмотра всего текста
C++ (Qt)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <iomanip>
using namespace std; 
int main()
{
int x=1, ai=0, bi=0, di=0, ei=0, fi=0, gi=0, hi=0, ki=0, mi=0, ni=0, pi=0, ri=0;
long long y=0; int z[128]={0};
int z1=0,z2=0,z3=0,z4=0,z5=0,z6=0,z7=0,z8=0,z9=0,z10=0,z11=0,z12=0,z13=0,z14=0,z15=0,z16=0,z17=0,z18=0,z19=0,z20=0,z21=0,z22=0,z23=0,z24=0,z25=0,z26=0,z27=0,z28=0,z29=0,z30=0,z31=0,z32=0,z33=0,z34=0,z35=0,z36=0,z37=0,z38=0,z39=0,z40=0,z41=0,z42=0,z43=0,z44=0,z45=0,z46=0,z47=0,z48=0,z49=0,z50=0,z51=0,z52=0,z53=0,z54=0,z55=0,z56=0,z57=0,z58=0,z59=0,z60=0;
int a[]={
28,39,40,41,52,30,41,42,43,54,31,42,43,44,55,33,44,45,46,57,41,52,53,54,65,42,53,54,55,66,43,54,55,56,67,44,55,56,57,68,52,63,64,65,76,53,64,65,66,77,54,65,66,67,78,55,66,67,68,79,56,67,68,69,80,57,68,69,70,81,64,75,76,77,88,65,76,77,78,89,66,77,78,79,90,67,78,79,80,91,68,79,80,81,92,69,80,81,82,93,77,88,89,90,101,78,89,90,91,102,79,90,91,92,103,80,91,92,93,104,88,99,100,101,112,90,101,102,103,114,91,102,103,104,115,93,104,105,106,117
};
for(int ai=0;ai<140; ai+=5)
{if(bi==200){z[z1]=0,z[z2]=0,z[z3]=0,z[z4]=0,z[z5]=0;z[z6]=0, z[z7]=0, z[z8]=0, z[z9]=0,z[z10]=0;continue;}
y++;int aa1=ai,aa2=ai+1,aa3=ai+2,aa4=ai+3,aa5=ai+4;
int a1=a[aa1],a2=a[aa2],a3=a[aa3],a4=a[aa4],a5=a[aa5];
z1=a1-1,z2=a2-1,z3=a3-1,z4=a4-1,z5=a5-1;
if(z[z1]>0 || z[z2]>0 ||z[z3]>0 ||z[z4]>0 ||z[z5]>0)continue;
 else {z[z1]=1, z[z2]=1, z[z3]=1, z[z4]=1,z[z5]=1;}
 system ("pause");
 cout<<"a"<<ai<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
int b[]={
28,29,30,31,32,29,30,31,32,33,51,52,53,54,55,52,53,54,55,56,53,54,55,56,57,54,55,56,57,58,63,64,65,66,67,64,65,66,67,68,65,66,67,68,69,66,67,68,69,70,75,76,77,78,79,76,77,78,79,80,77,78,79,80,81,78,79,80,81,82,87,88,89,90,91,88,89,90,91,92,89,90,91,92,93,90,91,92,93,94,112,113,114,115,116,113,114,115,116,117,29,41,53,65,77,30,42,54,66,78,31,43,55,67,79,32,44,56,68,80,39,51,63,75,87,41,53,65,77,89,42,54,66,78,90,43,55,67,79,91,44,56,68,80,92,46,58,70,82,94,51,63,75,87,99,53,65,77,89,101,54,66,78,90,102,55,67,79,91,103,56,68,80,92,104,58,70,82,94,106,65,77,89,101,113,66,78,90,102,114,67,79,91,103,115,68,80,92,104,116
};
for(int bi=0;bi<200; bi+=5)
{if(di==680){z[z1]=0,z[z2]=0,z[z3]=0,z[z4]=0,z[z5]=0;z[z6]=0, z[z7]=0, z[z8]=0, z[z9]=0,z[z10]=0;continue;}
    
y++;int bb1=bi,bb2=bi+1,bb3=bi+2,bb4=bi+3,bb5=bi+4;
int b1=b[bb1],b2=b[bb2],b3=b[bb3],b4=b[bb4],b5=b[bb5];
 
z6=b1-1,z7=b2-1,z8=b3-1,z9=b4-1,z10=b5-1;
 
if(z[z6]>0 || z[z7]>0 ||z[z8]>0 ||z[z9]>0 ||z[z10]>0)continue;
 else {z[z6]=2, z[z7]=2, z[z8]=2, z[z9]=2,z[z10]=2;}
 system ("pause"); cout<<"b"<<bi<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
 
int d[]={
28,29,30,40,42,29,30,31,41,43,30,31,32,42,44,31,32,33,43,45,39,40,41,51,53,40,41,42,52,54,41,42,43,53,55,42,43,44,54,56,43,44,45,55,57,44,45,46,56,58,51,52,53,63,65,52,53,54,64,66,53,54,55,65,67,54,55,56,66,68,55,56,57,67,69,56,57,58,68,70,63,64,65,75,77,64,65,66,76,78,65,66,67,77,79,66,67,68,78,80,67,68,69,79,81,68,69,70,80,82,75,76,77,87,89,76,77,78,88,90,77,78,79,89,91,78,79,80,90,92,79,80,81,91,93,80,81,82,92,94,87,88,89,99,101,88,89,90,100,102,89,90,91,101,103,90,91,92,102,104,91,92,93,103,105,92,93,94,104,106,28,29,40,52,53,29,30,41,53,54,30,31,42,54,55,31,32,43,55,56,32,33,44,56,57,39,40,51,63,64,40,41,52,64,65,41,42,53,65,66,42,43,54,66,67,43,44,55,67,68,44,45,56,68,69,51,52,63,75,76,52,53,64,76,77,53,54,65,77,78,54,55,66,78,79,55,56,67,79,80,56,57,68,80,81,63,64,75,87,88,64,65,76,88,89,65,66,77,89,90,66,67,78,90,91,67,68,79,91,92,68,69,80,92,93,75,76,87,99,100,76,77,88,100,101,77,78,89,101,102,78,79,90,102,103,79,80,91,103,104,80,81,92,104,105,88,89,100,112,113,89,90,101,113,114,90,91,102,114,115,91,92,103,115,116,92,93,104,116,117,28,29,41,52,53,29,30,42,53,54,30,31,43,54,55,31,32,44,55,56,32,33,45,56,57,40,41,53,64,65,41,42,54,65,66,42,43,55,66,67,43,44,56,67,68,44,45,57,68,69,45,46,58,69,70,52,53,65,76,77,53,54,66,77,78,54,55,67,78,79,55,56,68,79,80,56,57,69,80,81,57,58,70,81,82,64,65,77,88,89,65,66,78,89,90,66,67,79,90,91,67,68,80,91,92,68,69,81,92,93,69,70,82,93,94,76,77,89,100,101,77,78,90,101,102,78,79,91,102,103,79,80,92,103,104,80,81,93,104,105,81,82,94,105,106,88,89,101,112,113,89,90,102,113,114,90,91,103,114,115,91,92,104,115,116,92,93,105,116,117,39,41,51,52,53,40,42,52,53,54,41,43,53,54,55,42,44,54,55,56,43,45,55,56,57,44,46,56,57,58,51,53,63,64,65,52,54,64,65,66,53,55,65,66,67,54,56,66,67,68,55,57,67,68,69,56,58,68,69,70,63,65,75,76,77,64,66,76,77,78,65,67,77,78,79,66,68,78,79,80,67,69,79,80,81,68,70,80,81,82,75,77,87,88,89,76,78,88,89,90,77,79,89,90,91,78,80,90,91,92,79,81,91,92,93,80,82,92,93,94,87,89,99,100,101,88,90,100,101,102,89,91,101,102,103,90,92,102,103,104,91,93,103,104,105,92,94,104,105,106,100,102,112,113,114,101,103,113,114,115,102,104,114,115,116,103,105,115,116,117
};
for(int di=0;di<680; di+=5) 
{if(ei==640){z[z6]=0, z[z7]=0, z[z8]=0, z[z9]=0,z[z10]=0;z[z11]=0, z[z12]=0, z[z13]=0, z[z14]=0,z[z15]=0;continue;}
 
y++;int dd1=di,dd2=di+1,dd3=di+2,dd4=di+3,dd5=di+4;
int d1=d[dd1],d2=d[dd2],d3=d[dd3],d4=d[dd4],d5=d[dd5];
 
z11=d1-1,z12=d2-1,z13=d3-1,z14=d4-1,z15=d5-1;
if(z[z11]>0 || z[z12]>0 ||z[z13]>0 ||z[z14]>0 ||z[z15]>0)continue;
 else {z[z11]=3, z[z12]=3, z[z13]=3, z[z14]=3,z[z15]=3;}
 system ("pause"); cout<<"d"<<di<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
 
 
 int e[]={
28,29,30,40,52,29,30,31,41,53,30,31,32,42,54,31,32,33,43,55,39,40,41,51,63,40,41,42,52,64,41,42,43,53,65,42,43,44,54,66,43,44,45,55,67,44,45,46,56,68,51,52,53,63,75,52,53,54,64,76,53,54,55,65,77,54,55,56,66,78,55,56,57,67,79,56,57,58,68,80,63,64,65,75,87,64,65,66,76,88,65,66,67,77,89,66,67,68,78,90,67,68,69,79,91,68,69,70,80,92,75,76,77,87,99,76,77,78,88,100,77,78,79,89,101,78,79,80,90,102,79,80,81,91,103,80,81,82,92,104,88,89,90,100,112,89,90,91,101,113,90,91,92,102,114,91,92,93,103,115,28,29,30,42,54,29,30,31,43,55,30,31,32,44,56,31,32,33,45,57,39,40,41,53,65,40,41,42,54,66,41,42,43,55,67,42,43,44,56,68,43,44,45,57,69,44,45,46,58,70,51,52,53,65,77,52,53,54,66,78,53,54,55,67,79,54,55,56,68,80,55,56,57,69,81,56,57,58,70,82,63,64,65,77,89,64,65,66,78,90,65,66,67,79,91,66,67,68,80,92,67,68,69,81,93,68,69,70,82,94,75,76,77,89,101,76,77,78,90,102,77,78,79,91,103,78,79,80,92,104,79,80,81,93,105,80,81,82,94,106,88,89,90,102,114,89,90,91,103,115,90,91,92,104,116,91,92,93,105,117,30,42,52,53,54,31,43,53,54,55,32,44,54,55,56,33,45,55,56,57,41,53,63,64,65,42,54,64,65,66,43,55,65,66,67,44,56,66,67,68,45,57,67,68,69,46,58,68,69,70,53,65,75,76,77,54,66,76,77,78,55,67,77,78,79,56,68,78,79,80,57,69,79,80,81,58,70,80,81,82,65,77,87,88,89,66,78,88,89,90,67,79,89,90,91,68,80,90,91,92,69,81,91,92,93,70,82,92,93,94,77,89,99,100,101,78,90,100,101,102,79,91,101,102,103,80,92,102,103,104,81,93,103,104,105,82,94,104,105,106,90,102,112,113,114,91,103,113,114,115,92,104,114,115,116,93,105,115,116,117,28,40,52,53,54,29,41,53,54,55,30,42,54,55,56,31,43,55,56,57,39,51,63,64,65,40,52,64,65,66,41,53,65,66,67,42,54,66,67,68,43,55,67,68,69,44,56,68,69,70,51,63,75,76,77,52,64,76,77,78,53,65,77,78,79,54,66,78,79,80,55,67,79,80,81,56,68,80,81,82,63,75,87,88,89,64,76,88,89,90,65,77,89,90,91,66,78,90,91,92,67,79,91,92,93,68,80,92,93,94,75,87,99,100,101,76,88,100,101,102,77,89,101,102,103,78,90,102,103,104,79,91,103,104,105,80,92,104,105,106,88,100,112,113,114,89,101,113,114,115,90,102,114,115,116,91,103,115,116,117
};
for(int ei=0;ei<640; ei+=5)
{if(fi==580){z[z11]=0, z[z12]=0, z[z13]=0, z[z14]=0,z[z15]=0;z[z16]=0, z[z17]=0, z[z18]=0, z[z19]=0,z[z20]=0;continue;}
y++;int ee1=ei,ee2=ei+1,ee3=ei+2,ee4=ei+3,ee5=ei+4;
int e1=e[ee1],e2=e[ee2],e3=e[ee3],e4=e[ee4],e5=e[ee5];
 
z16=e1-1,z17=e2-1,z18=e3-1,z19=e4-1,z20=e5-1;
 
if(z[z16]>0 || z[z17]>0 ||z[z18]>0 ||z[z19]>0 ||z[z20]>0)continue;
 else {z[z16]=4, z[z17]=4, z[z18]=4, z[z19]=4,z[z20]=4;}
 system ("pause"); cout<<"e"<<ei<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
 
 
int f[]={
28,29,41,42,54,29,30,42,43,55,30,31,43,44,56,32,33,45,46,58,39,40,52,53,65,40,41,53,54,66,41,42,54,55,67,42,43,55,56,68,43,44,56,57,69,51,52,64,65,77,52,53,65,66,78,53,54,66,67,79,54,55,67,68,80,55,56,68,69,81,56,57,69,70,82,63,64,76,77,89,64,65,77,78,90,65,66,78,79,91,66,67,79,80,92,67,68,80,81,93,68,69,81,82,94,76,77,89,90,102,77,78,90,91,103,78,79,91,92,104,79,80,92,93,105,80,81,93,94,106,89,90,102,103,115,90,91,103,104,116,91,92,104,105,117,28,29,39,40,51,30,31,41,42,53,31,32,42,43,54,32,33,43,44,55,41,42,52,53,64,42,43,53,54,65,43,44,54,55,66,44,45,55,56,67,45,46,56,57,68,52,53,63,64,75,53,54,64,65,76,54,55,65,66,77,55,56,66,67,78,56,57,67,68,79,57,58,68,69,80,64,65,75,76,87,65,66,76,77,88,66,67,77,78,89,67,68,78,79,90,68,69,79,80,91,69,70,80,81,92,76,77,87,88,99,77,78,88,89,100,78,79,89,90,101,79,80,90,91,102,80,81,91,92,103,89,90,100,101,112,90,91,101,102,113,91,92,102,103,114,31,42,43,53,54,32,43,44,54,55,33,44,45,55,56,42,53,54,64,65,43,54,55,65,66,44,55,56,66,67,45,56,57,67,68,46,57,58,68,69,53,64,65,75,76,54,65,66,76,77,55,66,67,77,78,56,67,68,78,79,57,68,69,79,80,58,69,70,80,81,65,76,77,87,88,66,77,78,88,89,67,78,79,89,90,68,79,80,90,91,69,80,81,91,92,70,81,82,92,93,77,88,89,99,100,78,89,90,100,101,79,90,91,101,102,80,91,92,102,103,81,92,93,103,104,90,101,102,112,113,91,102,103,113,114,92,103,104,114,115,94,105,106,116,117,28,40,41,53,54,29,41,42,54,55,30,42,43,55,56,39,51,52,64,65,40,52,53,65,66,41,53,54,66,67,42,54,55,67,68,43,55,56,68,69,51,63,64,76,77,52,64,65,77,78,53,65,66,78,79,54,66,67,79,80,55,67,68,80,81,56,68,69,81,82,63,75,76,88,89,64,76,77,89,90,65,77,78,90,91,66,78,79,91,92,67,79,80,92,93,68,80,81,93,94,76,88,89,101,102,77,89,90,102,103,78,90,91,103,104,79,91,92,104,105,80,92,93,105,106,87,99,100,112,113,89,101,102,114,115,90,102,103,115,116,91,103,104,116,117
};
for(int fi=0;fi<580; fi+=5)
{if(gi==640){z[z16]=0, z[z17]=0, z[z18]=0, z[z19]=0,z[z20]=0;z[z21]=0, z[z22]=0, z[z23]=0, z[z24]=0,z[z25]=0;continue;}
y++;int ff1=fi,ff2=fi+1,ff3=fi+2,ff4=fi+3,ff5=fi+4;
int f1=f[ff1],f2=f[ff2],f3=f[ff3],f4=f[ff4],f5=f[ff5];
 
z21=f1-1,z22=f2-1,z23=f3-1,z24=f4-1,z25=f5-1;
 
if(z[z21]>0 || z[z22]>0 ||z[z23]>0 ||z[z24]>0 ||z[z25]>0)continue;
 else {z[z21]=5, z[z22]=5, z[z23]=5, z[z24]=5,z[z25]=5;}
 system ("pause"); cout<<"f"<<fi<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
 
 
 int g[]={
29,30,41,52,53,30,31,42,53,54,31,32,43,54,55,32,33,44,55,56,40,41,52,63,64,41,42,53,64,65,42,43,54,65,66,43,44,55,66,67,44,45,56,67,68,45,46,57,68,69,52,53,64,75,76,53,54,65,76,77,54,55,66,77,78,55,56,67,78,79,56,57,68,79,80,57,58,69,80,81,64,65,76,87,88,65,66,77,88,89,66,67,78,89,90,67,68,79,90,91,68,69,80,91,92,69,70,81,92,93,76,77,88,99,100,77,78,89,100,101,78,79,90,101,102,79,80,91,102,103,80,81,92,103,104,81,82,93,104,105,89,90,101,112,113,90,91,102,113,114,91,92,103,114,115,92,93,104,115,116,28,29,41,53,54,29,30,42,54,55,30,31,43,55,56,31,32,44,56,57,39,40,52,64,65,40,41,53,65,66,41,42,54,66,67,42,43,55,67,68,43,44,56,68,69,44,45,57,69,70,51,52,64,76,77,52,53,65,77,78,53,54,66,78,79,54,55,67,79,80,55,56,68,80,81,56,57,69,81,82,63,64,76,88,89,64,65,77,89,90,65,66,78,90,91,66,67,79,91,92,67,68,80,92,93,68,69,81,93,94,75,76,88,100,101,76,77,89,101,102,77,78,90,102,103,78,79,91,103,104,79,80,92,104,105,80,81,93,105,106,88,89,101,113,114,89,90,102,114,115,90,91,103,115,116,91,92,104,116,117,30,40,41,42,52,31,41,42,43,53,32,42,43,44,54,33,43,44,45,55,41,51,52,53,63,42,52,53,54,64,43,53,54,55,65,44,54,55,56,66,45,55,56,57,67,46,56,57,58,68,53,63,64,65,75,54,64,65,66,76,55,65,66,67,77,56,66,67,68,78,57,67,68,69,79,58,68,69,70,80,65,75,76,77,87,66,76,77,78,88,67,77,78,79,89,68,78,79,80,90,69,79,80,81,91,70,80,81,82,92,77,87,88,89,99,78,88,89,90,100,79,89,90,91,101,80,90,91,92,102,81,91,92,93,103,82,92,93,94,104,90,100,101,102,112,91,101,102,103,113,92,102,103,104,114,93,103,104,105,115,28,40,41,42,54,29,41,42,43,55,30,42,43,44,56,31,43,44,45,57,39,51,52,53,65,40,52,53,54,66,41,53,54,55,67,42,54,55,56,68,43,55,56,57,69,44,56,57,58,70,51,63,64,65,77,52,64,65,66,78,53,65,66,67,79,54,66,67,68,80,55,67,68,69,81,56,68,69,70,82,63,75,76,77,89,64,76,77,78,90,65,77,78,79,91,66,78,79,80,92,67,79,80,81,93,68,80,81,82,94,75,87,88,89,101,76,88,89,90,102,77,89,90,91,103,78,90,91,92,104,79,91,92,93,105,80,92,93,94,106,88,100,101,102,114,89,101,102,103,115,90,102,103,104,116,91,103,104,105,117
};
for(int gi=0;gi<640; gi+=5)
{if(hi==680){z[z21]=0, z[z22]=0, z[z23]=0, z[z24]=0,z[z25]=0;z[z26]=0, z[z27]=0, z[z28]=0, z[z29]=0,z[z30]=0;continue;}
y++;int gg1=gi,gg2=gi+1,gg3=gi+2,gg4=gi+3,gg5=gi+4;
int g1=g[gg1],g2=g[gg2],g3=g[gg3],g4=g[gg4],g5=g[gg5];
 
z26=g1-1,z27=g2-1,z28=g3-1,z29=g4-1,z30=g5-1;
 
if(z[z26]>0 || z[z27]>0 ||z[z28]>0 ||z[z29]>0 ||z[z30]>0)continue;
 else {z[z26]=6, z[z27]=6, z[z28]=6, z[z29]=6,z[z30]=6;}
 system ("pause"); cout<<"g"<<gi<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
 
int h[]={
28,29,30,41,53,29,30,31,42,54,30,31,32,43,55,31,32,33,44,56,39,40,41,52,64,40,41,42,53,65,41,42,43,54,66,42,43,44,55,67,43,44,45,56,68,44,45,46,57,69,51,52,53,64,76,52,53,54,65,77,53,54,55,66,78,54,55,56,67,79,55,56,57,68,80,56,57,58,69,81,63,64,65,76,88,64,65,66,77,89,65,66,67,78,90,66,67,68,79,91,67,68,69,80,92,68,69,70,81,93,75,76,77,88,100,76,77,78,89,101,77,78,79,90,102,78,79,80,91,103,79,80,81,92,104,80,81,82,93,105,87,88,89,100,112,88,89,90,101,113,89,90,91,102,114,90,91,92,103,115,91,92,93,104,116,92,93,94,105,117,29,39,40,41,53,30,40,41,42,54,31,41,42,43,55,32,42,43,44,56,33,43,44,45,57,41,51,52,53,65,42,52,53,54,66,43,53,54,55,67,44,54,55,56,68,45,55,56,57,69,46,56,57,58,70,53,63,64,65,77,54,64,65,66,78,55,65,66,67,79,56,66,67,68,80,57,67,68,69,81,58,68,69,70,82,65,75,76,77,89,66,76,77,78,90,67,77,78,79,91,68,78,79,80,92,69,79,80,81,93,70,80,81,82,94,77,87,88,89,101,78,88,89,90,102,79,89,90,91,103,80,90,91,92,104,81,91,92,93,105,82,92,93,94,106,89,99,100,101,113,90,100,101,102,114,91,101,102,103,115,92,102,103,104,116,93,103,104,105,117,28,40,41,42,52,29,41,42,43,53,30,42,43,44,54,31,43,44,45,55,32,44,45,46,56,39,51,52,53,63,40,52,53,54,64,41,53,54,55,65,42,54,55,56,66,43,55,56,57,67,44,56,57,58,68,51,63,64,65,75,52,64,65,66,76,53,65,66,67,77,54,66,67,68,78,55,67,68,69,79,56,68,69,70,80,63,75,76,77,87,64,76,77,78,88,65,77,78,79,89,66,78,79,80,90,67,79,80,81,91,68,80,81,82,92,75,87,88,89,99,76,88,89,90,100,77,89,90,91,101,78,90,91,92,102,79,91,92,93,103,80,92,93,94,104,88,100,101,102,112,89,101,102,103,113,90,102,103,104,114,91,103,104,105,115,92,104,105,106,116,28,40,51,52,53,29,41,52,53,54,30,42,53,54,55,31,43,54,55,56,32,44,55,56,57,33,45,56,57,58,40,52,63,64,65,41,53,64,65,66,42,54,65,66,67,43,55,66,67,68,44,56,67,68,69,45,57,68,69,70,52,64,75,76,77,53,65,76,77,78,54,66,77,78,79,55,67,78,79,80,56,68,79,80,81,57,69,80,81,82,64,76,87,88,89,65,77,88,89,90,66,78,89,90,91,67,79,90,91,92,68,80,91,92,93,69,81,92,93,94,76,88,99,100,101,77,89,100,101,102,78,90,101,102,103,79,91,102,103,104,80,92,103,104,105,81,93,104,105,106,89,101,112,113,114,90,102,113,114,115,91,103,114,115,116,92,104,115,116,117
};
for(int hi=0;hi<680; hi+=5)
{if(ki==1560){z[z26]=0, z[z27]=0, z[z28]=0, z[z29]=0,z[z30]=0;z[z31]=0, z[z32]=0, z[z33]=0, z[z34]=0,z[z35]=0;continue;}
y++;int hh1=hi,hh2=hi+1,hh3=hi+2,hh4=hi+3,hh5=hi+4;
int h1=h[hh1],h2=h[hh2],h3=h[hh3],h4=h[hh4],h5=h[hh5];
 
z31=h1-1,z32=h2-1,z33=h3-1,z34=h4-1,z35=h5-1;
 
if(z[z31]>0 || z[z32]>0 ||z[z33]>0 ||z[z34]>0 ||z[z35]>0)continue;
 else {z[z31]=7, z[z32]=7, z[z33]=7, z[z34]=7,z[z35]=7;}
 system ("pause"); cout<<"h"<<hi<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
 
int k[]={
28,29,30,40,41,29,30,31,41,42,30,31,32,42,43,31,32,33,43,44,39,40,41,51,52,40,41,42,52,53,41,42,43,53,54,42,43,44,54,55,43,44,45,55,56,44,45,46,56,57,51,52,53,63,64,52,53,54,64,65,53,54,55,65,66,54,55,56,66,67,55,56,57,67,68,56,57,58,68,69,63,64,65,75,76,64,65,66,76,77,65,66,67,77,78,66,67,68,78,79,67,68,69,79,80,68,69,70,80,81,75,76,77,87,88,76,77,78,88,89,77,78,79,89,90,78,79,80,90,91,79,80,81,91,92,80,81,82,92,93,87,88,89,99,100,88,89,90,100,101,89,90,91,101,102,90,91,92,102,103,91,92,93,103,104,92,93,94,104,105,100,101,102,112,113,101,102,103,113,114,102,103,104,114,115,103,104,105,115,116,104,105,106,116,117,28,29,30,41,42,29,30,31,42,43,30,31,32,43,44,31,32,33,44,45,39,40,41,52,53,40,41,42,53,54,41,42,43,54,55,42,43,44,55,56,43,44,45,56,57,44,45,46,57,58,51,52,53,64,65,52,53,54,65,66,53,54,55,66,67,54,55,56,67,68,55,56,57,68,69,56,57,58,69,70,63,64,65,76,77,64,65,66,77,78,65,66,67,78,79,66,67,68,79,80,67,68,69,80,81,68,69,70,81,82,75,76,77,88,89,76,77,78,89,90,77,78,79,90,91,78,79,80,91,92,79,80,81,92,93,80,81,82,93,94,87,88,89,100,101,88,89,90,101,102,89,90,91,102,103,90,91,92,103,104,91,92,93,104,105,92,93,94,105,106,99,100,101,112,113,100,101,102,113,114,101,102,103,114,115,102,103,104,115,116,103,104,105,116,117,28,29,39,40,41,29,30,40,41,42,30,31,41,42,43,31,32,42,43,44,32,33,43,44,45,40,41,51,52,53,41,42,52,53,54,42,43,53,54,55,43,44,54,55,56,44,45,55,56,57,45,46,56,57,58,52,53,63,64,65,53,54,64,65,66,54,55,65,66,67,55,56,66,67,68,56,57,67,68,69,57,58,68,69,70,64,65,75,76,77,65,66,76,77,78,66,67,77,78,79,67,68,78,79,80,68,69,79,80,81,69,70,80,81,82,76,77,87,88,89,77,78,88,89,90,78,79,89,90,91,79,80,90,91,92,80,81,91,92,93,81,82,92,93,94,88,89,99,100,101,89,90,100,101,102,90,91,101,102,103,91,92,102,103,104,92,93,103,104,105,93,94,104,105,106,101,102,112,113,114,102,103,113,114,115,103,104,114,115,116,104,105,115,116,117,28,29,40,41,42,29,30,41,42,43,30,31,42,43,44,31,32,43,44,45,32,33,44,45,46,39,40,51,52,53,40,41,52,53,54,41,42,53,54,55,42,43,54,55,56,43,44,55,56,57,44,45,56,57,58,51,52,63,64,65,52,53,64,65,66,53,54,65,66,67,54,55,66,67,68,55,56,67,68,69,56,57,68,69,70,63,64,75,76,77,64,65,76,77,78,65,66,77,78,79,66,67,78,79,80,67,68,79,80,81,68,69,80,81,82,75,76,87,88,89,76,77,88,89,90,77,78,89,90,91,78,79,90,91,92,79,80,91,92,93,80,81,92,93,94,87,88,99,100,101,88,89,100,101,102,89,90,101,102,103,90,91,102,103,104,91,92,103,104,105,92,93,104,105,106,100,101,112,113,114,101,102,113,114,115,102,103,114,115,116,103,104,115,116,117,28,29,40,41,52,29,30,41,42,53,30,31,42,43,54,31,32,43,44,55,32,33,44,45,56,39,40,51,52,63,40,41,52,53,64,41,42,53,54,65,42,43,54,55,66,43,44,55,56,67,44,45,56,57,68,45,46,57,58,69,51,52,63,64,75,52,53,64,65,76,53,54,65,66,77,54,55,66,67,78,55,56,67,68,79,56,57,68,69,80,57,58,69,70,81,63,64,75,76,87,64,65,76,77,88,65,66,77,78,89,66,67,78,79,90,67,68,79,80,91,68,69,80,81,92,69,70,81,82,93,75,76,87,88,99,76,77,88,89,100,77,78,89,90,101,78,79,90,91,102,79,80,91,92,103,80,81,92,93,104,81,82,93,94,105,88,89,100,101,112,89,90,101,102,113,90,91,102,103,114,91,92,103,104,115,92,93,104,105,116,93,94,105,106,117,28,29,40,41,53,29,30,41,42,54,30,31,42,43,55,31,32,43,44,56,32,33,44,45,57,39,40,51,52,64,40,41,52,53,65,41,42,53,54,66,42,43,54,55,67,43,44,55,56,68,44,45,56,57,69,45,46,57,58,70,51,52,63,64,76,52,53,64,65,77,53,54,65,66,78,54,55,66,67,79,55,56,67,68,80,56,57,68,69,81,57,58,69,70,82,63,64,75,76,88,64,65,76,77,89,65,66,77,78,90,66,67,78,79,91,67,68,79,80,92,68,69,80,81,93,69,70,81,82,94,75,76,87,88,100,76,77,88,89,101,77,78,89,90,102,78,79,90,91,103,79,80,91,92,104,80,81,92,93,105,81,82,93,94,106,87,88,99,100,112,88,89,100,101,113,89,90,101,102,114,90,91,102,103,115,91,92,103,104,116,92,93,104,105,117,28,39,40,51,52,29,40,41,52,53,30,41,42,53,54,31,42,43,54,55,32,43,44,55,56,33,44,45,56,57,40,51,52,63,64,41,52,53,64,65,42,53,54,65,66,43,54,55,66,67,44,55,56,67,68,45,56,57,68,69,46,57,58,69,70,52,63,64,75,76,53,64,65,76,77,54,65,66,77,78,55,66,67,78,79,56,67,68,79,80,57,68,69,80,81,58,69,70,81,82,64,75,76,87,88,65,76,77,88,89,66,77,78,89,90,67,78,79,90,91,68,79,80,91,92,69,80,81,92,93,70,81,82,93,94,76,87,88,99,100,77,88,89,100,101,78,89,90,101,102,79,90,91,102,103,80,91,92,103,104,81,92,93,104,105,82,93,94,105,106,89,100,101,112,113,90,101,102,113,114,91,102,103,114,115,92,103,104,115,116,93,104,105,116,117,28,40,41,52,53,29,41,42,53,54,30,42,43,54,55,31,43,44,55,56,32,44,45,56,57,33,45,46,57,58,39,51,52,63,64,40,52,53,64,65,41,53,54,65,66,42,54,55,66,67,43,55,56,67,68,44,56,57,68,69,45,57,58,69,70,51,63,64,75,76,52,64,65,76,77,53,65,66,77,78,54,66,67,78,79,55,67,68,79,80,56,68,69,80,81,57,69,70,81,82,63,75,76,87,88,64,76,77,88,89,65,77,78,89,90,66,78,79,90,91,67,79,80,91,92,68,80,81,92,93,69,81,82,93,94,75,87,88,99,100,76,88,89,100,101,77,89,90,101,102,78,90,91,102,103,79,91,92,103,104,80,92,93,104,105,81,93,94,105,106,88,100,101,112,113,89,101,102,113,114,90,102,103,114,115,91,103,104,115,116,92,104,105,116,117
};
for(int ki=0;ki<1560; ki+=5)    
{if(mi==1400){z[z31]=0, z[z32]=0, z[z33]=0, z[z34]=0,z[z35]=0;z[z36]=0, z[z37]=0, z[z38]=0, z[z39]=0,z[z40]=0;continue;}
y++;int kk1=ki,kk2=ki+1,kk3=ki+2,kk4=ki+3,kk5=ki+4;
int k1=k[kk1],k2=k[kk2],k3=k[kk3],k4=k[kk4],k5=k[kk5];
 
z36=k1-1,z37=k2-1,z38=k3-1,z39=k4-1,z40=k5-1;
 
if(z[z36]>0 || z[z37]>0 ||z[z38]>0 ||z[z39]>0 ||z[z40]>0)continue;
 else {z[z36]=8, z[z37]=8, z[z38]=8, z[z39]=8,z[z40]=8;}
 system ("pause"); cout<<"k"<<ki<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
 
int m[]={
28,29,39,40,52,29,30,40,41,53,30,31,41,42,54,31,32,42,43,55,32,33,43,44,56,40,41,51,52,64,41,42,52,53,65,42,43,53,54,66,43,44,54,55,67,44,45,55,56,68,45,46,56,57,69,52,53,63,64,76,53,54,64,65,77,54,55,65,66,78,55,56,66,67,79,56,57,67,68,80,57,58,68,69,81,64,65,75,76,88,65,66,76,77,89,66,67,77,78,90,67,68,78,79,91,68,69,79,80,92,69,70,80,81,93,76,77,87,88,100,77,78,88,89,101,78,79,89,90,102,79,80,90,91,103,80,81,91,92,104,81,82,92,93,105,88,89,99,100,112,89,90,100,101,113,90,91,101,102,114,91,92,102,103,115,92,93,103,104,116,93,94,104,105,117,28,29,41,42,53,29,30,42,43,54,30,31,43,44,55,31,32,44,45,56,32,33,45,46,57,39,40,52,53,64,40,41,53,54,65,41,42,54,55,66,42,43,55,56,67,43,44,56,57,68,44,45,57,58,69,51,52,64,65,76,52,53,65,66,77,53,54,66,67,78,54,55,67,68,79,55,56,68,69,80,56,57,69,70,81,63,64,76,77,88,64,65,77,78,89,65,66,78,79,90,66,67,79,80,91,67,68,80,81,92,68,69,81,82,93,75,76,88,89,100,76,77,89,90,101,77,78,90,91,102,78,79,91,92,103,79,80,92,93,104,80,81,93,94,105,87,88,100,101,112,88,89,101,102,113,89,90,102,103,114,90,91,103,104,115,91,92,104,105,116,92,93,105,106,117,29,39,40,41,52,30,40,41,42,53,31,41,42,43,54,32,42,43,44,55,33,43,44,45,56,41,51,52,53,64,42,52,53,54,65,43,53,54,55,66,44,54,55,56,67,45,55,56,57,68,46,56,57,58,69,53,63,64,65,76,54,64,65,66,77,55,65,66,67,78,56,66,67,68,79,57,67,68,69,80,58,68,69,70,81,65,75,76,77,88,66,76,77,78,89,67,77,78,79,90,68,78,79,80,91,69,79,80,81,92,70,80,81,82,93,77,87,88,89,100,78,88,89,90,101,79,89,90,91,102,80,90,91,92,103,81,91,92,93,104,82,92,93,94,105,89,99,100,101,112,90,100,101,102,113,91,101,102,103,114,92,102,103,104,115,93,103,104,105,116,94,104,105,106,117,28,39,40,41,51,29,40,41,42,52,30,41,42,43,53,31,42,43,44,54,32,43,44,45,55,33,44,45,46,56,40,51,52,53,63,41,52,53,54,64,42,53,54,55,65,43,54,55,56,66,44,55,56,57,67,45,56,57,58,68,52,63,64,65,75,53,64,65,66,76,54,65,66,67,77,55,66,67,68,78,56,67,68,69,79,57,68,69,70,80,64,75,76,77,87,65,76,77,78,88,66,77,78,79,89,67,78,79,80,90,68,79,80,81,91,69,80,81,82,92,76,87,88,89,99,77,88,89,90,100,78,89,90,91,101,79,90,91,92,102,80,91,92,93,103,81,92,93,94,104,89,100,101,102,112,90,101,102,103,113,91,102,103,104,114,92,103,104,105,115,93,104,105,106,116,28,39,40,41,53,29,40,41,42,54,30,41,42,43,55,31,42,43,44,56,32,43,44,45,57,33,44,45,46,58,40,51,52,53,65,41,52,53,54,66,42,53,54,55,67,43,54,55,56,68,44,55,56,57,69,45,56,57,58,70,52,63,64,65,77,53,64,65,66,78,54,65,66,67,79,55,66,67,68,80,56,67,68,69,81,57,68,69,70,82,64,75,76,77,89,65,76,77,78,90,66,77,78,79,91,67,78,79,80,92,68,79,80,81,93,69,80,81,82,94,76,87,88,89,101,77,88,89,90,102,78,89,90,91,103,79,90,91,92,104,80,91,92,93,105,81,92,93,94,106,88,99,100,101,113,89,100,101,102,114,90,101,102,103,115,91,102,103,104,116,92,103,104,105,117,28,39,40,52,53,29,40,41,53,54,30,41,42,54,55,31,42,43,55,56,32,43,44,56,57,33,44,45,57,58,40,51,52,64,65,41,52,53,65,66,42,53,54,66,67,43,54,55,67,68,44,55,56,68,69,45,56,57,69,70,52,63,64,76,77,53,64,65,77,78,54,65,66,78,79,55,66,67,79,80,56,67,68,80,81,57,68,69,81,82,64,75,76,88,89,65,76,77,89,90,66,77,78,90,91,67,78,79,91,92,68,79,80,92,93,69,80,81,93,94,76,87,88,100,101,77,88,89,101,102,78,89,90,102,103,79,90,91,103,104,80,91,92,104,105,81,92,93,105,106,88,99,100,112,113,89,100,101,113,114,90,101,102,114,115,91,102,103,115,116,92,103,104,116,117,28,40,41,42,53,29,41,42,43,54,30,42,43,44,55,31,43,44,45,56,32,44,45,46,57,39,51,52,53,64,40,52,53,54,65,41,53,54,55,66,42,54,55,56,67,43,55,56,57,68,44,56,57,58,69,51,63,64,65,76,52,64,65,66,77,53,65,66,67,78,54,66,67,68,79,55,67,68,69,80,56,68,69,70,81,63,75,76,77,88,64,76,77,78,89,65,77,78,79,90,66,78,79,80,91,67,79,80,81,92,68,80,81,82,93,75,87,88,89,100,76,88,89,90,101,77,89,90,91,102,78,90,91,92,103,79,91,92,93,104,80,92,93,94,105,87,99,100,101,112,88,100,101,102,113,89,101,102,103,114,90,102,103,104,115,91,103,104,105,116,92,104,105,106,117,28,40,41,51,52,29,41,42,52,53,30,42,43,53,54,31,43,44,54,55,32,44,45,55,56,33,45,46,56,57,40,52,53,63,64,41,53,54,64,65,42,54,55,65,66,43,55,56,66,67,44,56,57,67,68,45,57,58,68,69,52,64,65,75,76,53,65,66,76,77,54,66,67,77,78,55,67,68,78,79,56,68,69,79,80,57,69,70,80,81,64,76,77,87,88,65,77,78,88,89,66,78,79,89,90,67,79,80,90,91,68,80,81,91,92,69,81,82,92,93,76,88,89,99,100,77,89,90,100,101,78,90,91,101,102,79,91,92,102,103,80,92,93,103,104,81,93,94,104,105,89,101,102,112,113,90,102,103,113,114,91,103,104,114,115,92,104,105,115,116,93,105,106,116,117
};
for(int mi=0;mi<1400; mi+=5)
{if(ni==1280){z[z36]=0, z[z37]=0, z[z38]=0, z[z39]=0,z[z40]=0;z[z41]=0, z[z42]=0, z[z43]=0, z[z44]=0,z[z45]=0;continue;}
y++;int mm1=mi,mm2=mi+1,mm3=mi+2,mm4=mi+3,mm5=mi+4;
int m1=m[mm1],m2=m[mm2],m3=m[mm3],m4=m[mm4],m5=m[mm5];
 
z41=m1-1,z42=m2-1,z43=m3-1,z44=m4-1,z45=m5-1;
 
if(z[z41]>0 || z[z42]>0 ||z[z43]>0 ||z[z44]>0 ||z[z45]>0)continue;
 else {z[z41]=9, z[z42]=9, z[z43]=9, z[z44]=9,z[z45]=9;}
 system ("pause"); cout<<"m"<<mi<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
 
int n[]={
28,29,30,31,40,29,30,31,32,41,30,31,32,33,42,39,40,41,42,51,40,41,42,43,52,41,42,43,44,53,42,43,44,45,54,43,44,45,46,55,51,52,53,54,63,52,53,54,55,64,53,54,55,56,65,54,55,56,57,66,55,56,57,58,67,63,64,65,66,75,64,65,66,67,76,65,66,67,68,77,66,67,68,69,78,67,68,69,70,79,75,76,77,78,87,76,77,78,79,88,77,78,79,80,89,78,79,80,81,90,79,80,81,82,91,87,88,89,90,99,88,89,90,91,100,89,90,91,92,101,90,91,92,93,102,91,92,93,94,103,100,101,102,103,112,101,102,103,104,113,102,103,104,105,114,103,104,105,106,115,28,29,30,31,43,29,30,31,32,44,30,31,32,33,45,39,40,41,42,54,40,41,42,43,55,41,42,43,44,56,42,43,44,45,57,43,44,45,46,58,51,52,53,54,66,52,53,54,55,67,53,54,55,56,68,54,55,56,57,69,55,56,57,58,70,63,64,65,66,78,64,65,66,67,79,65,66,67,68,80,66,67,68,69,81,67,68,69,70,82,75,76,77,78,90,76,77,78,79,91,77,78,79,80,92,78,79,80,81,93,79,80,81,82,94,87,88,89,90,102,88,89,90,91,103,89,90,91,92,104,90,91,92,93,105,91,92,93,94,106,99,100,101,102,114,100,101,102,103,115,101,102,103,104,116,102,103,104,105,117,30,39,40,41,42,31,40,41,42,43,32,41,42,43,44,33,42,43,44,45,42,51,52,53,54,43,52,53,54,55,44,53,54,55,56,45,54,55,56,57,46,55,56,57,58,54,63,64,65,66,55,64,65,66,67,56,65,66,67,68,57,66,67,68,69,58,67,68,69,70,66,75,76,77,78,67,76,77,78,79,68,77,78,79,80,69,78,79,80,81,70,79,80,81,82,78,87,88,89,90,79,88,89,90,91,80,89,90,91,92,81,90,91,92,93,82,91,92,93,94,90,99,100,101,102,91,100,101,102,103,92,101,102,103,104,93,102,103,104,105,94,103,104,105,106,103,112,113,114,115,104,113,114,115,116,105,114,115,116,117,28,40,41,42,43,29,41,42,43,44,30,42,43,44,45,31,43,44,45,46,39,51,52,53,54,40,52,53,54,55,41,53,54,55,56,42,54,55,56,57,43,55,56,57,58,51,63,64,65,66,52,64,65,66,67,53,65,66,67,68,54,66,67,68,69,55,67,68,69,70,63,75,76,77,78,64,76,77,78,79,65,77,78,79,80,66,78,79,80,81,67,79,80,81,82,75,87,88,89,90,76,88,89,90,91,77,89,90,91,92,78,90,91,92,93,79,91,92,93,94,87,99,100,101,102,88,100,101,102,103,89,101,102,103,104,90,102,103,104,105,91,103,104,105,106,100,112,113,114,115,101,113,114,115,116,102,114,115,116,117,28,29,40,52,64,29,30,41,53,65,30,31,42,54,66,31,32,43,55,67,32,33,44,56,68,39,40,51,63,75,40,41,52,64,76,41,42,53,65,77,42,43,54,66,78,43,44,55,67,79,44,45,56,68,80,45,46,57,69,81,51,52,63,75,87,52,53,64,76,88,53,54,65,77,89,54,55,66,78,90,55,56,67,79,91,56,57,68,80,92,57,58,69,81,93,63,64,75,87,99,64,65,76,88,100,65,66,77,89,101,66,67,78,90,102,67,68,79,91,103,68,69,80,92,104,69,70,81,93,105,76,77,88,100,112,77,78,89,101,113,78,79,90,102,114,79,80,91,103,115,80,81,92,104,116,81,82,93,105,117,28,29,41,53,65,29,30,42,54,66,30,31,43,55,67,31,32,44,56,68,32,33,45,57,69,39,40,52,64,76,40,41,53,65,77,41,42,54,66,78,42,43,55,67,79,43,44,56,68,80,44,45,57,69,81,45,46,58,70,82,51,52,64,76,88,52,53,65,77,89,53,54,66,78,90,54,55,67,79,91,55,56,68,80,92,56,57,69,81,93,57,58,70,82,94,63,64,76,88,100,64,65,77,89,101,65,66,78,90,102,66,67,79,91,103,67,68,80,92,104,68,69,81,93,105,69,70,82,94,106,75,76,88,100,112,76,77,89,101,113,77,78,90,102,114,78,79,91,103,115,79,80,92,104,116,80,81,93,105,117,28,40,52,63,64,29,41,53,64,65,30,42,54,65,66,31,43,55,66,67,32,44,56,67,68,33,45,57,68,69,40,52,64,75,76,41,53,65,76,77,42,54,66,77,78,43,55,67,78,79,44,56,68,79,80,45,57,69,80,81,46,58,70,81,82,52,64,76,87,88,53,65,77,88,89,54,66,78,89,90,55,67,79,90,91,56,68,80,91,92,57,69,81,92,93,58,70,82,93,94,64,76,88,99,100,65,77,89,100,101,66,78,90,101,102,67,79,91,102,103,68,80,92,103,104,69,81,93,104,105,70,82,94,105,106,77,89,101,112,113,78,90,102,113,114,79,91,103,114,115,80,92,104,115,116,81,93,105,116,117,28,40,52,64,65,29,41,53,65,66,30,42,54,66,67,31,43,55,67,68,32,44,56,68,69,33,45,57,69,70,39,51,63,75,76,40,52,64,76,77,41,53,65,77,78,42,54,66,78,79,43,55,67,79,80,44,56,68,80,81,45,57,69,81,82,51,63,75,87,88,52,64,76,88,89,53,65,77,89,90,54,66,78,90,91,55,67,79,91,92,56,68,80,92,93,57,69,81,93,94,63,75,87,99,100,64,76,88,100,101,65,77,89,101,102,66,78,90,102,103,67,79,91,103,104,68,80,92,104,105,69,81,93,105,106,76,88,100,112,113,77,89,101,113,114,78,90,102,114,115,79,91,103,115,116,80,92,104,116,117
};
for(int ni=0;ni<1280; ni+=5)
{ if(pi==1320){z[z41]=0, z[z42]=0, z[z43]=0, z[z44]=0,z[z45]=0;z[z46]=0, z[z47]=0, z[z48]=0, z[z49]=0,z[z50]=0;continue;}
y++;int nn1=ni,nn2=ni+1,nn3=ni+2,nn4=ni+3,nn5=ni+4;
int n1=n[nn1],n2=n[nn2],n3=n[nn3],n4=n[nn4],n5=n[nn5];
 
z46=n1-1,z47=n2-1,z48=n3-1,z49=n4-1,z50=n5-1;
 
if(z[z46]>0 || z[z47]>0 ||z[z48]>0 ||z[z49]>0 ||z[z50]>0)continue;
 else {z[z46]=1, z[z47]=1, z[z48]=1, z[z49]=1,z[z50]=1;}
 system ("pause"); cout<<"n"<<ni<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
 
int p[]={
28,29,30,31,41,29,30,31,32,42,30,31,32,33,43,39,40,41,42,52,40,41,42,43,53,41,42,43,44,54,42,43,44,45,55,43,44,45,46,56,51,52,53,54,64,52,53,54,55,65,53,54,55,56,66,54,55,56,57,67,55,56,57,58,68,63,64,65,66,76,64,65,66,67,77,65,66,67,68,78,66,67,68,69,79,67,68,69,70,80,75,76,77,78,88,76,77,78,79,89,77,78,79,80,90,78,79,80,81,91,79,80,81,82,92,87,88,89,90,100,88,89,90,91,101,89,90,91,92,102,90,91,92,93,103,91,92,93,94,104,99,100,101,102,112,100,101,102,103,113,101,102,103,104,114,102,103,104,105,115,103,104,105,106,116,28,29,30,31,42,29,30,31,32,43,30,31,32,33,44,39,40,41,42,53,40,41,42,43,54,41,42,43,44,55,42,43,44,45,56,43,44,45,46,57,51,52,53,54,65,52,53,54,55,66,53,54,55,56,67,54,55,56,57,68,55,56,57,58,69,63,64,65,66,77,64,65,66,67,78,65,66,67,68,79,66,67,68,69,80,67,68,69,70,81,75,76,77,78,89,76,77,78,79,90,77,78,79,80,91,78,79,80,81,92,79,80,81,82,93,87,88,89,90,101,88,89,90,91,102,89,90,91,92,103,90,91,92,93,104,91,92,93,94,105,99,100,101,102,113,100,101,102,103,114,101,102,103,104,115,102,103,104,105,116,103,104,105,106,117,29,39,40,41,42,30,40,41,42,43,31,41,42,43,44,32,42,43,44,45,33,43,44,45,46,41,51,52,53,54,42,52,53,54,55,43,53,54,55,56,44,54,55,56,57,45,55,56,57,58,53,63,64,65,66,54,64,65,66,67,55,65,66,67,68,56,66,67,68,69,57,67,68,69,70,65,75,76,77,78,66,76,77,78,79,67,77,78,79,80,68,78,79,80,81,69,79,80,81,82,77,87,88,89,90,78,88,89,90,91,79,89,90,91,92,80,90,91,92,93,81,91,92,93,94,89,99,100,101,102,90,100,101,102,103,91,101,102,103,104,92,102,103,104,105,93,103,104,105,106,102,112,113,114,115,103,113,114,115,116,104,114,115,116,117,28,39,40,41,42,29,40,41,42,43,30,41,42,43,44,31,42,43,44,45,32,43,44,45,46,40,51,52,53,54,41,52,53,54,55,42,53,54,55,56,43,54,55,56,57,44,55,56,57,58,52,63,64,65,66,53,64,65,66,67,54,65,66,67,68,55,66,67,68,69,56,67,68,69,70,64,75,76,77,78,65,76,77,78,79,66,77,78,79,80,67,78,79,80,81,68,79,80,81,82,76,87,88,89,90,77,88,89,90,91,78,89,90,91,92,79,90,91,92,93,80,91,92,93,94,88,99,100,101,102,89,100,101,102,103,90,101,102,103,104,91,102,103,104,105,92,103,104,105,106,101,112,113,114,115,102,113,114,115,116,103,114,115,116,117,28,39,40,52,64,29,40,41,53,65,30,41,42,54,66,31,42,43,55,67,32,43,44,56,68,33,44,45,57,69,40,51,52,64,76,41,52,53,65,77,42,53,54,66,78,43,54,55,67,79,44,55,56,68,80,45,56,57,69,81,46,57,58,70,82,52,63,64,76,88,53,64,65,77,89,54,65,66,78,90,55,66,67,79,91,56,67,68,80,92,57,68,69,81,93,58,69,70,82,94,64,75,76,88,100,65,76,77,89,101,66,77,78,90,102,67,78,79,91,103,68,79,80,92,104,69,80,81,93,105,70,81,82,94,106,76,87,88,100,112,77,88,89,101,113,78,89,90,102,114,79,90,91,103,115,80,91,92,104,116,81,92,93,105,117,28,40,41,52,64,29,41,42,53,65,30,42,43,54,66,31,43,44,55,67,32,44,45,56,68,33,45,46,57,69,39,51,52,63,75,40,52,53,64,76,41,53,54,65,77,42,54,55,66,78,43,55,56,67,79,44,56,57,68,80,45,57,58,69,81,51,63,64,75,87,52,64,65,76,88,53,65,66,77,89,54,66,67,78,90,55,67,68,79,91,56,68,69,80,92,57,69,70,81,93,63,75,76,87,99,64,76,77,88,100,65,77,78,89,101,66,78,79,90,102,67,79,80,91,103,68,80,81,92,104,69,81,82,93,105,76,88,89,100,112,77,89,90,101,113,78,90,91,102,114,79,91,92,103,115,80,92,93,104,116,81,93,94,105,117,28,40,51,52,64,29,41,52,53,65,30,42,53,54,66,31,43,54,55,67,32,44,55,56,68,33,45,56,57,69,40,52,63,64,76,41,53,64,65,77,42,54,65,66,78,43,55,66,67,79,44,56,67,68,80,45,57,68,69,81,46,58,69,70,82,52,64,75,76,88,53,65,76,77,89,54,66,77,78,90,55,67,78,79,91,56,68,79,80,92,57,69,80,81,93,58,70,81,82,94,64,76,87,88,100,65,77,88,89,101,66,78,89,90,102,67,79,90,91,103,68,80,91,92,104,69,81,92,93,105,70,82,93,94,106,76,88,99,100,112,77,89,100,101,113,78,90,101,102,114,79,91,102,103,115,80,92,103,104,116,81,93,104,105,117,28,40,52,53,64,29,41,53,54,65,30,42,54,55,66,31,43,55,56,67,32,44,56,57,68,33,45,57,58,69,39,51,63,64,75,40,52,64,65,76,41,53,65,66,77,42,54,66,67,78,43,55,67,68,79,44,56,68,69,80,45,57,69,70,81,51,63,75,76,87,52,64,76,77,88,53,65,77,78,89,54,66,78,79,90,55,67,79,80,91,56,68,80,81,92,57,69,81,82,93,63,75,87,88,99,64,76,88,89,100,65,77,89,90,101,66,78,90,91,102,67,79,91,92,103,68,80,92,93,104,69,81,93,94,105,76,88,100,101,112,77,89,101,102,113,78,90,102,103,114,79,91,103,104,115,80,92,104,105,116,81,93,105,106,117
};
for(int pi=0;pi<1320; pi+=5)
{if(pi==1320){z[z46]=0, z[z47]=0, z[z48]=0, z[z49]=0,z[z50]=0;z[z51]=0, z[z52]=0, z[z53]=0, z[z54]=0, z[z55]=0;continue;}
y++;int pp1=pi,pp2=pi+1,pp3=pi+2,pp4=pi+3,pp5=pi+4;
int p1=p[pp1],p2=p[pp2],p3=p[pp3],p4=p[pp4],p5=p[pp5];
 
z51=p1-1,z52=p2-1,z53=p3-1,z54=p4-1,z55=p5-1;
 
if(z[z51]>0 || z[z52]>0 ||z[z53]>0 ||z[z54]>0 ||z[z55]>0)continue;
 else {z[z51]=2, z[z52]=2, z[z53]=2, z[z54]=2,z[z55]=2;}
 system ("pause"); cout<<"p"<<pi<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl;
  
int r[]={
28,29,30,39,40,29,30,31,40,41,30,31,32,41,42,31,32,33,42,43,40,41,42,51,52,41,42,43,52,53,42,43,44,53,54,43,44,45,54,55,44,45,46,55,56,52,53,54,63,64,53,54,55,64,65,54,55,56,65,66,55,56,57,66,67,56,57,58,67,68,64,65,66,75,76,65,66,67,76,77,66,67,68,77,78,67,68,69,78,79,68,69,70,79,80,76,77,78,87,88,77,78,79,88,89,78,79,80,89,90,79,80,81,90,91,80,81,82,91,92,88,89,90,99,100,89,90,91,100,101,90,91,92,101,102,91,92,93,102,103,92,93,94,103,104,101,102,103,112,113,102,103,104,113,114,103,104,105,114,115,104,105,106,115,116,28,29,30,42,43,29,30,31,43,44,30,31,32,44,45,31,32,33,45,46,39,40,41,53,54,40,41,42,54,55,41,42,43,55,56,42,43,44,56,57,43,44,45,57,58,51,52,53,65,66,52,53,54,66,67,53,54,55,67,68,54,55,56,68,69,55,56,57,69,70,63,64,65,77,78,64,65,66,78,79,65,66,67,79,80,66,67,68,80,81,67,68,69,81,82,75,76,77,89,90,76,77,78,90,91,77,78,79,91,92,78,79,80,92,93,79,80,81,93,94,87,88,89,101,102,88,89,90,102,103,89,90,91,103,104,90,91,92,104,105,91,92,93,105,106,99,100,101,113,114,100,101,102,114,115,101,102,103,115,116,102,103,104,116,117,29,30,39,40,41,30,31,40,41,42,31,32,41,42,43,32,33,42,43,44,41,42,51,52,53,42,43,52,53,54,43,44,53,54,55,44,45,54,55,56,45,46,55,56,57,53,54,63,64,65,54,55,64,65,66,55,56,65,66,67,56,57,66,67,68,57,58,67,68,69,65,66,75,76,77,66,67,76,77,78,67,68,77,78,79,68,69,78,79,80,69,70,79,80,81,77,78,87,88,89,78,79,88,89,90,79,80,89,90,91,80,81,90,91,92,81,82,91,92,93,89,90,99,100,101,90,91,100,101,102,91,92,101,102,103,92,93,102,103,104,93,94,103,104,105,102,103,112,113,114,103,104,113,114,115,104,105,114,115,116,105,106,115,116,117,28,29,41,42,43,29,30,42,43,44,30,31,43,44,45,31,32,44,45,46,39,40,52,53,54,40,41,53,54,55,41,42,54,55,56,42,43,55,56,57,43,44,56,57,58,51,52,64,65,66,52,53,65,66,67,53,54,66,67,68,54,55,67,68,69,55,56,68,69,70,63,64,76,77,78,64,65,77,78,79,65,66,78,79,80,66,67,79,80,81,67,68,80,81,82,75,76,88,89,90,76,77,89,90,91,77,78,90,91,92,78,79,91,92,93,79,80,92,93,94,87,88,100,101,102,88,89,101,102,103,89,90,102,103,104,90,91,103,104,105,91,92,104,105,106,99,100,112,113,114,100,101,113,114,115,101,102,114,115,116,102,103,115,116,117,28,39,40,51,63,29,40,41,52,64,30,41,42,53,65,31,42,43,54,66,32,43,44,55,67,33,44,45,56,68,40,51,52,63,75,41,52,53,64,76,42,53,54,65,77,43,54,55,66,78,44,55,56,67,79,45,56,57,68,80,46,57,58,69,81,52,63,64,75,87,53,64,65,76,88,54,65,66,77,89,55,66,67,78,90,56,67,68,79,91,57,68,69,80,92,58,69,70,81,93,64,75,76,87,99,65,76,77,88,100,66,77,78,89,101,67,78,79,90,102,68,79,80,91,103,69,80,81,92,104,70,81,82,93,105,77,88,89,100,112,78,89,90,101,113,79,90,91,102,114,80,91,92,103,115,81,92,93,104,116,82,93,94,105,117,28,40,41,53,65,29,41,42,54,66,30,42,43,55,67,31,43,44,56,68,32,44,45,57,69,33,45,46,58,70,39,51,52,64,76,40,52,53,65,77,41,53,54,66,78,42,54,55,67,79,43,55,56,68,80,44,56,57,69,81,45,57,58,70,82,51,63,64,76,88,52,64,65,77,89,53,65,66,78,90,54,66,67,79,91,55,67,68,80,92,56,68,69,81,93,57,69,70,82,94,63,75,76,88,100,64,76,77,89,101,65,77,78,90,102,66,78,79,91,103,67,79,80,92,104,68,80,81,93,105,69,81,82,94,106,75,87,88,100,112,76,88,89,101,113,77,89,90,102,114,78,90,91,103,115,79,91,92,104,116,80,92,93,105,117,28,40,51,52,63,29,41,52,53,64,30,42,53,54,65,31,43,54,55,66,32,44,55,56,67,33,45,56,57,68,40,52,63,64,75,41,53,64,65,76,42,54,65,66,77,43,55,66,67,78,44,56,67,68,79,45,57,68,69,80,46,58,69,70,81,52,64,75,76,87,53,65,76,77,88,54,66,77,78,89,55,67,78,79,90,56,68,79,80,91,57,69,80,81,92,58,70,81,82,93,64,76,87,88,99,65,77,88,89,100,66,78,89,90,101,67,79,90,91,102,68,80,91,92,103,69,81,92,93,104,70,82,93,94,105,77,89,100,101,112,78,90,101,102,113,79,91,102,103,114,80,92,103,104,115,81,93,104,105,116,82,94,105,106,117,28,40,52,53,65
};
for(int ri=0;ri<1160; ri+=5)
{y++;int rr1=ri,rr2=ri+1,rr3=ri+2,rr4=ri+3,rr5=ri+4;
int r1=r[rr1],r2=r[rr2],r3=r[rr3],r4=r[rr4],r5=r[rr5];
z56=r1-1,z57=r2-1,z58=r3-1,z59=r4-1,z60=r5-1;
if(z[z56]>0 || z[z57]>0 ||z[z58]>0 ||z[z59]>0 ||z[z60]>0)continue;
else {z[z56]=3, z[z57]=3, z[z58]=3, z[z59]=3,z[z60]=3;}
   system ("pause"); cout<<"r"<<ri<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<"|"<<" "<<z[27]<<z[28]<<z[29]<<z[30]<<z[31]<<z[32]<<" "<<"|"<<endl
<<"|"<<z[38]<<z[39]<<z[40]<<z[41]<<z[42]<<z[43]<<z[44]<<z[45]<<"|"<<endl
<<"|"<<z[50]<<z[51]<<z[52]<<z[53]<<z[54]<<z[55]<<z[56]<<z[57]<<"|"<<endl
<<"|"<<z[62]<<z[63]<<z[64]<<z[65]<<z[66]<<z[67]<<z[68]<<z[69]<<"|"<<endl
<<"|"<<z[74]<<z[75]<<z[76]<<z[77]<<z[78]<<z[79]<<z[80]<<z[81]<<"|"<<endl
<<"|"<<z[86]<<z[87]<<z[88]<<z[89]<<z[90]<<z[91]<<z[92]<<z[93]<<"|"<<endl
<<"|"<<z[98]<<z[99]<<z[100]<<z[101]<<z[102]<<z[103]<<z[104]<<z[105]<<"|"<<endl
<<"|"<<" "<<z[111]<<z[112]<<z[113]<<z[114]<<z[115]<<z[116]<<" "<<"|"<<endl
<<"+"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"-"<<"+"<<endl
<<x++<<";"<<y<<endl;
  z[z56]=0, z[z57]=0, z[z58]=0, z[z59]=0,z[z60]=0; 
  z[z51]=0, z[z52]=0, z[z53]=0, z[z54]=0, z[z55]=0; 
    
}}}}}}}}}}}}    
system ("pause");
return 0;
        }
 
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Рейтинг@Mail.ru