Submission #5031820
Source Code Expand
n,a,b = map(int,input().split()) h = [] for i in range(n): h.append(int(input())) hc = [0]*n st,ed = 0,10**9+1 while st<ed-1: mid = (st+ed)//2 #print(mid) tmp = 0 for i in range(n): hc[i]=h[i]-mid*b for i in range(n): tmp+=(hc[i]//(a-b))+(hc[i]%(a-b)>0) if tmp<=mid: ed = mid else: st = mid print(ed)
Submission Info
Submission Time | |
---|---|
Task | D - Widespread |
User | Ruloch |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 387 Byte |
Status | TLE |
Exec Time | 2105 ms |
Memory | 11044 KB |
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 | 18 ms | 3064 KB |
a02 | AC | 17 ms | 3064 KB |
a03 | AC | 17 ms | 3064 KB |
b04 | AC | 17 ms | 3064 KB |
b05 | TLE | 2104 ms | 11036 KB |
b06 | AC | 1902 ms | 11036 KB |
b07 | TLE | 2105 ms | 11036 KB |
b08 | TLE | 2100 ms | 11032 KB |
b09 | TLE | 2033 ms | 11036 KB |
b10 | TLE | 2105 ms | 11044 KB |
b11 | TLE | 2105 ms | 11036 KB |
b12 | TLE | 2105 ms | 11036 KB |
b13 | TLE | 2038 ms | 11036 KB |