Submission #3225928
Source Code Expand
def damage(arr, dam_a, dam_b, index) arr.length.times do |i| arr[i] -= dam_b end arr[index] -= dam_a - dam_b end n, a, b = gets.split.map &:to_i h = Array.new(n) n.times {|i| h[i] = gets.to_i} ans = 0 while h.max > 0 damage(h, a, b, h.index(h.max)) ans+= 1 end p ans
Submission Info
Submission Time | |
---|---|
Task | D - Widespread |
User | ne270235 |
Language | Ruby (2.3.3) |
Score | 0 |
Code Size | 302 Byte |
Status | TLE |
Exec Time | 2107 ms |
Memory | 2812 KB |
Compile Error
./Main.rb:8: warning: `&' interpreted as argument prefix
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | a01, a02, a03 |
All | a01, a02, a03, b04, b05, b06, b07, b08, b09, b10, b11, b12, b13 |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
a01 | AC | 7 ms | 1788 KB |
a02 | AC | 7 ms | 1788 KB |
a03 | TLE | 2107 ms | 1788 KB |
b04 | AC | 7 ms | 1788 KB |
b05 | AC | 100 ms | 2812 KB |
b06 | TLE | 2107 ms | 2812 KB |
b07 | TLE | 2107 ms | 2812 KB |
b08 | TLE | 2107 ms | 2812 KB |
b09 | TLE | 2107 ms | 2812 KB |
b10 | TLE | 2107 ms | 2812 KB |
b11 | TLE | 2107 ms | 2812 KB |
b12 | TLE | 2107 ms | 2812 KB |
b13 | TLE | 2107 ms | 2812 KB |