Submission #3600072
Source Code Expand
n,a,b=map(int, input().split()) h=[int(input()) for i in range(n)] r,l,c=0,10**9,10**9 while r<l-1: c=r-((r-l)//2) h2=[i-b*c for i in h] h2=[i for i in h2 if i>0] count=0 for i in h2: count+=-(-i//(a-b)) if count<l:l=c else:r=c print(c+1)
Submission Info
Submission Time | |
---|---|
Task | D - Widespread |
User | chun1182 |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 286 Byte |
Status | WA |
Exec Time | 1138 ms |
Memory | 15652 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 | 3060 KB |
a02 | AC | 17 ms | 3064 KB |
a03 | AC | 18 ms | 3064 KB |
b04 | WA | 17 ms | 3064 KB |
b05 | AC | 592 ms | 11036 KB |
b06 | WA | 1138 ms | 14972 KB |
b07 | WA | 908 ms | 15652 KB |
b08 | WA | 915 ms | 14884 KB |
b09 | AC | 546 ms | 12820 KB |
b10 | AC | 547 ms | 11040 KB |
b11 | AC | 549 ms | 11352 KB |
b12 | AC | 569 ms | 12856 KB |
b13 | WA | 1016 ms | 14812 KB |