problem_id stringclasses 100
values | submission_id stringlengths 10 10 | status stringclasses 2
values | code stringlengths 6 806 |
|---|---|---|---|
p03001 | s048953472 | Wrong Answer | w,h,x,y=map(int,input().split())
if x==w or x==0:
if y==h or y==0:
print(0,"1")
else:
w2=w//2
h2=h//2
s1=int(h*w2)
s2=int(w*h2)
if s1>s2:
print(s1,"0")
elif s1==s2:
print(s1,"1")
else:
print(s2,"0")
|
p03001 | s881785444 | Wrong Answer | W,H,x,y=map(int,open(0).read().split())
all=W*H
if W//2 ==x and H//2==y:
print(all/2,1)
else:
print(max(W*y,H*x),0) |
p03001 | s663080470 | Wrong Answer | w, h, x, y = map(int, input().split())
are_w = min(w*y, w*(h-y))
are_h = min(x*h, (w-x)*h)
ans_are = max(are_w, are_h)
ans = 0
if are_w == are_h:
ans = 1
if x == w and y == h:
ans_are = w*h/2
ans = 0
if x == 0 and y == 0:
ans_are = w*h/2
ans = 0
if x == 0 and y == h:
ans_are = w*h/2
ans... |
p03001 | s383434313 | Wrong Answer | W,H,x,y = map(int,input().split())
ans = min(x*H, (W-x)*H, y*W, (W-y)*W)
if ans % W and ans % H:
print(ans,0)
else:
print(ans,1) |
p03001 | s355642163 | 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)
if x==0:
print((H-y)*W,0)
if y==0:
print((W-x)*H,0) |
p03001 | s103567169 | Wrong Answer | W,H,x,y=map(int,input().split())
tall1=x*H
tall2=(W-x)*H
wide1=y*W
wide2=(H-y)*W
if 2*x==W and 2*y==H:
print(x*H,1)
else:
if tall1>tall2:
t=tall2
else:
t=tall1
if wide1>wide2:
w=wide2
else:
w=wide1
if w<t:
print(t,0)
else:
print(w,0)
|
p03001 | s070391584 | Wrong Answer | import sys
W,H,x,y = map(int, input().split())
ans = W * H // 2
if W / 2 == x and H / 2 == y:
print("{} {}".format(ans, 1))
else:
print("{} {}".format(ans, 0)) |
p03001 | s585840508 | 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 | s329289199 | Wrong Answer | W,H,x,y = map(int,input().split())
S = (W*H)/2
if x == W//2 and y == H//2:
print(S,1)
else:
print(S,0) |
p03001 | s466446929 | Wrong Answer | w, h, x, y = map(int,input().split())
sq1 = w*(h-y)
sq2 = w*y
sq3 = (w-x)*h
sq4 = x*h
sq12 = min(sq1,sq2)
if(sq1==0 or sq2==0):
sq12 = max(sq1,sq2)
sq34 = min(sq3,sq4)
if(sq3==0 or sq4==0):
sq34 = max(sq3,sq3)
jd = 0
if (sq12 == sq34):
jd = 1
print(str(max(sq12,sq34))+" "+str(jd))
|
p03001 | s883450097 | Wrong Answer | W, H, x, y = map(int,input().split())
print("{0} {1}".format(W*H/2, (int)(x==W//2 and y==H//2))) |
p03001 | s376799460 | Wrong Answer | w, h , x, y = map(int, input().split())
if w != h:
num_split = 0
if x > y:
maxarea_small = w * y
else:
maxarea_small = h * x
else:
if x > y:
num_split = 0
maxarea_small = w * y
elif x < y:
num_split = 0
maxarea_small = h * x
els... |
p03001 | s699860906 | Wrong Answer | w,h,x,y=map(int,input().split())
ans1=w*h/2
if w//2==x and h//2==y:
ans2=1
else:
ans2=0
print('{} {}'.format(ans1,ans2)) |
p03001 | s277661279 | Wrong Answer | w,h,x,y=map(int,input().split())
print(str(w*h//2)+' '+str(1*(w==2*x and h==2*y))) |
p03001 | s447854545 | Wrong Answer | W,H,x,y = map(float,input().split(" "))
WH = W*H
w = (W-x)*H
h = (H-y)*W
if (WH-w)<w:
w = (WH-w)
if (WH-h)<h:
h = (WH-h)
if w>h:
print("{} ".format(w),end="")
else:
print("{} ".format(h),end="")
if W==h:
print("1") |
p03001 | s483412047 | Wrong Answer | W, H, x, y = map(int, input().split())
FLAG = 0
if (W//2 == x and H//2 == y):
FLAG = 1
answer = (W / 2) * H
print(answer, FLAG) |
p03001 | s469996230 | Wrong Answer | W, H, x, y = map(int, input().split())
area1 = W*y
area2 = H*x
print(area1 if area1 < area2 else area2, end='')
print(' 1' if W == H else ' 0') |
p03001 | s316795093 | Wrong Answer | def solve():
A = list(map(int, input().split()))
s = A[0] * A[1] / 2
b = 1 if A[0] // 2 == A[2] and A[1] // 2 == A[3] else 0
ans = [s, b]
print(*ans)
# print(solve())
# def solve()が@return voidのとき
solve() |
p03001 | s913619408 | 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 | s963092005 | Wrong Answer | W, H, x, y = map(int, input().split())
print(W * H / 2, end=" ")
print(0) if(x != W // 2 and y != H // 2) else print(1) |
p03001 | s613825703 | Wrong Answer | W, H, x, y = list(map(int,input().rstrip().split()))
if x*2 == W and y*2 == H:
print(W*H//2, 1)
else:
print(W*H//2, 0) |
p03001 | s444188339 | Wrong Answer | import sys
sys.setrecursionlimit(10**9)
def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))
INF=10**20
def main():
W,H,x,y = mi()
ans = '{:.10f}'.format(W*H/2)
ans2 = 1 if x==W/2 and y==W/2 els... |
p03001 | s686658203 | Wrong Answer | def main():
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)
if __name__ == "__main__":
main()
|
p03001 | s193734711 | Wrong Answer | w, h, x, y = map(int, input().split())
ans1 = w*h/2
if x == w//2 and y == h//2:
print(ans1, 1)
else:
print(ans1, 0) |
p03001 | s029309498 | Wrong Answer | w,h,x,y=[int(x) for x in input().rstrip().split()]
dou=0
if w//2==x and h//2==y:
dou=1
print(w*h/2,dou) |
p03001 | s159502129 | Wrong Answer | W, H, x, y = map(int, input().split())
#正方形なら複数 これも面積半分?
#長方形なら一つ 点対称の線を引けば面積半分にできる
if W == H:
print(W*H//2, 1)
else:
print(W*H//2, 0)
|
p03001 | s926740766 | Wrong Answer | W,H,x,y = list(map(int,input().split()))
if W//2 == x and H//2 == y:
print(str(W*H/2)+' '+'1')
else:
print(str(W*H/2)+' '+'0') |
p03001 | s321427897 | Wrong Answer | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
def main():
W, H, x, y = map(int, input().split())
WH = W * H
X = min(H * x, WH - H * x)
Y = min(W * y, WH - W * y)
cnt = (1 if X == Y else 0)
print(min(X, Y), cnt)
if __name__ == "__main__":
main()
|
p03001 | s141302795 | 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 | s728756207 | Wrong Answer | a,b,c,d=map(int,input().split())
x=1
if a%2==0 and a/2==c or b%2==0 and b/2==d:
if a/2==c and b/2==d:
pass
else:
x=0
s=str((a*b)/2)+" "+str(x)
print(s) |
p03001 | s805001962 | Wrong Answer | w,h,x,y=map(int,input().split())
ans=w*h/2.000000000
a=0
if( ((x==0 or x==w)) or (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('{:.6f}'.format(ans),a)
|
p03001 | s995310113 | Wrong Answer | w, h, x, y = [int(_) for _ in input().split()]
if w * y > h * x:
if h / 2 == y:
print(h * x, 1)
else:
print(h * x, 0)
elif w * y < h * x:
if w / 2 == x:
print(w * y, 1)
else:
print(w * y, 0)
else:
print(h * x, 1) |
p03001 | s326611621 | Wrong Answer | w,h,x,y = map(int, input().split())
ans = 0
if w==h: ans += 1
if w%2==0: ans += 1
if h%2==0: ans += 1
if ans > 1: ans = 1
else: ans = 0
print((w*h)/2, ans) |
p03001 | s782604074 | Wrong Answer | w, h, x, y = map(int, input().split())
print(w*h/2, int(x*2==w and y**2==h)) |
p03001 | s309933728 | Wrong Answer | h,w,x,y = map(int,input().split())
print((h*w)/2,bool((h/2==x)and(w/2==y))) |
p03001 | s614523712 | Wrong Answer |
w,h,x,y=map(int,input().split())
s=(w*h)//2
if w==2*x and h==2*y:
print(s,1)
else:
print(s,0)
|
p03001 | s788817069 | Wrong Answer | w,h,x,y=map(int,input().split())
if x==y:
print(w*h/2,1)
else:
print(w*h/2,0) |
p03001 | s861911332 | Wrong Answer | W,H,x,y=map(int,input().split())
A=H*min(x,W-x)
B=W*min(y,H-y)
if A==B:
print(A,end=" ")
print(1)
else:
print(max(A,B),end=" ")
print(0) |
p03001 | s975158668 | 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 | s456348677 | Wrong Answer | W, H ,x, y = map(int, input().split())
if W == H:
if x == W/2 and y == H/2:
can = 1
else:
can = 0
else:
if x == W/2 or y == H/2:
can = 0
else:
can = 1
print('{:.9f}'.format(W*H/2), can)
|
p03001 | s410515095 | Wrong Answer | w, h, x, y = map(int, input().split())
s = w * h / 2
flg = 0
if (x == w // 2 and y == h // 2) and w % 2 == 0 and h % 2 == 0:
print(w * h // 2, 1)
else:
print(w * h // 2, 0)
|
p03001 | s414539211 | 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))
else:
print("{} {}".format(min(y, H-y)*W, f))
elif y/x == H/W or y == -(H/W)*x + H:
print("{} {}".format(W*H/2, f))
else:
print("{} {}".format(m... |
p03001 | s318611887 | Wrong Answer | W, H, x, y = [int(s) for s in input().split(' ')]
S = W * H // 2
D = 1 if W / 2 == x and H / 2 == y else 0
print('%f %d' % (S, D))
|
p03001 | s851194705 | Wrong Answer | def main():
w, h, x, y = map(int, input().split())
area = max(min(h * x, w * h - h * x), 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__':
main()
|
p03001 | s868580332 | Wrong Answer |
W, H, x, y = map(int, input().split())
area1 = [x * H, (W - x) * H]
area2 = [W * y, W * (H - y)]
judge = 1
cnt = 0
if min(area1) > min(area2):
ans = min(area1)
else:
ans = min(area2)
judge = 0
for i in range(len(area1)):
if judge == 1:
if ans == area2[i]:
cnt = 1
else:
... |
p03001 | s595869612 | 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 w == 2*x and h == 2*y:
print(mirx, 1)
else:
print(max(mirx, miry), 0)
|
p03001 | s367476409 | Wrong Answer | W, H, x, y = map(int, input().split())
area = (W * H) / 2
div = 0
if W * H * x * y != 0 and W // 2 == x and H // 2 == y:
div = 1
print(area, div)
|
p03001 | s623452376 | Wrong Answer | #!/usr/bin/python3
# -*- coding:utf-8 -*-
def main():
w, h, x, y = map(int, input().strip().split())
print((w * h)/2, 1 if w//2 == x and h//2 == y else 0)
pass
if __name__=='__main__':
main()
|
p03001 | s615589462 | Wrong Answer | W, H, x, y = map(int, input().split())
print(W*H//2, int(x == y == W/2))
|
p03001 | s408042476 | Wrong Answer | import math
def main():
t = [int(t)for t in input().split()]
w,h,x,y = t[0],t[1],t[2],t[3]
left,right = x, w-x
top, bottom = y, h-y
s_ = [left*h,right*h,top*w,bottom*w]
s_ = sorted(s_)
if s_[3]==0 and s_[0]==s_[1]:
print(s_[1],0)
else:
print(s_[2],1 if s_[2]==s_[3] e... |
p03001 | s732537588 | Wrong Answer | import sys
w,h,x,y = map(float,input().split())
S = w*h/2
if x == w/2:
if y == h/2:
print([S,1])
sys.exit()
print([S,0]) |
p03001 | s118405334 | Wrong Answer | W , H , x , y = map(float,input().split())
area = ( W * H ) / 2
'''
b = (H -W + 2*x - 2*y ) / 2
if 0 <= H + x -y -b and H + x - y - b <= H and 0 <= x - y - b and x - y - b <= H:
if 0 <= W - x + y + b and W -x + y + b <= W and 0 <= y - x + b and y - x + b <= W:
print(area,1)
else:
print(area,0... |
p03001 | s235645938 | Wrong Answer | def main():
W, H, x, y = map(int, input().split())
s1 = min(x * H, (W - x) * H)
if s1 == 0: s1 = max(x * H, (W - x) * H)
s2 = min(W * y, W * (H - y))
if s2 == 0: s2 = max(W * y, W * (H - y))
#print(f's1:{s1}, s2:{s2}')
ans = max(s1, s2)
flag = 0
if s1==s2: flag = 1
print(ans, fl... |
p03001 | s562532954 | Wrong Answer | W, H, x, y = map(int, input().split())
area1 = min(x * H, (W - x) * H)
area2 = min(W * y, W * (H - y))
print(min(area1, area2), 1 if area1 == area2 else 0) |
p03001 | s771934551 | Wrong Answer | W, H, X, Y = map(int, input().split())
a1 = (H-Y) * W
a2 = Y * W
if a1==0 or a2==0:
a12 = max(a1, a2)
else:
a12 = min(a1, a2)
a3 = X * H
a4 = (W-X) * H
if a3==0 or a4==0:
a34 = max(a3, a4)
else:
a34 = min(a3, a4)
ans1 = max(a12, a34)
if a12==a34:
ans2=1
else:
ans2=0
print(ans1, ans2) |
p03001 | s485114288 | Wrong Answer | w,h,x,y=map(int,input().split())
if x==w/2 or y==h/2:
print(w*h/2,1)
else:
print(w*h/2,0) |
p03001 | s954913808 | Wrong Answer | W, H, x, y = map(int, input().split())
print(W*H/2, end=' ')
print(1 if x == y and W ==H or W*y==H*x else 0) |
p03001 | s494735921 | Wrong Answer | w,h,x,y=map(int,input().strip().split())
print(w*h/2,1*((x*2==w)==(y*2==h))) |
p03001 | s197226273 | Wrong Answer | W,H,x,y = map(int,input().split())
S = W * H * 0.5
if(x == W//2 and y == H//2):
a = 1
else:
a = 0
print(S,a) |
p03001 | s096497089 | Wrong Answer | w, h, x, y = list(map(int, input().split()))
# x = aで分割して場合
s_x = min((w - x) * h, x * h)
# y = bで分割した場合
s_y = min((h - y) * w, y * w)
if (s_x == s_y) or (x == w/2) or (y == h/2):
print(str(s_x) + " " + str(1))
else:
print(str(max(s_x, s_y)) + " " + str(0))
|
p03001 | s633123873 | Wrong Answer | w, h, x, y = map(int, input().split())
if w - x > x:
s1 = x * h
else:
s1 = (w - x) * h
if h - y > y:
s2 = y * w
else:
s2 = (h - y) * w
if s1 > s2:
print('{:.6f}'.format(s1), 0)
elif s1 == s2:
print('{:.6f}'.format(s1), 1)
else:
print('{:.6f}'.format(s2), 0) |
p03001 | s826088123 | Wrong Answer | w,h,x,y = map(int,input().split())
if (int(w/2) == x) and (int(h/2) == y ):
print(w*h/2,1)
else:
print(w*h/2,0) |
p03001 | s159252124 | Wrong Answer | import sys
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
w, h, x, y = MI()
s_x = h*min(x, w-x)
s_y = min(y, h-y)*w
print("{} {}".format(max(s_x, s_y), int(s_x==s_y)))
if __name_... |
p03001 | s513406992 | Wrong Answer | W, H, X, Y = map(int, input().split())
ans1 = (W*H)/2
# if X==W//2 and Y==H//2:
if W==H*2 and H==Y*2:
ans2 = 1
else:
ans2 = 0
print(ans1, ans2) |
p03001 | s428076575 | Wrong Answer | w, h, x, y = map(int, input().split())
s1 = (w - x) * h
s2 = w * h - s1
s3 = w * (h - y)
s4 = w * h - s3
res1 = min(s1, s2)
res2 = min(s3, s4)
if res1 != res2:
print(max(res1, res2), 0)
else:
print(res1, 1) |
p03001 | s302366158 | Wrong Answer | W, H, x, y = map(int, input().split())
# x軸で切る
s1 = (x - 0) * H
s2 = (W - x) * H
sx = min(s1, s2)
# y軸で切る
s3 = W * (y - 0)
s4 = W * (H - y)
sy = min(s3, s4)
if sx == sy:
s = sx
w = 1
else:
s = max(sx, sy)
w = 0
print(s, w) |
p03001 | s742022818 | Wrong Answer | W, H, x, y = map(int, input().split())
print(W+H//2, int(x == y == 0))
|
p03001 | s838443580 | Wrong Answer | w,h,x,y=map(int,input().split())
gx=w//2
gy=h//2
s=(w*h)/2
if gx==x and gy==y:
print(s,1)
else:
print(s,0) |
p03001 | s839715933 | Wrong Answer | import itertools
import math
import fractions
import functools
import copy
w, h, x, y = map(int, input().split())
ans = 0
if x == w // 2 and y == h // 2:
ans = 1
print(w*h/2,ans)
|
p03001 | s880280323 | Wrong Answer | W, H, x, y = list(map(int, input().split()))
print(W * H / 2, int(W // 2 == x and H // 2 == y)) |
p03001 | s888853153 | 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 | s139110085 | Wrong Answer | import sys
w,h,x,y=map(int,input().split())
if w==0 or h==0:
print(0,1)
sys.exit()
if x==w//2 and y==h//2:
a=1
else:
a=0
print(w*h/2,a) |
p03001 | s293974627 | Wrong Answer | w,h,x,y = map(int,input().split())
q = w*h
# 縦に分割
ans1_1 = h*x
ans1_2 = q - ans1_1
ans1 = ans1_1 if ans1_1 <= ans1_2 else ans1_2
# 横に分割
ans2_1 = w*y
ans2_2 = q - ans2_1
ans2 = ans2_1 if ans2_1 <= ans2_2 else ans2_2
if ans1 == ans2:
print (ans1,1)
elif ans1 < ans2:
print (ans2,0)
else:
print (ans1,0)
|
p03001 | s103087602 | Wrong Answer | h,w,x,y=map(int,input().split())
print(h*w/2, 1*(x==w/2)*(y==h/2)) |
p03001 | s441668611 | Wrong Answer | w,h,x,y=map(int,input().split())
print((w*h)/2,(2*x==w)&(2*y==h))
|
p03001 | s083612363 | Wrong Answer | W, H, x, y = list(map(int, input().split()))
print("{:.5f}".format(W*H/2), 1 if x == W//2 and y == H//2 else 0) |
p03001 | s802173223 | Wrong Answer | W,H,x,y = map(int,input().split())
if x * 2 == W and y * 2 == 2:
print(W*H/2, 1)
else:
print(W*H/2, 0) |
p03001 | s833957010 | Wrong Answer | w, h, x, y = map(int, input().split())
are_w = min(w*y, w*(h-y))
are_h = min(x*h, (w-x)*h)
ans_are = max(are_w, are_h)
ans = 0
if are_w == are_h:
ans = 1
if ans_are == are_w:
if w == 2*x:
ans = 1
if ans_are == are_h:
if h == 2*y:
ans = 1
print(ans_are, ans)
|
p03001 | s861409731 | Wrong Answer | w,h,x,y=map(int,input().split())
r=[[] for ii in range(2)]
r[0]=sorted([x*h,(w-x)*h])
r[1]=sorted([y*w,(h-y)*w])
r.sort(reverse=True)
#print(r)
if r[0][0]==r[1][0]:
n=1
else:
n=0
print(r[0][0],n) |
p03001 | s528009204 | Wrong Answer | def main():
W, H, x, y = map(int, input().split())
S2 = W * H / 2
if (x == 0 or x == W) and (y == 0 or y == H):
print(S2, 0)
exit()
print(W * H / 2, 1)
main()
|
p03001 | s949981530 | Wrong Answer | import sys
input = sys.stdin.readline
def readstr():
return input().strip()
def readint():
return int(input())
def readnums():
return map(int, input().split())
def readstrs():
return input().split()
def main():
W, H, x, y = readnums()
ans = max(min(H * x, (W - x) * H), min(W * y, W * (... |
p03001 | s771107794 | Wrong Answer | W,H,x,y = map(int,input().split())
ans_1 = min(W*y, W*(H-y))
ans_2 = min(x*H, (W-x)*H)
if ans_1 == ans_2:
if ans_1 == 0:
print(0, 0)
else:
print(ans_1, 1)
else:
print(max(ans_1,ans_2), 0) |
p03001 | s157948887 | Wrong Answer | w,h,x,y = map(int,input().split())
ans = 0
if x*2==w or y*2==h:ans=1
print(w*h/2,ans) |
p03001 | s497911522 | Wrong Answer | coordinates = list(map(int, input().split()))
w = coordinates[0]
h = coordinates[1]
x = coordinates[2]
y = coordinates[3]
if x == w and y == h:
x = y = 0
prod1 = x * h
prod2 = y * w
area = min(prod1, prod2)
area = format(area, '.6f') if area != 0 else 0
addit = 0 if prod1 != prod2 else 1
print("{} {}".format(area,... |
p03001 | s513592434 | Wrong Answer | w,h,x,y=map(int,input().split())
if x==w//2 and y==h//2:
frag=1
else: frag=0
print(w*h/2,frag)
|
p03001 | s910149794 | Wrong Answer | W, H, x, y = map(int, input().split())
s1 = [x*H, (W-x)*H]
s2 = [y*W, (H-y)*W]
ans = max(min(s1), min(s2))
if min(s1) == min(s2):
print(ans, 1)
else:
print(ans, 0) |
p03001 | s390009262 | Wrong Answer | W,H,x,y=map(int,input().split())
tall1=x*H
tall2=(W-x)*H
wide1=y*W
wide2=(H-y)*W
if tall1<tall2:
t=tall1
else:
t=tall2
if wide1<wide2:
w=wide1
else:
w=wide2
if w<t:
print(t,0)
elif t<w:
print(w,0)
else:
print(t,1)
|
p03001 | s096682697 | Wrong Answer | w,h,x,y = map(int, input().split())
calc = w * h / 2
flg = 1
if w/2 == x and h/2 == y:
flg = 0
print(str(calc) + ' ' + str(flg)) |
p03001 | s479310342 | 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 | s838087580 | Wrong Answer | import sys
W,H,x,y = map(int,input().split())
if (x,y) == (W/2,H/2):
print('{} {}'.format(W*H/2,'1'))
sys.exit(0)
else: #On rectangle
if (x == 0 or x == W):
print('{} {}'.format(W*max(y,H-y)*0,5,'0'))
if (y == 0 or y == H):
print('{} {}'.format(W*max(x,W-x)*0,5,'0'))
#else Inside rectangle |
p03001 | s366194521 | Wrong Answer | w,h,x,y=map(int,input().strip().split())
t=x*h!=y*w and x*2!=w and y*2!=h
if x*2==w and y*2==h:t=1
print(w*h/2,1*t)
|
p03001 | s166787437 | Wrong Answer | h, w, x, y = map(int, input().split())
half = h*w / 2
if x == w - x and y == h - y:
p = 1
else:
p = 0
print(half, p) |
p03001 | s452457944 | Wrong Answer | w,h,x,y = list(map(int, input().split()))
if((x == w//2 and y == h//2)):
print((w*h)//2 , 1)
else:
print((w*h)//2, 0) |
p03001 | s541048723 | Wrong Answer | W, H, x, y = map(int, input().split())
if x == W / 2 and y == H / 2:
print(W*H/2, 1)
exit()
if abs(x-W/2) < abs(y-H/2):
ans = min(x, W-x) * H
else:
ans = W * min(y,H-y)
print(ans, 0)
|
p03001 | s686488389 | Wrong Answer | W, H, x, y = map(int, input().split())
area_x1 = x * H
area_x2 = (W-x) * H
if area_x1 != 0 and area_x2 != 0:
area_x = min(area_x1, area_x2)
else:
area_x = max(area_x1, area_x2)
area_y1 = W * y
area_y2 = W * (H-y)
if area_y1 != 0 and area_y2 != 0:
area_y = min(area_y1, area_y2)
else:
area_y = max(area_... |
p03001 | s290919240 | Wrong Answer | W, H, x, y = map(int, input().split())
a_area = min([x*H, H*(W-x)])
b_area = min([y*W, W*(H-y)])
if a_area == b_area:
print(max(a_area,b_area),1)
else:
print(max(a_area,b_area),0) |
p03001 | s968649156 | Wrong Answer | w,h,x,y = map(int, input().split())
if w//2 == x and h//2 == y:
print(x*y*2,'1')
else:
s1 = min(abs(w-x),x)*h
s2 = min(abs(h-y),y)*w
print(max(s1,s2),'0') |
p03001 | s587852669 | 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 | s798723887 | Wrong Answer | w,h,x,y = map(int,input().split())
flg = 0
s=0
if x<=w/2 and y <= h/2:
s = max(x*h,w*y)
elif x<=w/2 and y>h/2:
s = max(x*h,w*(h-y))
elif x>w/2 and y <= h/2:
s = max( (w-x)*h , w*y)
else:
s = max( (w-x)*h, w*(h-y))
if x==w/2 and y==h/2:
flg = 1
print(s,flg) |
p03001 | s091616630 | Wrong Answer | w,h,x,y=map(int,input().split())
if x==0 or x==w or y==0 or y==h:
print(w*h/2, 0)
exit()
a=min(x,w-x)*h
b=min(y,h-y)*w
if a==b:
c=1
else:
c=0
print(max(a,b), c)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.