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
bfd3e10c
Commit
bfd3e10c
authored
Jul 17, 2019
by
Kento HASEGAWA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add support for a real solver in /solvers/
parent
604f39e7
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
2 deletions
+7
-2
.gitignore
.gitignore
+1
-1
host.py
roles/host.py
+1
-0
hsgw
solvers/hsgw
+1
-1
data.py
utils/data.py
+4
-0
No files found.
.gitignore
View file @
bfd3e10c
### https://raw.github.com/github/gitignore/9d7ff09c7d38dce9ef03e7ea4dc908a622546757/Python.gitignore
### https://raw.github.com/github/gitignore/9d7ff09c7d38dce9ef03e7ea4dc908a622546757/Python.gitignore
# Project-specific files
# Project-specific files
/conf.json
/conf
*
.json
/problems/*
/problems/*
!/problems/.gitkeep
!/problems/.gitkeep
/solutions/*
/solutions/*
...
...
roles/host.py
View file @
bfd3e10c
...
@@ -84,6 +84,7 @@ class Host(object):
...
@@ -84,6 +84,7 @@ class Host(object):
if
problem_key
in
self
.
problems
:
if
problem_key
in
self
.
problems
:
self
.
problems
[
problem_key
]
.
put_solution
(
solution
)
self
.
problems
[
problem_key
]
.
put_solution
(
solution
)
print
(
solution
[
'solution'
])
return
{
'status'
:
'registered'
}
return
{
'status'
:
'registered'
}
else
:
else
:
return
{
'status'
:
'error'
}
return
{
'status'
:
'error'
}
...
...
hsgw
@
0098cc9c
Subproject commit
b306364dc696270165a9c67921720e4c6acf6866
Subproject commit
0098cc9c1932bd192f6a5fe066d9aea7960e5400
utils/data.py
View file @
bfd3e10c
...
@@ -11,6 +11,7 @@ class Problem(object):
...
@@ -11,6 +11,7 @@ class Problem(object):
self
.
name
=
''
self
.
name
=
''
self
.
size
=
(
0
,
0
)
self
.
size
=
(
0
,
0
)
self
.
block_num
=
0
self
.
block_num
=
0
self
.
problem
=
''
self
.
status
=
'Ready'
self
.
status
=
'Ready'
self
.
solutions
=
dict
()
self
.
solutions
=
dict
()
...
@@ -23,6 +24,7 @@ class Problem(object):
...
@@ -23,6 +24,7 @@ class Problem(object):
def
_load_problem
(
self
,
path
):
def
_load_problem
(
self
,
path
):
with
open
(
path
,
'r'
)
as
fp
:
with
open
(
path
,
'r'
)
as
fp
:
q_text
=
fp
.
read
()
q_lines
=
fp
.
readlines
()
q_lines
=
fp
.
readlines
()
board_size
=
[
0
,
0
]
board_size
=
[
0
,
0
]
...
@@ -40,6 +42,7 @@ class Problem(object):
...
@@ -40,6 +42,7 @@ class Problem(object):
self
.
size
=
board_size
self
.
size
=
board_size
self
.
block_num
=
block_num
self
.
block_num
=
block_num
self
.
name
=
name
self
.
name
=
name
self
.
problem
=
q_text
self
.
status
=
'Ready'
self
.
status
=
'Ready'
def
get_dict
(
self
):
def
get_dict
(
self
):
...
@@ -48,6 +51,7 @@ class Problem(object):
...
@@ -48,6 +51,7 @@ class Problem(object):
'size'
:
self
.
size
,
'size'
:
self
.
size
,
'size_str'
:
self
.
size_str
,
'size_str'
:
self
.
size_str
,
'block_num'
:
self
.
block_num
,
'block_num'
:
self
.
block_num
,
'problem'
:
self
.
problem
,
'status'
:
self
.
status
'status'
:
self
.
status
}
}
...
...
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