Submission #3603363
Source Code Expand
h,w=map(int,input().split()) s=[] for i in range(1,h): a=max(i*w,(h-i)*(w//2)) b=min(i*w,(h-i)*(w//2)) s.append(abs(a-b)) a=max(i*w,w*(h-i)//2) b=min(i*w,w*(h-i)//2) s.append(abs(a-b)) for j in range(1,w): a=max(h*j,(h//2)*(w-j)) b=min(h*j,(h//2)*(w-j)) s.append(abs(a-b)) a=max(h*j,h*(w-j)//2) b=min(h*j,h*(w-j)//2) print(min(s))
Submission Info
Submission Time | |
---|---|
Task | C - Chocolate Bar |
User | shel |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 389 Byte |
Status | WA |
Exec Time | 448 ms |
Memory | 14964 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 400 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt, 0_04.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 0_03.txt, 0_04.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt, 1_12.txt, 1_13.txt, 1_14.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 18 ms | 3064 KB |
0_01.txt | WA | 19 ms | 3064 KB |
0_02.txt | WA | 19 ms | 3064 KB |
0_03.txt | AC | 231 ms | 11032 KB |
0_04.txt | AC | 448 ms | 14964 KB |
1_00.txt | AC | 19 ms | 3064 KB |
1_01.txt | AC | 225 ms | 7016 KB |
1_02.txt | AC | 174 ms | 7288 KB |
1_03.txt | AC | 218 ms | 8752 KB |
1_04.txt | WA | 146 ms | 6420 KB |
1_05.txt | AC | 255 ms | 9884 KB |
1_06.txt | AC | 379 ms | 13704 KB |
1_07.txt | AC | 216 ms | 8260 KB |
1_08.txt | AC | 222 ms | 8636 KB |
1_09.txt | WA | 276 ms | 11164 KB |
1_10.txt | WA | 352 ms | 12228 KB |
1_11.txt | AC | 154 ms | 6408 KB |
1_12.txt | AC | 334 ms | 12472 KB |
1_13.txt | AC | 232 ms | 9540 KB |
1_14.txt | AC | 137 ms | 6184 KB |