Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cbc201 commit 49a1d8fCopy full SHA for 49a1d8f
2018/07_2/ruby/leovano.rb
@@ -1,5 +1,6 @@
1
# frozen_string_literal: true
2
3
+raise "Arg1" if ARGV[0].nil?
4
input = File.readlines(ARGV[0])
5
6
RULE = /^Step ([a-zA-Z]+) .* step ([a-zA-Z]+) can begin.$/.freeze
@@ -33,7 +34,7 @@
33
34
workers.map! { |worker, secs| [worker, secs - min] }
35
36
workers.select { |it| it[1].zero? }.each do |worker|
- workers.slice!(workers.index(worker))
37
+ workers.slice! workers.index worker
38
steps_done << worker[0]
39
steps_current += dependents[worker[0]]
40
end
0 commit comments