AtCoder Beginner Contest 062

Submission #1387462

Source codeソースコード

# -*- 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

Task問題 C - Chocolate Bar
User nameユーザ名 はむこ
Created time投稿日時
Language言語 Python3 (3.4.3)
Status状態 RE
Score得点 0
Source lengthソースコード長 384 Byte
File nameファイル名
Exec time実行時間 ms
Memory usageメモリ使用量 -

Test case

Set

Set name Score得点 / Max score Cases
Sample - 0_00.txt,0_01.txt,0_02.txt,0_03.txt,0_04.txt
All 0 / 400 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

Test case

Case name Status状態 Exec time実行時間 Memory usageメモリ使用量
0_00.txt RE
0_01.txt RE
0_02.txt RE
0_03.txt RE
0_04.txt RE
1_00.txt RE
1_01.txt RE
1_02.txt RE
1_03.txt RE
1_04.txt RE
1_05.txt RE
1_06.txt RE
1_07.txt RE
1_08.txt RE
1_09.txt RE
1_10.txt RE
1_11.txt RE
1_12.txt RE
1_13.txt RE
1_14.txt RE