problem_id stringclasses 100
values | submission_id stringlengths 10 10 | status stringclasses 2
values | code stringlengths 6 806 |
|---|---|---|---|
p03001 | s760107539 | Wrong Answer | W, H, x, y = map(int, input().split())
S = W * H
sita = S * (y / H)
ue = S - sita
hidari = S * (x / W)
migi = S - hidari
all_S = [sita, hidari, ue, migi]
min_S = min(all_S)
all_S.remove(min_S)
print(min_S, end=' ')
print(int(bool(all_S.count(min_S)))) |
p03001 | s807600067 | Wrong Answer | w, h, x, y = map(int, input().split())
flag = 0
if x == w//2 and y == h//2:
flag = 1
print(w*h/2, flag)
|
p03001 | s256907397 | Wrong Answer | W,H,x,y = list(map(int, input().split()))
def ans(a, b, c, d):
if (c == a / 2) and (b == b / 2):
return 0
else:
return 1
print(W * H / 2,ans(W, H, x, y)) |
p03001 | s617678528 | Wrong Answer | W, H, x, y = map(int, input().split())
if x == (W // 2) and y == (H//2):
print(H * (W // 2), 1)
elif 0 < x < W:
mini1 = min(H * x, H * (W - x))
mini2 = min(y * W, (H - y) * W)
print(max(mini1,mini2), 0)
else:
if 0 < y < H:
print(min(y * W, (H - y) * W), 0)
else:
pri... |
p03001 | s176880877 | Wrong Answer | w,h,x,y = map(int, input().split())
ans = 0.000000000
ans = ans + max(min(x/w, (w-x)/w), min(y/h,(h-y)/h))
print(ans*w*h, end=" ")
if min(x/w, (w-x)/w)==min(y/h,(h-y)/h):
print(1)
else:
print(0) |
p03001 | s618533508 | Wrong Answer | W,H,X,Y=map(int,input().split())
ans2=0
if W==H:
ans2=1
ans1=max(min(X*H,(W-X)*H),min(W*Y,W*(H-Y)))
print(ans1,ans2) |
p03001 | s846625542 | Wrong Answer | W, H, x, y = map(int, input().split())
menseki = W*H
mensekix = min(x, W-x) * H
mensekiy = W * min(y, H-y)
ans1 = max(mensekix, mensekiy)
if mensekix == mensekiy:
ans2 = 1
else:
ans2 = 0
print(ans1, ans2)
|
p03001 | s635119214 | Wrong Answer | W,H,x,y=map(int,open(0).read().split())
all=W*H
A1=x*H
A2=all-A1
B1=W*y
B2=all-B1
minA=min(A1,A2)
minB=min(B1,B2)
if minA==minB:
print(minA,1)
else:
print(max(minA,minB),0) |
p03001 | s354430549 | Wrong Answer | W, H, x, y = [int(x) for x in input().split()]
max_value = -1
# x軸と平行な直線で区切る場合
max_value = max(max_value, min((W-x)*H, x*H))
# y軸に平行な直線で区切る場合
max_value = max(max_value, min(W*(H-y), W*y))
flg = W-x == x and H-y == y
print(max_value, 1 if flg else 0) |
p03001 | s465033689 | Wrong Answer | W,H,x,y = map(int, input().split())
answer = 1/2*W*H
print(answer) |
p03001 | s308971221 | Wrong Answer | import sys
input=sys.stdin.buffer.readline
import os
from math import*
w,h,x,y=map(int,input().split())
area=w*h
ans1=min((w*y),(area-(w*y)))
ans2=min((x*h),(area-(x*h)))
if ans1==ans2:
print(ans1,1)
else:
print(max(ans1,ans2),0) |
p03001 | s283092728 | Wrong Answer | from decimal import *
W, H, x, y = list(map(int, input().split()))
print("{:.5f}".format(Decimal(W) * Decimal(H) / Decimal(2)), 1 if x == W//2 and y == H//2 else 0) |
p03001 | s420057106 | Wrong Answer |
W,H,x,y = map(int,input().split())
if (x != W/2 and y != H/2) and(((x == 0 or x == W) and (y == 0 or y == H)) or (x == W/2 or y == H/2 or y == -(H*x/W)+H or y == (H*x)/W)):
print(W*H/2,0)
else:
print(W*H/2,1) |
p03001 | s185245299 | Wrong Answer | W, H, u, v = map(int, input().split())
if u <= W / 2:
areaX = H * u
else:
areaX = H * (W - u)
if v <= H / 2:
areaY = W * v
else:
areaY = W * (H - v)
e = 10 ** (-8)
ans = []
if areaX - areaY < e:
ans.append(areaX)
ans.append(1)
elif areaX < areaY:
ans.append(areaY)
ans.append(0)
else:
... |
p03001 | s493502643 | Wrong Answer | w,h,x,y = map(int,input().split())
tmp1 = abs(w-x)
tmp2 = abs(h-y)
ans = w*h/2
if w == x/2 and h == y/2:
print(ans,1)
else:
print(ans,0) |
p03001 | s365839161 | Wrong Answer | W,H,w,h = map(float, input().split())
ans =0
if w/W+h/H == 1:
ans =1
elif w/W == h/H:
ans =1
ls =[float(w*h/2), ans]
print(*ls) |
p03001 | s537735103 | Wrong Answer | w,h,x,y = map(int, input().split())
ans = max(min(x/w, (w-x)/w), min(y/h,(h-y)/h))
print(ans*w*h, end=" ")
if min(x/w, (w-x)/w)==min(y/h,(h-y)/h):
print(1)
else:
print(0) |
p03001 | s447263276 | Wrong Answer | w,h,x,y = map(int,input().split())
s1 = w*y
s2 = w*(h-y)
s3 = h*x
s4 = h*(w-x)
if s1 > s2:
s5 = s2
else:
s5 = s1
if s3 > s4:
s6 = s4
else:
s6 = s3
if s6 > s5:
print(float(s5),' 0')
elif s6 < s5:
print(float(s5),' 0')
else:
print(float(s6),' 1') |
p03001 | s665426990 | Wrong Answer | W,H,x,y = map(int,input().split())
if x == W//2 and y == H//2:
res = 1
else:
res = 0
print(W*H/2,res) |
p03001 | s377105794 | Wrong Answer | w,h,x,y = map(int,input().split())
area = (w*h/2)
c = 0
if (x == w//2) and (y == h//2):
c = 1
print(area,c) |
p03001 | s484410170 | Wrong Answer | W,H,w,h = map(float, input().split())
ans =0
if w/W+h/H == 1:
ans =1
elif w/W == h/H:
ans =1
ls =[float(w*h/2), ' ', ans]
print(*ls) |
p03001 | s075666320 | Wrong Answer | w, h, x, y = map(int, input().split())
a = min((w-x)*h, x*h)
b = min(w*(h-y), w*y)
if x == 0 and y == 0 or x == 0 and y == h or x == w and y == 0 or x == w and y == h:
print(w*h/2, 1)
else:
print(max(a, b), 1 if a == b else 0)
|
p03001 | s868573848 | Wrong Answer | w, h, x, y = [int(i) for i in input().split()]
print(w * h / 2, int(x == (w // 2) or y == (h // 2))) |
p03001 | s802818196 | Wrong Answer | w, h, x, y = map(int, input().split())
menseki1 = min(w - x, x) * h
menseki2 = min(h - y, y) * w
hantei = menseki1 == menseki2
print(max(menseki1, menseki2), int(hantei))
|
p03001 | s826163100 | Wrong Answer | w,h,x,y = map(float, input().split())
s1 = []
s1.append(x*h)
s1.append((w-x)*h)
s2 = []
s2.append(w*y)
s2.append(w*(h-y))
s1.sort()
s2.sort()
if s1[0] > s2[0]:
print("{} {}".format(s1[0], 0 if s1[0]==s1[1] else 1))
else:
print("{} {}".format(s2[0], 0 if s2[0]==s2[1] else 1))
|
p03001 | s611216113 | Wrong Answer | W, H, x, y = map(int, input().split())
ans1 = min(x * H, (W - x) * H)
ans2 = min(W * y, W * (H - y))
ans3 = 0
if W / 2 == x and H / 2 == y:
ans3 = (1/2) * (W * H)
if ans1 == ans2:
print("{} {}".format(ans1, 1))
else:
print("{} {}".format(max(ans1, ans2, ans3),0)) |
p03001 | s131624284 | Wrong Answer | # coding: utf-8
def solve(W, H, x, y):
mw, mh = W // 2, H // 2
return f'{W * H / 2} {int((x, y) == (mw, mh))}'
if __name__ == '__main__':
print(solve(*map(int, input().split()))) |
p03001 | s161573508 | Wrong Answer |
def solve():
gx,gy = False, False
if W/2 == x:
gx = True
if H/2 == y:
gy = True
A1 = min(x*H, (W-x)*H)
A2 = min(x*y, x*(H-y))
# print(A1)
ans = max(A1, A2)
# print(gx,gy)
if gx and gy:
print(ans, 1)
else:
print(ans, 0)
if __name__ == "__main_... |
p03001 | s856201285 | Wrong Answer |
def solve():
gx,gy = False, False
if W/2 == x:
gx = True
if H/2 == y:
gy = True
A1 = min(x*H, (W-x)*H)
A2 = min(x*y, x*(H-y))
# print(A1)
ans = max(A1, A2)
# print(gx,gy)
if gx and gy:
print(ans, 1)
else:
print(ans, 0)
if __name__ == "__main_... |
p03001 | s103556263 | Wrong Answer | # でつoO(YOU PLAY WITH THE CARDS YOU'RE DEALT..)
import sys
def main(W, H, x, y):
print(W * H / 2, 1 if x == W // 2 and y == H // 2 else 0)
if __name__ == '__main__':
input = sys.stdin.readline
W, H, x, y = map(int, input().split())
main(W, H, x, y)
|
p03001 | s038371896 | Wrong Answer | W, H, x, y = map(int, input().split())
S = W * H
sx = min(W-x, x-0) * H
sy = min(H-y, y-0) * W
print(max(sx, sy), int(sx == sy)) |
p03001 | s592485585 | Wrong Answer | w, h, x, y = map(int, input().split())
ans = w*h/2
if h/2 == x and w/2 == y:
flag = 1
else:
flag = 0
print('{} {}'.format(ans, flag)) |
p03001 | s953729172 | Wrong Answer | def main():
W, H, x, y = map(int, input().split())
s1 = min(x * H, (W - x) * H)
s2 = min(W * y, W * (H - y))
#print(f's1:{s1}, s2:{s2}')
ans = max(s1, s2)
flag = 0
if W==H and ans == (W * H) // 2: flag = 1
print(ans, flag)
if __name__ == '__main__':
main() |
p03001 | s335734926 | Wrong Answer | W, H, x, y = map(int, input().split())
area = (W * H) / 2
div = 0
if W // 2 == x and H // 2 == y:
div = 1
print(area, div)
|
p03001 | s759452714 | Wrong Answer | def main():
w, h, x, y = map(int, input().split())
area = min(h * x, y * w)
area = min(w * h - area, area)
print(area, end=" ")
print(1 if 2 * x == w and 2 * y == h else 0)
if __name__ == '__main__':
main()
|
p03001 | s514929317 | Wrong Answer | W, H, x, y = map(int, input().split())
ans1 = min(x * H, (W - x) * H)
ans2 = min(W * y, W * (H - y))
if ans1 == ans2:
print("{} {}".format(ans1, 1))
else:
print("{} {}".format(max(ans1, ans2),0)) |
p03001 | s389934303 | Wrong Answer | W, H, x, y = map(int, input().split())
area1 = min(H * x, H * (W - x))
area2 = min(W * y, W * (H - y))
method = "0"
if area1 == area2 : method = "1"
ans = max(area1, area2)
print(ans, method) |
p03001 | s747579651 | Wrong Answer | W, H, x, y = map(int, input().split())
print(
max(
min(H * x, H * (W - x)),
min(y * W, (H - y) * W)
),
1 if min(H * x, H * (W - x)) == min(y * W, (H - y) * W) else 0
) |
p03001 | s000580590 | Wrong Answer | import sys, math
from collections import defaultdict, deque, Counter
from bisect import bisect_left, bisect_right
from itertools import combinations, permutations, product
from heapq import heappush, heappop
from functools import lru_cache
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input()... |
p03001 | s932945585 | Wrong Answer | w,h,x,y = map(int,input().split())
check = 0
area = w * h
max_min = max(min(x / w,(w-x)/w),min(y/h,(h-y)/h))
if min(x / w,(w-x)/w) == min(y/h,(h-y)/h):
check = 1
print(area * max_min,check)
|
p03001 | s518636156 | Wrong Answer | # AtCoder Beginner Contest 130
# C - Rectangle Cutting
W,H,x,y=map(int,input().split())
if (x,y)==(0,0) or (x,y)==(W,0) or (x,y)==(W,H) or (x,y)==(0,H):
print(W*H/2 , 0)
|
p03001 | s854540519 | Wrong Answer | W,H,x,y=map(int,input().split())
hy=W*(H-y)
by=W*y
rx=(W-x)*H
lx=x*H
arry={hy,by}
arrx={rx,lx}
miny=min(arry)
minx=min(arrx)
ans=max({miny,minx})
cnt=-1
for val in arry:
if ans==val:
cnt+=1
for val in arrx:
if ans==val:
cnt+=1
print(str(ans)+" "+str(cnt)) |
p03001 | s000525853 | Wrong Answer | w,h,x,y = map(int,input().split())
ans = w*h/2
if x == w//2 and y == h//2:
ans_2 = 1
else:
ans_2 = 0
print(ans,ans_2) |
p03001 | s204912531 | Wrong Answer | W,H,x,y = map(int,input().split())
horizontal = [W*(H-y),W*y]
vertical = [(W-x)*H, x*H]
if max(horizontal) > max(vertical):
print(min(vertical), 0)
elif max(horizontal) < max(vertical):
print(min(horizontal), 0)
else:
print(min(min(horizontal),min(vertical)), 1) |
p03001 | s717515556 | Wrong Answer | W,H,x,y = map(int,input().split())
ans = W*H
if W/2 == x and H/2 == y:
print(ans//2,1)
else:
print(ans//2,0) |
p03001 | s256009228 | Wrong Answer | W,H,x,y = map(int,input().split())
if W!=H:
print(str(W*H/2)+' '+'0')
else:
print(str(W*H/2)+' '+'1') |
p03001 | s230030862 | Wrong Answer | W, H, x, y = map(int, input().split())
area = W*H // 2
pl = x == W // 2 and y == H // 2
print(area, int(pl))
|
p03001 | s188373772 | Wrong Answer | W, H, x, y = map(int, input().split())
Wi = W * 10 ** 9
Hi = H * 10 ** 9
men = W * H / 2
judge = 0
if x == W // 2 and y == H // 2:
judge = 1
print("{0:.9f} {1:.0f}".format(men, judge)) |
p03001 | s565671080 | Wrong Answer | W,H,x,y = map(int, input().split())
print(W*H/2, 1 if W/2 == x or H/2 == y else 0) |
p03001 | s069836543 | Wrong Answer | w, h, x, y = map(int, input().split())
s1 = min(x, w-x) * h
s2 = min(y, h-y) * w
s = max(s1, s2)
if s1 == s2:
print(s, '1')
else:
print(s, '0')
|
p03001 | s740349821 | Wrong Answer | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def main():
w, h, x, y = map(int, readline().split())
a = min(h*x, h*(w-x))
b = min(w*y, w*(h-y))
print('{:.10f}'.format(max(a, b)), end=' ')
print(1) if a == b else print(0)
if __na... |
p03001 | s469153533 | Wrong Answer | W,H,x,y = map(int,input().split())
n = (W*H)//2
if W == x*2 and H == y*2:
print(n, 1)
else:
print(n, 0)
|
p03001 | s913063160 | Wrong Answer | W,H,x,y=map(int,input().split())
if x==W//2 and y==H//2:
print(W*H/2,1)
else:
print(W*H/2,0) |
p03001 | s570699107 | Wrong Answer | W, H, x, y = map(int, input().split())
print(format(W*H/2, '.9f'), 1 if (x == W//2) & (y == H//2) else 0)
|
p03001 | s943256292 | Wrong Answer | w, h, x, y = map(int, input().split())
ans1 = min(x, w - x) * h
ans2 = min(y, h - y) * w
bo = 0
if ans1 == ans2:
bo = 1
print(max(ans1, ans2), bo)
|
p03001 | s442594336 | Wrong Answer | w,h,x,y = map(int,input().split())
s1 = w*y
s2 = w*(h-y)
s3 = h*x
s4 = h*(w-x)
if s1>s2:
s5=s2
else:
s5=s1
if s3>s4:
s6=s4
else:
s6=s3
if s6>s5:
print(s6,' 0')
elif s6<s5:
print(s5,' 0')
else:
print(s6,' 1')
|
p03001 | s525102877 | Wrong Answer | W,H,x,y = map(int,input().split())
tate = H
if 2*x >= W:
tate *= W-x
else:
tate *= x
yoko = W
if 2*y >= H:
yoko *= H-y
else:
yoko *= y
if tate == yoko:
print(tate,1)
else:
print(max(tate,yoko),0) |
p03001 | s246467613 | Wrong Answer | def main():
w, h, x, y = map(int, input().split())
print(h * w // 2, end=" ")
print(1 if 2 * x == w and 2 * y == h else 0)
if __name__ == '__main__':
main()
|
p03001 | s242781765 | Wrong Answer | h,w,x,y=map(int, input().split())
print(h*w / 2, end = " ")
if(h//2 == y and w//2 == x):
print(1)
else:
print(0)
|
p03001 | s186338175 | Wrong Answer | '''
Created on 2020/08/29
@author: harurun
'''
def main():
import sys
pin=sys.stdin.readline
pout=sys.stdout.write
perr=sys.stderr.write
W,H,x,y=map(int,pin().split())
ans=max(min(x,W-x)*H,min(y,H-y))
pout(f"{ans} ")
if W-x==x and H-y==y:
print(1)
else:
print(0)
return
main() |
p03001 | s871217235 | Wrong Answer | W, H, x, y = map(int, input().split())
if W // 2 == x and H // 2 == y:
print("{} {}".format(W * H / 2, 1))
else:
print("{} {}".format(W * H / 2, 0)) |
p03001 | s941981458 | Wrong Answer | W,H,x,y = map(int,input().split())
A = min(x*H,(W-x)*H)
B = min(y*W,(H-y)*W)
if A == B:
print(A, 1)
else:
print(max(A, B)) |
p03001 | s403327444 | Wrong Answer | W, H, X, Y = map(int, input().split())
a1 = (H-Y) * W
a2 = Y * W
if a1==0 or a2==0:
a12 = 0
else:
a12 = min(a1, a2)
a3 = X * H
a4 = (W-X) * H
if a3==0 or a4==0:
a34 = 0
else:
a34 = min(a3, a4)
ans1 = max(a12, a34)
if a12==a34:
ans2=1
else:
ans2=0
print(ans1, ans2) |
p03001 | s047973942 | Wrong Answer | W,H,x,y=map(int,input().split())
m=0
m=min(W*y, H*x)
if x==W/2 and y==H/2:
print(m, 1)
else:
print(m, 0) |
p03001 | s424774602 | Wrong Answer | W, H, x, y = map(int, input().split())
print(
max(
min(H * x, H * (W - x)),
min(y * W, (H - y) * W)
),
1 if 2 * x == W and 2 * y == H else 0
) |
p03001 | s566658816 | Wrong Answer | W, H, x, y = map(int, input().split())
if W//2 == x and H//2 == y:
print('{} {}'.format((W*H)/2 ,1))
else:
print('{} {}'.format((W*H)/2, 0))
|
p03001 | s712788434 | Wrong Answer | w, h, x, y = map(int, input().split())
mirx = min((x)*h,(w-x)*h)
miry = min(w*y,w*(h-y))
if mirx == miry:
print(mirx, 1)
else:
print(max(mirx, miry), 0)
|
p03001 | s843295448 | Wrong Answer | w,h,x,y = map(int,input().split())
half = w * h / 2
check = 1
if x == (w / 2) or y == (h / 2):
check = 0
print(half, check) |
p03001 | s424947906 | Wrong Answer | w, h, x, y = list(map(int, input().split()))
#b = list(map(int, input().split()))
s = [x*h, (w-x)*h]
s2 = [w*y, w*(h-y)]
print(max(min(s), min(s2)), end=" ")
if min(s) == min(s2):
print(0)
else:
print(1)
|
p03001 | s791085898 | Wrong Answer | w, h, x, y = map(float, input().split())
if x in [0, w] or y in [0, h]:
print(0, 0)
elif x/y == w/h:
print(min(x*h, (w-x)*h), 1)
elif x/(h-y) == w/h:
print(min(x*h, (w-x)*h), 1)
else:
print(min(x*h, (w-x)*h, y*w, (h-y)*w), 0) |
p03001 | s134467274 | Wrong Answer | # -*- coding: utf-8 -*-
"""
Created on Tue May 12 00:13:44 2020
@author: shinba
"""
w,h,x,y = map(int,input().split())
a1 = h*min(w-x,x)
a2 = w*min(h-y,y)
if a1 == a2:
print(a1,1)
else:
print(max(a1,a2),0) |
p03001 | s739862255 | Wrong Answer | W,H,x,y = map(int,input().split())
flg = 0
if W/2 == x and H/2 ==y:
ans = (W*H)/2
flg = 1
elif W/2 == x or H/2 ==y:
ans = (W*H)/2
flg = 0
else:
tatemax = min(W-x,x)*H
yokomax = min(H-y,y)*W
if tatemax == yokomax:
ans = tatemax
flg =1
else:
ans = max(tatemax,yokoma... |
p03001 | s197929354 | Wrong Answer |
w,h,x,y=map(int,input().split())
ans=w*h/2.000000000
a=0
if( ((x==0 or x==w) and (0<=y and y<=h)) or ((0<=x and x<=w) and (y==0 or y==h)) ):
a=0
else:
if(((x==w/2) and (0<=y and y<=h)) or ((0<=x and x<=w) and (y==h/2))):
a=0
else:
a=1
if(x==w/2 and y==h/2):a=1
print('{:.7f}'.format(ans),a) #小数点以下3位
|
p03001 | s904838325 | Wrong Answer | w, h, x, y = map(int, input().split())
def can_split(w, h, x, y):
if x == 0 or y == 0:
return False
elif x == w and y == h:
return False
else:
return True
area1 = min(x, w - x) * h
area2 = min(y, h - y) * w
if area1 == area2 and can_split(w, h, x, y):
print(max(area1, area2)... |
p03001 | s247412344 | Wrong Answer | w,h,x,y=map(int,input().split())
ma=w*h/2
W=x//2
H=y//2
if W%2==0 and H%2==0 and W==x and H==y:
boo=1
else:
boo=0
print(ma,boo)
|
p03001 | s134380115 | Wrong Answer | w,h,x,y = map(int,input().split())
area = w*h/2
if x == w//2 and y == h//2:
print(area, 1)
else:
print(area,0)
|
p03001 | s508655312 | Wrong Answer | W, H, x, y = map(int,input().split())
if (x == 0 and y == 0) or (x == W or y == H):
print("{} {}".format(W * H /2, 0))
else:
area_H = sorted([x * H, (W - x) * H])
area_W = sorted([y * W, (H - y) * W])
area_h = area_H[0]
area_w = area_W[0]
area = sorted([area_h, area_w])
switch = int(area... |
p03001 | s552282923 | Wrong Answer | W, H, x, y = list(map(int, input().split()))
if x == W // 2 and y == H // 2:
print('{} {}'.format(W * H / 2, 1))
else:
print('{} {}'.format(W * H / 2, 0))
|
p03001 | s059347502 | Wrong Answer | W,H,x,y=map(int,input().split())
ans1=min(x,W-x)*H
ans2=W*min(y,H-y)
if ans1!=ans2:
print(min(ans1,ans2),0)
else:
print(ans1,1)
|
p03001 | s289797425 | Wrong Answer | h, w, x, y = map(int, input().split())
s = h * w / 2
p = 0
if w / 2 == x and h / 2 == y:
p = 1
print(s, p) |
p03001 | s588031668 | Wrong Answer | W, H, x, y = map(float, input().split())
f = 0
if W / 2 == x and H / 2 == y:
f = 1
if x == 0:
if y == 0:
print("{} {}".format(W*H/2, f))
elif y == H:
print("{} {}".format(W*H/2, f))
else:
print("{} {}".format(min(y, H-y)*W, f))
elif y/x == H/W or y == -(H/W)*x + H:
print("{... |
p03001 | s515660925 | Wrong Answer | w,h,x,y = map(int,input().split())
#必ず半分にできる…とはいえるのか?多分いえる。
#長方形の重心を通るようにひけばok.
ans = w*h/2
if x*2==w or y*2==h:
print(ans, 1)
else:
print(ans, 0)
|
p03001 | s820491476 | Wrong Answer | # coding: utf-8
def solve(W, H, x, y):
s1 = x * H if x <= W // 2 else (W - x) * H
s2 = y * W if y <= H // 2 else (H - y) * W
return f'{max(s1, s2)} {int(s1 == s2)}'
if __name__ == '__main__':
print(solve(*map(int, input().split()))) |
p03001 | s906429165 | Wrong Answer | w,h,x,y = map(int,input().split())
jud = 0
if x == w//2 and y == h//2:
jud = 1
print(w*h/2,jud)
|
p03001 | s875501413 | Wrong Answer | W,H,x,y = map(int, input().split())
if x==y==0 or (x==W and y==0) or (x==0 and y==H) or (x==W and y==H):
print(W*H/2, 0)
exit()
X = min(x, W-x) * H
Y = min(y, H-y) * W
ans = 0
if X == Y: ans = 1
print(max(X, y), ans) |
p03001 | s819061967 | Wrong Answer | W, H, x, y = map(int, raw_input().split())
A = min(W * y, W * (H - y))
B = min(H * x, H * (W - x))
E = 1 if A == B else 0
print max(A, B), E |
p03001 | s640511498 | Wrong Answer | w,h,x,y = map(int, input().split())
print(w*h/2, '1' if x==w/2 or y==h/2 else '0') |
p03001 | s191310435 | Wrong Answer | w, h, x, y = map(int, input().split())
scale = w * h
if x > w / 2:
new_x = w - x
else:
new_x = x
if y > h / 2:
new_y = h - y
else:
new_y = y
x_scale = float(new_x * h)
y_scale = float(new_y * w)
if x_scale == y_scale:
print('{0:.9f} 1'.format(x_scale))
else:
print('{0:.9f} 0'.format(max(x_scale, y_sca... |
p03001 | s523840387 | Wrong Answer | W,H,x,y = map(int, input().split())
a,b = min(x*H,(W-x)*H),min(y*W,(H-y)*W)
print(max(a,b), 1 if x == y or (W-x) == y or (H-y) == x else 0) |
p03001 | s457314630 | Wrong Answer | W,H,x,y = map(int,input().split())
#print(W,H,x,y)
if x == W/2 and y == H/2:
area = "{0:.6f}".format(float(x*H))
print(area,1)
else:
area ="{0:.6f}".format(float(min((W-x)*H,x*H)))
print(area,0) |
p03001 | s778316101 | Wrong Answer | def main():
w, h, x, y = map(int, input().split())
area = 0
if x not in [0, w]:
area = max(area, min(h * x, w * h - h * x))
if y not in [0, h]:
area = max(area, min(y * w, w * h - y * w))
print(area, end=" ")
print(1 if 2 * x == w and 2 * y == h else 0)
if __name__ == '__main__... |
p03001 | s630377714 | Wrong Answer | w,h,x,y=map(int,input().split())
if w/2==x and h/2==y:k=1
elif w/2==x or h/2==y:k=0
else:k=1
print(w*h/2,k) |
p03001 | s141653860 | Wrong Answer | W, H, x, y = list(map(int,input().split()))
y_min = min(W*y, W*(H-y))
x_min = min(H*x, H*(W-x))
if y_min == x_min:
ans = 1
else:
ans = 0
print(max(x_min, y_min), ans) |
p03001 | s542381862 | Wrong Answer | W,H,x,y = map(int, input().split())
if (x == int(W/2)) and (y == int(H/2)):
print((W*H)/2,"1")
else:
print((W*H)/2,"0") |
p03001 | s772091794 | Wrong Answer | W,H,x,y = map(int,input().split())
a_1 = (W - x) * H
a_2 = x * H
b_1 = W * (H - y)
b_2 = W * y
if a_1 < a_2:
a = a_1
else:
a = a_2
if b_1 < b_2:
b = b_1
else:
b = b_2
if a > b:
print(str(a) + ' 0')
elif b > a:
print(str(b) + ' 0')
else:
print(str(b) + ' 1') |
p03001 | s281813199 | Wrong Answer | w,h,x,y = map(int, input().split())
if w//2 == x and h//2 == y: print((w*h)/2, 1)
else: print((w*h)/2, 0) |
p03001 | s690263523 | Wrong Answer | from collections import Counter
from collections import defaultdict
from collections import deque
import math
import itertools
import heapq
import numpy as np
import sys
sys.setrecursionlimit(10**6)
#n=int(input())
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
input_list = lambda : list(map(in... |
p03001 | s036888322 | Wrong Answer | W, H, x, y = map(int, input().split())
print(W*H/2, end=' ')
print(1 if (x==W//2 and y==H//2) else 0) |
p03001 | s061472529 | Wrong Answer | W, H, x, y = map(int, input().split())
is_center = x * 2 == W and y * 2 == H
min_square = W * H / 2
print(min_square, is_center) |
p03001 | s952163812 | Wrong Answer | w,h,x,y = map(int,input().split())
print(w*h/2,1 if x == w//2 and y == h//2 else 0) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.