Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model solution for minContainingHexagon in lesson8.task1 is incorrect #89

Open
AbdullinAM opened this issue Oct 16, 2019 · 3 comments
Open
Assignees

Comments

@AbdullinAM
Copy link
Contributor

Some test cases:

val pts = "-557.-557, 617.-557, -558.-999, -107.-965, -1000.-483, -557.-1000, -557.-558".split(", ").map {
    val (first, second) = it.split(".")
    HexPoint(first.toInt(), second.toInt())
}.toTypedArray()

Model solution gives a hexagon with radius 1030. But in fact there is possible to build a hexagon with radius 809 and center (-556.-192), that will satisfy the task condition.

More examples:

[-741.-558, 465.-329, 520.-1000, 347.-1000, -433.-557, -668.-558, 20.-57, -558.591, -74.-558, -999.-557, 455.-286, -558.-1000, -81.-557, -595.-557, -557.-153, -557.523]
Best solution r=890, model solution r=925

[-557.-557, -266.-1000, -518.-1000, -999.-999, -999.-325, -1000.582]
Best solution r=791, model solution r=916
@AbdullinAM AbdullinAM added this to the 2019.2 milestone Oct 16, 2019
@mglukhikh mglukhikh self-assigned this Oct 31, 2019
@mglukhikh
Copy link
Collaborator

Will try to investigate and solve the problem till 15 November :(

@mglukhikh
Copy link
Collaborator

Some critical issues fixed (not all of them). Now student solution passes test if its radius is the same or less than given in model solution.

@mglukhikh
Copy link
Collaborator

At this moment first and third examples are fixed. Second is still wrong, and we still have sub-optimal solution only.

@mglukhikh mglukhikh modified the milestones: 2019.2, 2020 Nov 27, 2019
@mglukhikh mglukhikh removed this from the 2020 milestone Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants