-
Notifications
You must be signed in to change notification settings - Fork 9
/
temp.cpp
executable file
·38 lines (38 loc) · 1.16 KB
/
temp.cpp
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
if(i<0)
i+=cols;
else if(i>=cols)
i-=cols;
if(i<20&&i>0)
{
int distRow=maxRow-minRow;
if(maxRow<rows/2)
{
minRow=rows-maxRow;
maxRow=rows-minRow;
}
else
{
if(minRow<rows/2)
{
minRow=rows/2;
maxRow=rows/2+distRow;
}
}
}
else if(i>160&&i<cols)
{
int distRow=maxRow-minRow;
if(minRow>rows/2)
{
minRow=rows-maxRow;
maxRow=rows-minRow;
}
else
{
if(maxRow>rows/2)
{
maxRow=rows/2;
minRow=rows/2-distRow;
}
}
}