Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
adc2019-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
adc2019
adc2019-system
Commits
fdafebe1
Commit
fdafebe1
authored
Aug 23, 2019
by
Kento HASEGAWA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a bug in the board size of a split group
parent
12515c87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
data.py
utils/data.py
+3
-2
No files found.
utils/data.py
View file @
fdafebe1
...
@@ -116,8 +116,9 @@ class Problem(object):
...
@@ -116,8 +116,9 @@ class Problem(object):
block_text
+=
'
\n
'
block_text
+=
'
\n
'
# board_xy = math.ceil(2 * math.sqrt(num_tiles))
# board_xy = math.ceil(2 * math.sqrt(num_tiles))
board_xy
=
math
.
ceil
(
3
*
math
.
sqrt
(
num_tiles
))
group_x
=
min
(
math
.
ceil
(
3
*
math
.
sqrt
(
num_tiles
)),
self
.
size
[
0
])
problem_text
+=
f
'SIZE {board_xy}X{board_xy}
\n
'
group_y
=
min
(
math
.
ceil
(
3
*
math
.
sqrt
(
num_tiles
)),
self
.
size
[
1
])
problem_text
+=
f
'SIZE {group_x}X{group_y}
\n
'
problem_text
+=
f
'BLOCK_NUM {len(g)}
\n
'
problem_text
+=
f
'BLOCK_NUM {len(g)}
\n
'
problem_text
+=
'
\n
'
problem_text
+=
'
\n
'
problem_text
+=
block_text
problem_text
+=
block_text
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment