problem_id
stringclasses
100 values
submission_id
stringlengths
10
10
status
stringclasses
2 values
code
stringlengths
6
806
p03001
s089210049
Wrong Answer
w,h,x,y=map(int,input().split());S1=(w-x)*h;S2=(h-y)*w;print(max(S1,S2),sum([S1==S2]))
p03001
s602519135
Wrong Answer
W, H, x, y = map(int, input().split()) a = [] a.append(min(H*W-min(x, y)*H, min(x, y)*H)) if float(W)/2 == x and float(H)/2 == y: a.append(1) elif int(float(H)/W)*x == y: a.append(2) else: a.append(0) print(*a)
p03001
s570606873
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('{:.6f}'.format(ans*w*h), end=" ") #print(ans*w*h, end=" ") if min(x/w, (w-x)/w)==min(y/h,(h-y)/h): print(1) else: print(0)
p03001
s294759889
Wrong Answer
import sys input=sys.stdin.readline w,h,x,y=map(int,input().split()) cnt=w*h if w*y!=h*x: print(min(cnt-w*y,cnt-h*x),0) else:print(min(cnt-w*y,cnt-h*x),1)
p03001
s021282475
Wrong Answer
w, h, x, y = map(int, input().split()) area = min(x, w - x) * h if w == h: print(area, 1) else: print(area, 0)
p03001
s246324649
Wrong Answer
from decimal import Decimal W, H, x, y = map(int, input().split()) Wi = W * 10 ** 9 Hi = H * 10 ** 9 men = Decimal(W * H / 2) judge = 0 if x == W // 2 and y == H // 2: judge = 1 print("{0:.10f} {1:.0f}".format(men, judge))
p03001
s946228770
Wrong Answer
W, H ,x, y = map(int, input().split()) if H > W: if x == W/2: can = 0 else: can = 1 elif H == W: can = 1 else: if y == H/2: can = 0 else: can = 1 print('{:.9f}'.format(W*H/2), 1)
p03001
s528416321
Wrong Answer
w, h, x, y = [int(i) for i in input().split()] print(min(w * y, h * x), int(w * x == h * y))
p03001
s540465130
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: if s == w*h / 2: print(s, '1') else: print(s, '0')
p03001
s565393909
Wrong Answer
import math import collections from operator import mul from functools import reduce W,H,x,y=map(int,input().split()) flag=-1 if W/2==x: flag+=1 if H/2==y: flag+=1 print("{0:.6f}".format(float(W*H/2)),flag)
p03001
s746191070
Wrong Answer
def main(): w,h,x,y = map(int,input().split()) flg = 0 if x * 2 == w : flg +=1 if y * 2 == h : flg +=1 if x * h == w * y : flg += 1 ans = max(w * y, h*x) if ans * 2 > w*h: ans = min(w*y,h*x) if flg == 1: print(w*h/2, 0) elif flg > 1: ...
p03001
s983555803
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(max(min(y, h - y) * w, min(x, w - x) * h), 0)
p03001
s536772033
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)) if 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
s080003213
Wrong Answer
w, h, x, y = map(int, input().split()) s1 = min(w-x, x)*h s2 = min(h-y, y)*w print(max(s1, s2), 1 if s1 == s2 else 0)
p03001
s893784130
Wrong Answer
w,h,x,y=map(int,input().split()) flag=0 if w%2==0 or h%2==0: if x == w //2 and y == h // 2: flag = 1 s=0 for i in range(h): s += w print(s/2,flag)
p03001
s388089324
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('{:.10f}'.format(ans*w*h), end=" ") #print(ans*w*h, end=" ") if min(x/w, (w-x)/w)==min(y/h,(h-y)/h): print(1) else: print(0)
p03001
s780722117
Wrong Answer
w, h, x, y = map(int, input().split()) s1 = min((w-x)*h, x*h) s2 = min(w*y, w*(h-y)) if s1 == s2: print(s1, 1) else: print(max(s1, s2), 0)
p03001
s891643235
Wrong Answer
W, H, x, y = map(int, input().split()) area_x1 = x * H area_x2 = (W-x) * H area_x = min(area_x1, area_x2) area_y1 = W * y area_y2 = W * (H-y) area_y = min(area_y1, area_y2) ans1 = max(area_x, area_y) if W/2 == x and H/2 == y: ans2 = 1 else: ans2 = 0 print(ans1, ans2)
p03001
s819962231
Wrong Answer
#C - Rectangle Cutting W,H,x,y = map(float,input().split()) def main(W,H,x,y): tmp1 = min((W-x)*H,x*H) tmp2 = min(W*(H-y),W*y) ans1 = max(tmp1,tmp2) if tmp1 == tmp2: ans2 = 1 else: ans2 = 0 print(ans1,ans2) main(W,H,x,y)
p03001
s788032148
Wrong Answer
w, h, x, y = map(int, input().split()) P = 0 if h > w: ans = min(x*h, (w-x)*h) elif h == w: if x != 0 and y != 0: P = 1 ans = max(min(x * h, (w - x) * h), min(y * w, (h - y) * w)) else: ans = min(y * w, (h - y) * w) print(ans, P)
p03001
s679535340
Wrong Answer
w,h,x,y = map(int,input().split()) ans = max(x*h,y,w) ans0 = (1 if x*h==y*w else 0) print(ans,ans0)
p03001
s690607524
Wrong Answer
def rectangle_cutting(w, h, x, y): a = 0 ans = min((w-x)*h, x*h) if ans == min((h-y)*w, w*y): a = 1 else: ans = max(ans, min((h-y)*w, w*y)) return str(ans)+" "+ str(a) def main(): w, h, x, y = map(int, input().split()) print(rectangle_cutting(w, h, x, y)) if __name__ == '...
p03001
s908037007
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=0 for val in arry: if ans==val: cnt+=1 for val in arrx: if ans==val: cnt+=1 print(str(ans)+" "+("0" if cnt==1 else "1"))
p03001
s632397990
Wrong Answer
w,h,x,y=map(int,input().split()) a=min(x*h,h*w-x*h) b=min(y*w,h*w-y*w) if 2*y==h and 2*x==w: print(max(a,b),1) else: print(max(a,b),0)
p03001
s199861547
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(ans, flag)
p03001
s139381827
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(float(ans), method)
p03001
s210761006
Wrong Answer
W, H, x, y = map(int, input().split()) # 面積の半分 area_half = W * H / 2 # 点 x,y が中心なら分割方法は複数 if x == W//2 and y == H//2: print(area_half, 1) else: print(area_half, 0)
p03001
s072849046
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), 0)
p03001
s779152275
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
s476450070
Wrong Answer
import sys import os def main(): if os.getenv("LOCAL"): sys.stdin = open("input.txt", "r") W, H, x, y = list(map(int, sys.stdin.buffer.readline().split())) P = 0 Py = (abs(W-x)) * H Px = (abs(H-y)) * W ret = max(Py, Px) P = 1 if Py == Px else 0 print(ret, P) if __name__ == '...
p03001
s122852800
Wrong Answer
coordinates = list(map(int, input().split())) w = coordinates[0] h = coordinates[1] x = coordinates[2] y = coordinates[3] 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, addit))
p03001
s709828904
Wrong Answer
w,h,x,y=map(int,input().split()) if w//2==x and h//2==y: print(str((h*w//2))+' '+str(1)) else: print(str((h*w//2))+' '+str(0))
p03001
s230134964
Wrong Answer
W, H, x, y = map(int, input().split()) if W==x*2 and H==y*2: print(W*H/2, 1) else: print(max(min(x,W-x)*H, min(y, H-y)*W), 0)
p03001
s022526507
Wrong Answer
X, H, x, y = [int(x) for x in input().split()] if X * y > H * x: print(H * x, 0) elif X * y < H * x: print(X * y, 0) else: print(X * y, 1)
p03001
s138205460
Wrong Answer
w,h,x,y=map(int,input().split()) print((w*h)/2 , 1) if x==w//2 and y==h//2 else print((w*h)/2,0)
p03001
s691716869
Wrong Answer
W,H,x,y = map(int,input().split(" ")) if x == W/2 and y == W/2: ans = 1 else: ans = 0 print(str(H*W/2) + ' ' + str(ans))
p03001
s215203344
Wrong Answer
w,h,x,y=map(int, input().split()) S= w*h/2 ans = 1 if (x+x==w & y+y==h) else 0 print(S, ans)
p03001
s576556197
Wrong Answer
def intMap(): return map(int,input().split()) w,h,x,y = intMap() s = w * h / 2 multi = 0 if (x == w // 2) and (y == h // 2): multi = 1 print("{:.10f} {}".format(s,multi))
p03001
s625600981
Wrong Answer
W,H,x,y=map(int,input().split()) if x==W//2 and y==H//2: c=1 else: c=0 print(W*H/2,c)
p03001
s100392896
Wrong Answer
w, h, x, y = [int(i) for i in input().split()] s_0 = min(x * h, (w - x) * h) s_1 = min(w * y, w * (h - y)) print(max(s_0, s_1), 1 if s_0 == s_1 else 0)
p03001
s251651956
Wrong Answer
whxy=list(map(int,input().split())) if whxy[2]==whxy[0]//2 and whxy[3]==whxy[1]//2: print(whxy[2]*whxy[3]*2,1) else: print(whxy[0]*whxy[1]//2,0)
p03001
s040538462
Wrong Answer
def resolve(): ''' code here ''' W, H, x, y = [int(item) for item in input().split()] if x == W//2 and y == H//2: res = 1 else: res = 0 print(W*H/2, res) if __name__ == "__main__": resolve()
p03001
s160299502
Wrong Answer
W, H, x, y = map(int, input().split()) ans = 0 if x*H == W*y: ans = 1 S = min(x*H, W*y) print(S, ans)
p03001
s554618859
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 print(ans_are, ans)
p03001
s990168212
Wrong Answer
W, H, x, y = map(int, input().split()) if W/2==x and H/2==y: print(max(x*H, y*W), 1) else: print(max(min(x,W-x)*H, min(y, H-y)*W), 0)
p03001
s186120985
Wrong Answer
w,h,x,y = map(int,input().split()) s = w*h if (w-x)*h > (h-y)*w: print((w-x)*h,end = " ") print(0) elif (w-x)*h == (h-y)*w: print((w-x)*h,end = " ") print(1) else: print((h-y)*w,end = " ") print(0)
p03001
s041972922
Wrong Answer
w, h, x, y = map(int, input().split()) area = w * h / 2 if x == y: flg = 1 else: flg = 0 print(area, flg)
p03001
s366614768
Wrong Answer
w,h,x,y=map(int,input().split()) print(w*h/2) if x==w//2 and y==h//2: print(1) else: print(0)
p03001
s627075885
Wrong Answer
w, h ,x, y=map(int, input().split()) m1=min((w-x)*h, x*h) m2=min((h-y)*w, y*w) ans=max(m1, m2) if w-x == x and h-y == y and x == y and w == h: p=1 else: p=0 print(ans, p)
p03001
s574013348
Wrong Answer
w,h,x,y = map(int, input().split()) if (x,y) == (w//2, h//2): print(w*h/2, 1) else: print(w*h/2, 0)
p03001
s941085150
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
s212939745
Wrong Answer
import sys def input(): return sys.stdin.readline().rstrip() def main(): W, H, x, y = map(int, input().split()) X, Y = min(x, W-x) * H, min(y, H-y) * W print(max(X, Y), int(X == Y)) if __name__ == '__main__': main()
p03001
s553311449
Wrong Answer
w, h, x, y = map(int, input().split()) ans = w * h / 2 r = 0 if x == w // 2 and y == h // 2: r += 1 print(ans, r)
p03001
s003742001
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
s996018668
Wrong Answer
W, H, x, y = list(map(int, input().split())) print(W*H/2, 1 if x == W//2 and y == H//2 else 0)
p03001
s946891562
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
s225379552
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
s586240035
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
s271536028
Wrong Answer
W, H, x, y = map(int, input().split()) # xで分割 left = x * H right = (W - x) * H min_x = min(left, right) # yで分割 down = W * y up = W * (H - y) min_y = min(down, up) print(max(min_x, min_y), int(min_x==min_y))
p03001
s502604025
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
s988393904
Wrong Answer
W, H ,x, y = map(int, input().split()) if H > W: if x == W/2: can = 0 else: can = 1 elif H == W: can = 1 else: if y == H/2: can = 0 else: can = 1 print(float(W*H/2), can)
p03001
s265608088
Wrong Answer
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
s450631488
Wrong Answer
W,H,x,y = map(int,input().split()) a,b = min(x*H, (W-x)*H), min(y*W, (W-y)*W) if a != b: print(max(a,b),0) else: print(a,1)
p03001
s358605275
Wrong Answer
W , H , x, y = (map(int , input().split())) men = W * H bun = x * H bunbun = y * W if bun == bunbun: ans2 = 1 else: ans2 = 0 ans = men - min(bun , bunbun) print(float(ans) , ans2)
p03001
s305355762
Wrong Answer
W,H,x,y = map(int,input().split()) ans = float(W*H)/2.0 ans2 = (x==W/2) and (y==H/2) print(ans,ans2)
p03001
s935806597
Wrong Answer
w, h , x, y = map(int, input().split()) split_area_smax = (w*h)/2 if x == w//2 and y ==h//2: vari_split = 1 else: vari_split = 0 print(split_area_smax, vari_split)
p03001
s295646168
Wrong Answer
W, H, x, y = map(int, input().split()) #x軸平行 X = min(W*y,W*(H-y)) #y軸平行 Y = min(x*H, (W-x)*H) if x*2 == W and y*2 == H: print (W*H/2, 1) elif X == Y: print (X, 0) else: print(max(X, Y), 0)
p03001
s148358776
Wrong Answer
# -*- coding: utf-8 -*- """ Created on Sat Sep 12 11:04:24 2020 @author: liang """ W, H, x, y = map(int, input().split()) ans = [0] * 2 ans[0] = H*W/2 if x == W//2 and y == H//2: ans[1] = 1 else: ans[1] = 0 print(" ".join(map(str, ans)))
p03001
s872544967
Wrong Answer
I=lambda:list(map(int,input().split())) w,r,x,y=I() an=(w-x)*r ans=(r-y)*w if an==ans: print(an,1) else: print(max(an,ans),0)
p03001
s511327072
Wrong Answer
w, h, x, y = map(int, input().split()) menseki = 0 bunkatsu = 0 if w / 2 == x and h / 2 == y: bunkatsu = 1 if h >= w: x0 = x y0 = 0 else: x0 = 0 y0 = y menseki = (w - x0) * (h - y0) print(menseki, bunkatsu)
p03001
s856304522
Wrong Answer
def intMap(): return map(int,input().split()) w,h,x,y = intMap() s = w * h / 2 multi = 0 if x == w // 2 and y == h // 2: multi = 1 print("{:.10f} {}".format(s,multi))
p03001
s587376846
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
s367317571
Wrong Answer
from sys import exit import math import collections ii = lambda : int(input()) mi = lambda : map(int,input().split()) li = lambda : list(map(int,input().split())) w,h,x,y = mi() ans = w * h / 2 check = 0 if x == w // 2 and y == h // 2: check = 1 print('{} {}'.format(ans,check))
p03001
s655772602
Wrong Answer
import sys import os def main(): if os.getenv("LOCAL"): sys.stdin = open("input.txt", "r") W, H, x, y = list(map(int, sys.stdin.buffer.readline().split())) ret = (W * H) // 2 p = x == W//2 and y == H//2 print(ret, 1 if p else 0) if __name__ == '__main__': main()
p03001
s944472919
Wrong Answer
W,H,x,y = map(int,input().split()) if x*2 == W and y*2 == H: print(W*H/2,1) else: a = min(x*H,(W-x)*H) b = min(y*W,(H-y)*W) print(max(a,b),0)
p03001
s704133023
Wrong Answer
W, H, x, y = map(int, input().split()) if int(W / 2) == x and int(H // 2) == y: a = 1 else: a = 0 print(W*H/2, a)
p03001
s443138255
Wrong Answer
W,H,x,y = map(int,input().split()) a,b = x*H, (W-x)*H c,d = y*W, (W-y)*W if min(a,b) == min(c,d): print(min(a,b),1) else: print(max(min(a,b),min(c,d)),0)
p03001
s647002936
Wrong Answer
W,H,X,Y = map(int, input().split()) C = X/W D = Y/H if C == 0: print(D*W*H) elif D == 0: print(C*W*H) else: print(min(C,D)*W*H)
p03001
s398057515
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(max(ans1,ans2),0) else: print(ans1,1)
p03001
s224092990
Wrong Answer
W, H, x, y = map(int, input().split()) #正方形なら複数 これも面積半分? #長方形なら一つ 点対称の線を引けば面積半分にできる if W == H: print(W*H/2, 1) elif W/2 == x and H/2 == y: print(W*H/2, 1) else: print(W*H/2, 0)
p03001
s851382784
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
s166606341
Wrong Answer
w,h,x,y=map(int,input().split()) if x==w or x==0: if y==h or y==0: print(0,"0") else: w2=int(w//2) h2=int(h//2) s1=h*w2 s2=w*h2 if s1>s2: print(s1,"0") elif s1==s2: print(s1,"1") else: print(s2,"0")
p03001
s878522393
Wrong Answer
w, h, x, y = map(int, input().split()) print(float(w) * float(h) / 2, 1 if x + x == w & y + y == h else 0)
p03001
s141127474
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)
p03001
s866472216
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
s178940649
Wrong Answer
w,h,x,y = map(int,input().split()) if w == x * 2 and h == y * 2: print(w*h/2) print(1) else: ans = max(h * min(x,w-x), w * min(y,h-y)) print(ans) print(0)
p03001
s255255277
Wrong Answer
# -*- coding: utf-8 -*- w, h, x, y = map(int, input().split()) multi = (h/2 == y) or (w/2 == x) print(w*h/2, 1 if multi else 0)
p03001
s148207315
Wrong Answer
w,h,x,y = map(int, input().split()) if x == w//2 and y == h//2: print(w*h/2, 1) else: if x >= w/2: a = (w-x) * h else: a = x * h if y >= h/2: b = (h-y) * w else: b = y * w print(max(a,b), 0)
p03001
s686249743
Wrong Answer
w, h, x, y = map(int, input().split()) square = (w * h) / 2 flg = 0 if x == w // 2 and y == h // 2: flg = 1 print(square, flg)
p03001
s272179545
Wrong Answer
W, H, x, y = map(int, input().split(' ')) if x in {0, W} or y in {0, H}: print(W * H / 2, 0) else: x1 = x x2 = W - x y1 = y y2 = H - y r1 = x1 * H r2 = x2 * H r3 = y1 * W r4 = y2 * W r12 = min(r1, r2) r34 = min(r3, r4) n = 0 if r12 == r34: n = 1 prin...
p03001
s711634707
Wrong Answer
def do(): w,h,x,y=map(int,input().split()) ar1=(h-y)*w ar2=(w-x)*h ar=w*h if ar1==ar2 and ar/2==ar1: return "{} 1".format(ar2) elif ar/2==ar1: return "{} 0".format(ar1) elif ar/2==ar2: return "{} 0".format(ar2) print(do())
p03001
s390645512
Wrong Answer
w,h,x,y = map(int,input().split()) #必ず半分にできる…とはいえるのか?多分いえる。 #長方形の重心を通るようにひけばok. ans = w*h/2 if w==h: print(ans, 1) else: print(ans, 0)
p03001
s427568565
Wrong Answer
w, h, x, y = map(int, input().split()) an=[] if y>=h/2: a=w*(h-y) an.append(a) if y<=h/2: b=w*y an.append(b) if x>=w/2: c=h*(w-x) an.append(c) if x<=w/2: d=h*x an.append(d) if y==2*x: e=(w*h)/2 an.append(e) g = set(an) l=len(g) i=len(an) an.sort() if l>1: T=0 else: T=1 print('{} {}'.format(an[...
p03001
s171225254
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 elif w==h:k=0 else:k=1 print(w*h/2,k)
p03001
s180889147
Wrong Answer
W,H,x,y = map(int,input().split()) ans = max(min(x*H, (W-x)*H), min(y*W, (W-y)*W)) if ans % W and ans % H: print(ans,0) else: print(ans,1)
p03001
s873308672
Wrong Answer
W, H, X, Y = map(int, input().split()) ans1 = (W*H)//2 if X==W//2 and Y==H//2: ans2 = 1 else: ans2 = 0 print(ans1, ans2)
p03001
s770612232
Wrong Answer
w,h,x,y=map(int,input().split()) w2=w//2 h2=h//2 if x<=w2: w3=w-x else: w3=x s1=h*w3 if y<=h2: h3=h-y else: h3=y s2=w*h2 err1=(s1-s2)/s1 #print("1",w2,h2,s1,s2,err1) if -1.0*10**(-9)<err1 and err1<1.0*10**(-9): print(s1,1) elif s1>s2: print(s1,0) else: print(s2,0)
p03001
s224248476
Wrong Answer
import sys W,H,x,y = map(int, input().split()) area = W*H patternA = (W-x)*(H) patternB = (W)*(H-y) Flag= 0 ans = -10**100 if patternA == patternB: Flag = 1 ans = max(ans, patternA) print(str(ans) + " " + str(Flag)) else: ans = max(ans, patternA,patternB) print(str(ans) + " " + str(Flag))
p03001
s053395444
Wrong Answer
W,H,x,y = map(int,input().split()) if x == 0 or x == W or y == 0 or y == H: half = W * H // 2 print(half) print(0) exit() holizontal = min(W * y,W * (H-y)) vertical = min(H * x,H * (W - x)) print(max(holizontal,vertical)) print(0) exit()
p03001
s095470915
Wrong Answer
W,H,x,y=map(int,input().split()) if x==W//2 and y==H//2: print(W*H//2,1) elif x==W//2 and y!=H//2: print(W*H//2,0) elif x!=W//2 and y==H//2: print(W*H//2,0) else: print(W*H//2,1)