Submission #1387462
Source Code Expand
# -*- coding: utf-8 -*- import math import sys import itertools import numpy as np h, w = map(int, input().split()) m = math.inf m = min(m, (1 if h % 3 else 0) * w) m = min(m, (1 if w % 3 else 0) * h) for _ in range(2): for i in range(1, h+1): v = np.array([i*w, w//2*(h-i), (w-w//2)*(h-i)]) m = min(m, max(v) - min(v)) h, w = w, h print(m)
Submission Info
Submission Time | |
---|---|
Task | C - Chocolate Bar |
User | hamko |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 384 Byte |
Status | RE |
Exec Time | 163 ms |
Memory | 13088 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 | RE | 163 ms | 13088 KB |
0_01.txt | RE | 148 ms | 12384 KB |
0_02.txt | RE | 147 ms | 12384 KB |
0_03.txt | RE | 148 ms | 12508 KB |
0_04.txt | RE | 149 ms | 12384 KB |
1_00.txt | RE | 147 ms | 12384 KB |
1_01.txt | RE | 148 ms | 12384 KB |
1_02.txt | RE | 149 ms | 12384 KB |
1_03.txt | RE | 147 ms | 12384 KB |
1_04.txt | RE | 151 ms | 12384 KB |
1_05.txt | RE | 147 ms | 12384 KB |
1_06.txt | RE | 148 ms | 12384 KB |
1_07.txt | RE | 148 ms | 12384 KB |
1_08.txt | RE | 148 ms | 12508 KB |
1_09.txt | RE | 148 ms | 12512 KB |
1_10.txt | RE | 148 ms | 12384 KB |
1_11.txt | RE | 149 ms | 12384 KB |
1_12.txt | RE | 149 ms | 12384 KB |
1_13.txt | RE | 148 ms | 12384 KB |
1_14.txt | RE | 148 ms | 12384 KB |