Day 15.
This commit is contained in:
@@ -51,7 +51,7 @@ p=9,5 v=-3,-3
|
||||
2) px == w/2, py > w/2 % h
|
||||
*/
|
||||
val z = Array(robots.size) { IntArray(4) }
|
||||
for (t in 1..1000000000L) {
|
||||
for (t in 1..w * h) {
|
||||
/*val good = robots.all {
|
||||
val x = ((it[0] + t * (it[2] + w)) % w).toInt()
|
||||
val y = ((it[1] + t * (it[3] + h)) % h).toInt()
|
||||
@@ -68,7 +68,7 @@ p=9,5 v=-3,-3
|
||||
z.forEach { grid[it[0], it[1]] = '*' }
|
||||
grid.debug()
|
||||
println()
|
||||
break
|
||||
return t
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user