buggy_code stringlengths 11 625k | fixed_code stringlengths 17 625k | bug_type stringlengths 2 4.45k | language int64 0 8 | token_count int64 5 200k |
|---|---|---|---|---|
#include <bits/stdc++.h>
using namespace std;
int main() {
long long H, W;
cin >> H >> W;
if (H == 1 || W == 1) {
cout << 0 << endl;
} else {
if ((H * W) % 2 == 0) {
cout << (H * W) / 2 << endl;
} else {
cout << (H * W + 1) / 2 << endl;
}
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long H, W;
cin >> H >> W;
if (H == 1 || W == 1) {
cout << 1 << endl;
} else {
if ((H * W) % 2 == 0) {
cout << (H * W) / 2 << endl;
} else {
cout << (H * W + 1) / 2 << endl;
}
}
} | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 88 |
H, W = map(int, input().split())
if H == 1 or W == 1:
print (0)
else:
if H*W%2 == 0:
print (H*W//2)
else:
print (H*W//2+1) | H, W = map(int, input().split())
if H == 1 or W == 1:
print (1)
else:
if H*W%2 == 0:
print (H*W//2)
else:
print (H*W//2+1) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 60 |
from math import sqrt
a,b=map(int,input().split())
if(a==1 or b==1):
print('1')
if(a%2==0):
a//=2
print(a*b)
elif(b%2==0):
b//=2
print(a*b)
else:
print(a*b//2+(a*b)%2) | from math import sqrt
a,b=map(int,input().split())
if(a==1 or b==1):
print('1')
exit()
if(a%2==0):
a//=2
print(a*b)
elif(b%2==0):
b//=2
print(a*b)
else:
print((a*b)//2+(a*b)%2) | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["+", 3, 4, 0, 657, 31, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 31, 657, 31, 23, 0, 25]] | 5 | 91 |
s = input().split()
H = int(s[0])
W = int(s[1])
if H == 1 or W == 1:
print(1)
else:
ret = (H//2) * W + (H%2) * (W // 2 + 1 )
print(ret) | s = input().split()
H = int(s[0])
W = int(s[1])
if H == 1 or W == 1:
print(1)
else:
ret = (H//2) * W + (H%2) * ((W+1) // 2)
print(ret) | [["+", 12, 657, 12, 23, 0, 657, 31, 23, 0, 24], ["-", 12, 657, 12, 23, 0, 657, 31, 657, 17, 676], ["-", 12, 657, 12, 23, 0, 657, 31, 657, 12, 612], ["+", 12, 657, 12, 23, 0, 657, 31, 23, 0, 25], ["+", 12, 657, 12, 657, 12, 23, 0, 657, 17, 676], ["+", 12, 657, 12, 657, 12, 23, 0, 657, 12, 612]] | 5 | 69 |
H,W=map(int,input().split())
print(((W+1)//2)*((H+1)//2)+(H//2)*(W//2) if H!=1 and W!=1 else 0) | H,W=map(int,input().split())
print(((W+1)//2)*((H+1)//2)+(H//2)*(W//2) if H!=1 and W!=1 else 1) | [["-", 0, 1, 0, 652, 3, 4, 0, 41, 0, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 41, 0, 612]] | 5 | 60 |
h , w = map(int, input().split())
if h == 1 or w == 1: exit(print(1))
a1 = h//2 + 1 if h % 2 != 0 else h//2
a2 = h - a1
a3 = w//2 + 1 if h%2!=0 else w//2
a4 = w - a3
ans = a1*a3 + a2*a4
print(ans) | h , w = map(int, input().split())
if h == 1 or w == 1: exit(print(1))
a1 = h//2 + 1 if h % 2 != 0 else h//2
a2 = h - a1
a3 = w//2 + 1 if w%2!=0 else w//2
a4 = w - a3
#print(a1 , a2 , a3,a4)
ans = a1*a3 + a2*a4
print(ans) | [["-", 0, 662, 12, 41, 0, 666, 0, 657, 31, 22], ["+", 0, 662, 12, 41, 0, 666, 0, 657, 31, 22]] | 5 | 89 |
h, w = map(int, input().split())
a = h*w
if h == 1 or w == 1:
print(0)
elif a % 2 == 0:
print(a//2)
else:
print((a+1)//2)
| h, w = map(int, input().split())
a = h*w
if h == 1 or w == 1:
print(1)
elif a % 2 == 0:
print(a//2)
else:
print((a+1)//2)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 59 |
H, W = map(int, input().split())
count = 0
if (H == 1) or (W == 1):
print(0)
else:
if H % 2 == 0:
print(W * (H // 2))
else:
if W % 2 == 0:
print(W * (H // 2) + (W // 2))
else:
print(W * (H // 2) + (W // 2) + 1) | H, W = map(int, input().split())
count = 0
if (H == 1) or (W == 1):
print(1)
else:
if H % 2 == 0:
print(W * (H // 2))
else:
if W % 2 == 0:
print(W * (H // 2) + (W // 2))
else:
print(W * (H // 2) + (W // 2) + 1)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 100 |
h,w = gets.chomp.split.map &:to_i
if(w == 1 or h == 1)
puts 1
exit
end
if(w.even?)
puts w*h/2
else
if(h.even?)
puts w*h/2
else
puts w*h/2 + (w+1)/2
end
end | # Your code here!
h,w = gets.chomp.split.map &:to_i
if(w == 1 or h == 1)
puts 1
exit
end
if(w.even?)
puts w*h/2
else
if(h.even?)
puts w*h/2
else
puts w*(h/2) + (w+1)/2
end
end
| [["+", 3, 4, 0, 738, 31, 738, 12, 739, 0, 24], ["+", 3, 4, 0, 738, 31, 738, 12, 739, 0, 25]] | 4 | 69 |
h, w = map(int,input().split())
if h == 1 or w == 1:
print(1)
if h%2 == 1 and w%2 == 1:
print((h*w+1)//2)
else:
print(h*w//2) | h, w = map(int,input().split())
if h == 1 or w == 1:
print(1)
elif h%2 == 1 and w%2 == 1:
print((h*w+1)//2)
else:
print(h*w//2) | [["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["+", 36, 36, 0, 656, 0, 57, 75, 665, 0, 683]] | 5 | 64 |
import math
h,w=map(int,input().split())
d,m=divmod(h,2)
if h == 1:
print(1)
exit()
print(d*(math.ceil(w/2)+math.floor(w/2))+math.ceil(w/2)*m)
| import math
h,w=map(int,input().split())
d,m=divmod(h,2)
if h==1 or w==1:
print(1)
exit()
print(d*(math.ceil(w/2)+math.floor(w/2))+math.ceil(w/2)*m)
| [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 75 |
h,w=list(map(int,input().split()))
if h==1 or w==1:
print(1)
print(h//2*w+(h%2)*((w+1)//2)) | h,w=list(map(int,input().split()))
if h==1 or w==1:
print(1)
else:
print(h//2*w+(h%2)*((w+1)//2)) | [["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102]] | 5 | 56 |
h, w = map(int, input().split())
if h == 1 or w == 1:
c == 1
elif h & 1:
if w & 1:
c = ((h + 1) // 2) * ((w + 1) // 2) + (h // 2) * (w // 2)
else:
c = (((h + 1) // 2) + (h // 2)) * (w // 2)
else:
c = (h // 2) * w
print(c)
| h, w = map(int, input().split())
if h == 1 or w == 1:
c = 1
elif h & 1:
if w & 1:
c = ((h + 1) // 2) * ((w + 1) // 2) + (h // 2) * (w // 2)
else:
c = (((h + 1) // 2) + (h // 2)) * (w // 2)
else:
c = (h // 2) * w
print(c)
| [["-", 0, 57, 64, 196, 0, 1, 0, 666, 667, 60], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32]] | 5 | 113 |
from math import ceil
H, W = map(int, input().split())
if (H == 1) or (W == 1):
print(0)
exit()
x1 = ceil(W / 2)
x2 = W // 2
print(int(ceil(H / 2) * x1 + H // 2 * x2))
| from math import ceil
H, W = map(int, input().split())
if (H == 1) or (W == 1):
print(1)
exit()
x1 = ceil(W / 2)
x2 = W // 2
print(int(ceil(H / 2) * x1 + H // 2 * x2))
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 73 |
H, W = map(int, input().split())
a = W // 2 + W % 2
b = W // 2
c = H // 2
d = H % 2
if H == 1 or W == 1:
print(0)
else:
print(c * (a + b) + d * a) | H, W = map(int, input().split())
a = W // 2 + W % 2
b = W // 2
c = H // 2
d = H % 2
if H == 1 or W == 1:
print(1)
else:
print(c * (a + b) + d * a) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 69 |
H, W = map(int, input().split())
if H == 1 or W == 1:
print(0)
# 両方奇数の場合
elif H%2 == 1 and W%2 == 1:
print((H*W)//2+1)
else:
print((H*W)//2) | H, W = map(int, input().split())
if H == 1 or W == 1:
print(1)
# 両方奇数の場合
elif H%2 == 1 and W%2 == 1:
print((H*W)//2+1)
else:
print((H*W)//2) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 67 |
hi, wd = map(int, input().split())
# いずれかが1の場合
if hi==1 or wd ==1:
print(0)
exit()
# heightまたはwidthが偶数だった場合
if hi%2 == 0 or wd%2 == 0:
print(hi*wd//2)
else:
print(hi*wd//2 + 1)
|
hi, wd = map(int, input().split())
# いずれかが1の場合
if hi==1 or wd ==1:
print(1)
exit()
# heightまたはwidthが偶数だった場合
if hi%2 == 0 or wd%2 == 0:
print(hi*wd//2)
else:
print(hi*wd//2 + 1)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 67 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t H, W, ans;
cin >> H >> W;
ans = H * W / 2;
if (H * W % 2 == 1) {
ans++;
}
if (H == 1 || W == 1) {
ans = 0;
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t H, W, ans;
cin >> H >> W;
ans = H * W / 2;
if (H * W % 2 == 1) {
ans++;
}
if (H == 1 || W == 1) {
ans = 1;
}
cout << ans << endl;
}
| [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13]] | 1 | 70 |
H,W=map(int,input().split())
if H==1 or W==1:
print(0)
elif H%2==0 and W%2==0:
print((H*W)//2)
elif H%2==1 and W%2==0:
print(H*(W//2))
elif H%2==0 and W%2==1:
print((H//2)*W)
else:
print((H*W)//2+1)
| H,W=map(int,input().split())
if H==1 or W==1:
print(1)
elif H%2==0 and W%2==0:
print((H*W)//2)
elif H%2==1 and W%2==0:
print(H*(W//2))
elif H%2==0 and W%2==1:
print((H//2)*W)
else:
print((H*W)//2+1)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 112 |
h,w=map(int,input().split())
if h==1:
print(1)
elif h*w%2==0:
print(h*w//2)
else:
print(int((h*w+2-1)/2)) | h,w=map(int,input().split())
if h==1or w==1:
print(1)
elif h*w%2==0:
print(h*w//2)
else:
print(int((h*w+2-1)/2)) | [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 61 |
w, h = map(int,input().split())
if w == 1 or h == 1:
print(0)
exit()
if w * h % 2 == 0:
print(w * h // 2)
else:
a = w // 2 + 1
s = a * (h // 2 + 1)
b = w // 2
s2 = b * (h //2)
print(s + s2) | w, h = map(int,input().split())
if w == 1 or h == 1:
print(1)
exit()
if (w * h) % 2 == 0:
print(w * h // 2)
else:
a = w // 2 + 1
s = a * (h // 2 + 1)
b = w // 2
s2 = b * (h //2)
print(s + s2) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 24], ["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 25]] | 5 | 89 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
long h = in.nextLong();
long w = in.nextLong();
if (h == 1 || w == 1) {
System.out.print(1);
System.exit(0);
}
long x = (long)Math.ceil((double)w / 2);
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
long h = in.nextLong();
long w = in.nextLong();
if (h == 1 || w == 1) {
System.out.print(1);
System.exit(0);
}
long x = (long)Math.ceil((double)w / 2);
... | [["-", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22]] | 3 | 177 |
import java.io.*;
import java.math.*;
import java.nio.Buffer;
import java.sql.SQLSyntaxErrorException;
import java.text.*;
import java.util.*;
import java.util.stream.Collectors;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
public class Main {
public static int gcd(int n, int m) { return (m == 0) ? n ... | import java.io.*;
import java.math.*;
import java.nio.Buffer;
import java.sql.SQLSyntaxErrorException;
import java.text.*;
import java.util.*;
import java.util.stream.Collectors;
import javax.swing.plaf.basic.BasicInternalFrameTitlePane;
public class Main {
public static int gcd(int n, int m) { return (m == 0) ? n ... | [["-", 8, 196, 0, 57, 15, 15, 0, 16, 17, 98], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 106]] | 3 | 208 |
import sys
def input():
return sys.stdin.readline()[:-1]
H,W = map(int,input().split(' '))
A = -(-W//2)
if W==1 or H==1:
print(1)
exit()
if H%2==0:
print(W*H//2)
else:
print(A)
print(W*(H-1)//2+A) | import sys
def input():
return sys.stdin.readline()[:-1]
H,W = map(int,input().split(' '))
A = -(-W//2)
if W==1 or H==1:
print(1)
exit()
if H%2==0:
print(W*H//2)
else:
print(W*(H-1)//2+A) | [["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 75, 76, 8, 196, 0, 1, 0, 652, 63, 22], ["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 99 |
h,w = (int(x) for x in input().split())
if h != 1 and w != 1:
num = ((w // 2) + (w % 2))*( (h // 2) + ( h% 2) ) + ((w // 2) + (w % 2)-(w%2))*( (h // 2) + (h%2) -(h%2))
print(num) | h,w = (int(x) for x in input().split())
num = 1
if h != 1 and w != 1:
num = ((w // 2) + (w % 2))*( (h // 2) + ( h% 2) ) + ((w // 2) + (w % 2)-(w%2))*( (h // 2) + (h%2) -(h%2))
print(num) | [["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 612]] | 5 | 102 |
def resolve():
a, b = map(int, input().split())
if a ==1 or b==1:
print(1)
print((a*b+1)//2)
resolve() | def resolve():
a, b = map(int, input().split())
if a ==1 or b==1:
print(1)
exit()
print((a*b+1)//2)
resolve() | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 49 |
h,w=map(int,input().split())
if (h==1 and w!=1) or (h==1 and w!=1):
print(1)
else:
m=h*w
print((m+2-1)//2) | h,w=map(int,input().split())
if (h==1 and w!=1) or (h!=1 and w==1):
print(1)
else:
m=h*w
print((m+2-1)//2) | [["-", 15, 679, 12, 23, 0, 679, 31, 666, 667, 60], ["+", 15, 679, 12, 23, 0, 679, 31, 666, 667, 79], ["-", 15, 679, 12, 23, 0, 679, 12, 666, 667, 79], ["+", 15, 679, 12, 23, 0, 679, 12, 666, 667, 60]] | 5 | 60 |
#include <stdio.h>
int main(void) {
long long h, w, ans;
scanf("%lld %lld", &h, &w);
ans = 0;
ans += h * w / 2;
if (h * w % 2 == 1) {
ans++;
}
if (h == 1 || w == 1) {
printf("1\n");
} else {
printf("%d\n", ans);
}
return 0;
} | #include <stdio.h>
int main(void) {
long long h, w, ans;
scanf("%lld %lld", &h, &w);
ans = 0;
ans += h * w / 2;
if (h * w % 2 == 1) {
ans++;
}
if (h == 1 || w == 1) {
printf("1\n");
} else {
printf("%lld\n", ans);
}
return 0;
} | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 93 |
import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)
H, W = map(int, read().split())
if min(H, W) == 1:
print(0)
elif (H % 2 == 1) & (W % 2 == 1):
print((H * W + 1) // 2)
else:
print(H ... | import sys
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)
H, W = map(int, read().split())
if min(H, W) == 1:
print(1)
elif (H % 2 == 1) & (W % 2 == 1):
print((H * W + 1) // 2)
else:
print(H ... | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 115 |
#include <iostream>
using namespace std;
int main() {
long long h, w;
cin >> h >> w;
// else
if (h == 1)
cout << 1 << endl;
else if (h * w % 2 == 0)
cout << h * w / 2 << endl;
else
cout << (h * w + 1) / 2 << endl;
// cout <<ary[k-1] <<endl;
return 0;
} | #include <iostream>
using namespace std;
int main() {
long long h, w;
cin >> h >> w;
// else
if (h == 1 or w == 1)
cout << 1 << endl;
else if (h * w % 2 == 0)
cout << h * w / 2 << endl;
else
cout << (h * w + 1) / 2 << endl;
// cout <<ary[k-1] <<endl;
return 0;
} | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 354], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 77 |
h,w=map(int,input().split())
if h or w ==1:
print(1)
else:
if h%2==0:
hk=h//2
hg=h//2
else:
hk=h//2+1
hg=h//2
if w%2==0:
wk=w//2
wg=w//2
else:
wk=w//2+1
wg=w//2
print((hk*wk)+(hg*wg)) | h,w=map(int,input().split())
if h ==1 or w==1:
print(1)
else:
if h%2==0:
hk=h//2
hg=h//2
else:
hk=h//2+1
hg=h//2
if w%2==0:
wk=w//2
wg=w//2
else:
wk=w//2+1
wg=w//2
print((hk*wk)+(hg*wg)) | [["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 0, 612]] | 5 | 105 |
h,w = list(map(int,input().split(' ')))
kisuu = (w+1)//2
guusuu = w//2
tate_kisuu = (h+1)//2
tate_guusuu = h//2
res = kisuu*tate_kisuu+guusuu*tate_guusuu
if(h==1)or(w==1):
res = 0
print(res)
| h,w = list(map(int,input().split(' ')))
kisuu = (w+1)//2
guusuu = w//2
tate_kisuu = (h+1)//2
tate_guusuu = h//2
res = kisuu*tate_kisuu+guusuu*tate_guusuu
if(h==1)or(w==1):
res = 1
print(res)
| [["-", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612]] | 5 | 79 |
n, m = map(int, input().split())
if n == 1:
print(1)
else:
r = (n * m) // 2
if (n * m) % 2 == 0:
print(r)
else:
print(r+1)
| n, m = map(int, input().split())
if n == 1 or m == 1:
print(1)
else:
r = (n * m) // 2
if (n * m) % 2 == 0:
print(r)
else:
print(r+1) | [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 59 |
H,W = map(int,input().split())
import sys
a = (W+1)//2+(W//2)
if H == 1 or W == 1:
print(0)
sys.exit()
if H%2 == 0:
print(a*(H//2))
else:
print(a*(H//2)+(W+1)//2) | H,W = map(int,input().split())
import sys
a = (W+1)//2+(W//2)
if H == 1 or W == 1:
print(1)
sys.exit()
if H%2 == 0:
print(a*(H//2))
else:
print(a*(H//2)+(W+1)//2) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 88 |
h, w = input().split()
h = int(h)
w = int(w)
if h == 1 or w == 1:
print(1)
s = h * w
if s % 2:
print(s//2+1)
else:
print(s//2) | h, w = input().split()
h = int(h)
w = int(w)
if h == 1 or w == 1:
print(1)
exit()
s = h * w
if s % 2:
print(s//2+1)
else:
print(s//2) | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 62 |
H, W = map(int, input().split())
ans = 0
if H == 1 or W ==1:
ans = 1
else:
if H % 2 == 0:
ans += (H // 2) * W
else:
ans += (H // 2) * W + (W // 2 + W % 2)
if W % 2 == 0:
ans += (W // 2) * H
else:
ans += (W // 2) * H + (H // 2 + H % 2)
print(ans // 2)
| H, W = map(int, input().split())
ans = 0
if H == 1 or W == 1:
ans = 1
print(ans)
else:
if H % 2 == 0:
ans += (H // 2) * W
else:
ans += (H // 2) * W + (W // 2 + W % 2)
if W % 2 == 0:
ans += (W // 2) * H
else:
ans += (W // 2) * H + (H // 2 + H % 2)
print(ans /... | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 113 |
def main():
h, w = map(int, input().split())
if h == 1:
print(1)
return 0
ans = 0
if w&1:
ans += w * (h//2)
if h % 2 == 1:
ans += (w+1)//2
else:
ans += h*(w//2)
print(ans)
main()
| def main():
h, w = map(int, input().split())
if h == 1 or w == 1:
print(1)
return 0
ans = 0
if w&1:
ans += w * (h//2)
if h % 2 == 1:
ans += (w+1)//2
else:
ans += h*(w//2)
print(ans)
main()
| [["+", 0, 14, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 83 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
/* vector<int> A(N);
vector<pair<int, int> > tasks; #ソートした場合、1つ目でソート
tie(b, a) = p.at(i); #pairを分割
tasks.emplace_back(b, a) #配列tasksの最後に(b,a)を追加
xの二乗: pow(x, 2.0)
小さい順: sort(v.begin... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
/* vector<int> A(N);
vector<pair<int, int> > tasks; #ソートした場合、1つ目でソート
tie(b, a) = p.at(i); #pairを分割
tasks.emplace_back(b, a) #配列tasksの最後に(b,a)を追加
xの二乗: pow(x, 2.0)
小さい順: sort(v.begin... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78]] | 1 | 98 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
using ll = long long;
using P = pair<int, int>;
int main() {
ll h, w;
cin >> h >> w;
ll ans = h * w;
if (h == 1 || w == 1) {
cout << 0 << endl;
return 0;
}
if (ans % 2... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
#define all(v) (v).begin(), (v).end()
using ll = long long;
using P = pair<int, int>;
int main() {
ll h, w;
cin >> h >> w;
ll ans = h * w;
if (h == 1 || w == 1) {
cout << 1 << endl;
return 0;
}
if (ans % 2... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 117 |
h, w = map(int, input().split())
if h == 1 or w == 1:
print(0)
elif h % 2 == 1 and w % 2 == 1:
print(h * w // 2 + 1)
else:
print(h * w // 2)
| h, w = map(int, input().split())
if h == 1 or w == 1:
print(1)
elif h % 2 == 1 and w % 2 == 1:
print(h * w // 2 + 1)
else:
print(h * w // 2)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 62 |
H, W = map(int, input().split())
if H == 1 or W == 1:
print('1')
a = H // 2 + H % 2
if H % 2 == 0:
b = a * W
print(b)
else:
b = a * (W // 2 + W % 2) + (a - 1) * (W // 2)
print(b) | H, W = map(int, input().split())
if H == 1 or W == 1:
print('1')
else:
a = H // 2 + H % 2
if H % 2 == 0:
b = a * W
print(b)
else:
b = a * (W // 2 + W % 2) + (a - 1) * (W // 2)
print(b) | [["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 95], ["+", 36, 36, 0, 656, 0, 57, 75, 76, 0, 102]] | 5 | 87 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int h = Integer.parseInt(scan.next());
int w = Integer.parseInt(scan.next());
scan.close();
if (h == 1 || w == 1) {
System.out.println(1);
} else if (h * w %... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
long h = Long.parseLong(scan.next());
long w = Long.parseLong(scan.next());
scan.close();
if (h == 1 || w == 1) {
System.out.println(1);
} else if (h * w % 2... | [["-", 0, 195, 8, 196, 0, 503, 39, 506, 0, 507], ["+", 0, 195, 8, 196, 0, 503, 39, 506, 0, 96], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 500, 22], ["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22]] | 3 | 134 |
n,m = map(int,input().split())
ans = n*m
if n == 1 or m == 1:
print('1')
elif ans%2 ==0:
ans=ans//2
else:
ans=ans//2
ans+=1
print(ans)
| n,m = map(int,input().split())
ans = n*m
if n == 1 or m == 1:
print('1')
elif ans%2 ==0:
ans=ans//2
print(ans)
else:
ans=ans//2
ans+=1
print(ans)
| [["+", 75, 665, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 62 |
h, w = map(int, input().split())
if w == 1 or h == 1:
print(1)
if w % 2 == 1 and h % 2 == 1:
print(w * h // 2 + 1)
else:
print(w * h // 2)
| h, w = map(int, input().split())
if w == 1 or h == 1:
print(1)
exit(0)
if w % 2 == 1 and h % 2 == 1:
print(w * h // 2 + 1)
else:
print(w * h // 2)
| [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 62 |
H, W = map(int,input().split())
if H != 0 and W != 0:
print( ((W+1)//2) * ((H+1)//2) + ((W//2) * (H//2)))
else:
print(1) | H, W = map(int,input().split())
if H != 1 and W != 1:
print( ((W+1)//2) * ((H+1)//2) + ((W//2) * (H//2)))
else:
print(1) | [["-", 0, 656, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 0, 612], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 67 |
h,w = gets.split(' ').map(&:to_i)
res = h*w
if h == 1 || w == 1
puts 0
exit
end
puts res.even? ? res/2 : res/2+1 | h,w = gets.split(' ').map(&:to_i)
res = h*w
if h == 1 || w == 1
puts 1
exit
end
puts res.even? ? res/2 : res/2+1 | [["-", 0, 121, 64, 749, 0, 652, 3, 4, 0, 612], ["+", 0, 121, 64, 749, 0, 652, 3, 4, 0, 612]] | 4 | 49 |
#define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <ccomplex>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <tuple>
#i... | #define _CRT_SECURE_NO_WARNINGS
#define _USE_MATH_DEFINES
#include <algorithm>
#include <ccomplex>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <set>
#include <sstream>
#include <tuple>
#i... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 236 |
h, w = map(int, input().split())
ans = 0
ans += (h // 2) * (w // 2) * 2
if h % 2 != 0:
ans += w // 2
if w % 2 != 0:
ans += h // 2
if h % 2 != 0 and w % 2 != 0:
ans += 1
if h == 1 or w == 1:
ans = 0
print(ans) | h, w = map(int, input().split())
ans = 0
ans += (h // 2) * (w // 2) * 2
if h % 2 != 0:
ans += w // 2
if w % 2 != 0:
ans += h // 2
if h % 2 != 0 and w % 2 != 0:
ans += 1
if h == 1 or w == 1:
ans = 1
print(ans) | [["-", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612]] | 5 | 90 |
import math
H, W = map(int, input().split())
if H == 1 or W == 1:
print("1")
else:
print(math.ceil(W / 2) * math.ceil(H / 2) + W // 2 * H // 2) | import math
H, W = map(int, input().split())
if H == 1 or W == 1:
print("1")
else:
print(math.ceil(W / 2) * math.ceil(H / 2) + (W // 2) * (H // 2)) | [["+", 3, 4, 0, 657, 12, 657, 31, 23, 0, 24], ["+", 3, 4, 0, 657, 12, 657, 31, 23, 0, 25], ["+", 3, 4, 0, 657, 12, 657, 12, 23, 0, 24], ["+", 3, 4, 0, 657, 12, 657, 12, 23, 0, 25]] | 5 | 63 |
#!/usr/bin/env python
def main():
h, w = map(int, input().split())
hw = h * w
if h == 1 or w == 1:
print(0)
else:
if hw % 2 == 0:
print(hw // 2)
else:
print(hw // 2 + 1)
if __name__ == '__main__':
main()
| #!/usr/bin/env python
def main():
h, w = map(int, input().split())
hw = h * w
if h == 1 or w == 1:
print(1)
else:
if hw % 2 == 0:
print(hw // 2)
else:
print(hw // 2 + 1)
if __name__ == '__main__':
main()
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 75 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int lo;
lo w, h;
int main() {
cin >> w >> h;
if (w == 1 or h == 1)
cout << 1;
else
cout << ceil(((long double)(w * h)) / 2);
}
// g++ code.cpp -o code.exe
// code.exe | #include <bits/stdc++.h>
using namespace std;
typedef long long int lo;
lo w, h;
int main() {
cin >> w >> h;
if (w == 1 or h == 1)
cout << 1;
else
cout << (lo)ceil(((long double)(w * h)) / 2);
}
// g++ code.cpp -o code.exe
// code.exe | [["+", 75, 76, 0, 1, 0, 16, 12, 74, 0, 24], ["+", 0, 1, 0, 16, 12, 74, 39, 77, 39, 78], ["+", 75, 76, 0, 1, 0, 16, 12, 74, 0, 25]] | 1 | 65 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const int iinf = 1 << 28;
const long long llinf = 1ll << 60;
const double PI = 3.14159265;
void work() {
ll h, w;
cin >> h >> w;
if (h != 1LL || w != 1)
cout << ((h * w) >> 1) + ((h * w) & 1LL) << endl;
else
cou... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const ll MOD = 1e9 + 7;
const int iinf = 1 << 28;
const long long llinf = 1ll << 60;
const double PI = 3.14159265;
void work() {
ll h, w;
cin >> h >> w;
if (h != 1LL && w != 1)
cout << ((h * w) >> 1) + ((h * w) & 1LL) << endl;
else
cou... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 135 |
# B - Bishop
def main():
H, W = map(int, input().split())
if min(H, W) == 1:
print(0)
else:
ans = (H * W + 1) // 2
print(ans)
if __name__ == "__main__":
main()
| # B - Bishop
def main():
H, W = map(int, input().split())
if min(H, W) == 1:
print(1)
else:
ans = (H * W + 1) // 2
print(ans)
if __name__ == "__main__":
main()
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 63 |
import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))
H, W = input_nums()
horizontal = 0
ans = 0
if W % 2 == 0:
horizontal = W // 2
ans = horizontal * H
else:
horizontal = W // 2 + 1
if H % 2 == 0:
ans = ((horizontal * 2) - 1) * (H // 2)... | import sys
input = lambda: sys.stdin.readline().rstrip()
input_nums = lambda: list(map(int, input().split()))
H, W = input_nums()
horizontal = 0
ans = 0
if W % 2 == 0:
horizontal = W // 2
ans = horizontal * H
else:
horizontal = W // 2 + 1
if H % 2 == 0:
ans = ((horizontal * 2) - 1) * (H // 2)... | [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 138 |
def solve():
h, w = list(map(int, input().split()))
if w == 1 or h == 1:
print(0)
return
_odd = ((w + 1) // 2) * ((h + 1) // 2)
_even = (w // 2) * (h // 2)
print(_odd + _even)
if __name__ == "__main__":
solve() | def solve():
h, w = list(map(int, input().split()))
if w == 1 or h == 1:
print(1)
return
_odd = ((w + 1) // 2) * ((h + 1) // 2)
_even = (w // 2) * (h // 2)
print(_odd + _even)
if __name__ == "__main__":
solve() | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 88 |
h, w = map(int, input().split())
if h == 1 and w == 1:
print(1)
else:
import math
h_odds = math.ceil(h / 2)
h_evens = h // 2
w_odds = math.ceil(w / 2)
w_evens = w // 2
print(h_odds * w_evens + h_evens * w_odds)
| h, w = map(int, input().split())
if h == 1 or w == 1:
print(1)
else:
import math
h_odds = math.ceil(h / 2)
h_evens = h // 2
w_odds = math.ceil(w / 2)
w_evens = w // 2
print(h_odds * w_odds + h_evens * w_evens)
| [["-", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["-", 0, 652, 3, 4, 0, 657, 31, 657, 12, 22], ["+", 0, 652, 3, 4, 0, 657, 31, 657, 12, 22], ["-", 0, 652, 3, 4, 0, 657, 12, 657, 12, 22], ["+", 0, 652, 3, 4, 0, 657, 12, 657, 12, 22]] | 5 | 73 |
h,w=map(int,input('').split(' '))
masu=0
masu=masu+(w*(h//2))
if h%2==1:
if w%2==1:
masu=masu+(w//2)+1
else:
masu=masu+(w//2)
if h==1 and w==1:
masu=0
print(masu) | h,w=map(int,input('').split(' '))
masu=0
masu=masu+(w*(h//2))
if h%2==1:
if w%2==1:
masu=masu+(w//2)+1
else:
masu=masu+(w//2)
if h==1 or w==1:
masu=1
print(masu) | [["-", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["-", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 12, 612]] | 5 | 89 |
import sys
stdin = sys.stdin
from itertools import accumulate, groupby
mod = 10**9 + 7
def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))
H, W = na()
if H == 1 or W == 1:
print(1)
if H % 2 != 0 and W % 2 != 0:
print(H * W // 2 + 1)
... | import sys
stdin = sys.stdin
from itertools import accumulate, groupby
mod = 10**9 + 7
def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))
H, W = na()
if H == 1 or W == 1:
print(1)
elif H % 2 != 0 and W % 2 != 0:
print(H * W // 2 + 1... | [["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["+", 36, 36, 0, 656, 0, 57, 75, 665, 0, 683]] | 5 | 123 |
h, w = list(map(int, input().split()))
if h != 1 or w != 1:
print((h * w + 1) // 2)
else:
print(1)
| h, w = list(map(int, input().split()))
if h != 1 and w != 1:
print((h * w + 1) // 2)
else:
print(1)
| [["-", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355]] | 5 | 46 |
def submit():
h, w = map(int, input().split())
if h == 1 or w == 1:
print(1)
even_c = sum(divmod(w, 2))
odd_c = w // 2
even_row = sum(divmod(h, 2)) * even_c
odd_row = (h // 2) * odd_c
print(even_row + odd_row)
if __name__ == "__main__":
submit()
|
def submit():
h, w = map(int, input().split())
if h == 1 or w == 1:
print(1)
return
even_c = sum(divmod(w, 2))
odd_c = w // 2
even_row = sum(divmod(h, 2)) * even_c
odd_row = (h // 2) * odd_c
print(even_row + odd_row)
if __name__ == "__main__":
submit()
| [["+", 8, 196, 0, 57, 64, 196, 0, 37, 0, 38]] | 5 | 88 |
H, W = map(int, input().split())
if H == 1 or W == 1:
print(1)
exit()
if H % 2 == 0 or W % 2 == 0:
print(H * W / 2)
else:
print(H * (W // 2) + H // 2 + 1)
| H, W = map(int, input().split())
if H == 1 or W == 1:
print(1)
exit()
if H % 2 == 0 or W % 2 == 0:
print(H * W // 2)
else:
print(H * (W // 2) + H // 2 + 1)
| [["-", 0, 1, 0, 652, 3, 4, 0, 657, 17, 85], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 676]] | 5 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long h, w, ans(0);
cin >> h >> w;
if ((h * w) % 2 == 1)
ans++;
ans += (h * w) / 2;
if (h == 1 || w == 1)
ans = 0;
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long h, w, ans(0);
cin >> h >> w;
if ((h * w) % 2 == 1)
ans++;
ans += (h * w) / 2;
if (h == 1 || w == 1)
ans = 1;
cout << ans << endl;
} | [["-", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13], ["+", 8, 9, 0, 57, 64, 1, 0, 11, 12, 13]] | 1 | 73 |
#include <iostream>
using namespace std;
int main() {
int H, W;
cin >> H >> W;
if (H == 1 || W == 1) {
cout << 1 << endl;
} else {
int ans = H * W % 2 ? (H * W + 1) / 2 : H * W / 2;
cout << ans << endl;
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
long long H, W;
cin >> H >> W;
if (H == 1 || W == 1) {
cout << 1 << endl;
} else {
long long ans = H * W % 2 ? (H * W + 1) / 2 : H * W / 2;
cout << ans << endl;
}
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 57, 75, 76, 0, 9, 0, 43, 39, 40], ["+", 75, 76, 0, 9, 0, 43, 39, 86, 0, 96]] | 1 | 78 |
h,w=map(int,input().split())
if(h!=1 and w!=1):
print((h*w+1)//2)
else:
print(0) | h,w=map(int,input().split())
if(h!=1 and w!=1):
print((h*w+1)//2)
else:
print(1) | [["-", 8, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 45 |
H, W = map(int, input().split())
if H == 1 or W == 1:
print(0)
elif (H * W) % 2 == 0:
print((H * W) // 2)
else:
print((H * W) // 2 + 1)
| H, W = map(int, input().split())
if H == 1 or W == 1:
print(1)
elif (H * W) % 2 == 0:
print((H * W) // 2)
else:
print((H * W) // 2 + 1)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 64 |
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (int i = 0; i... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return 1;
}
return 0;
}
#define rep(i, n) for (int i = 0; i... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]] | 1 | 210 |
from sys import stdin
def main():
input = stdin.readline
H,W = map(int,input().split())
ans = H * W
if H == 1 or W == 1:
print("0")
elif ans % 2 == 0:
print(ans//2)
else:
print(ans//2+1)
if __name__ == "__main__":
main() | from sys import stdin
def main():
input = stdin.readline
H,W = map(int,input().split())
ans = H * W
if H == 1 or W == 1:
print("1")
elif ans % 2 == 0:
print(ans//2)
else:
print(ans//2+1)
if __name__ == "__main__":
main() | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 83 |
h, w = gets.split(" ").map(&:to_i)
if h == 1 || w == 1
puts 0
else
puts (h * w + 1) / 2
end | h, w = gets.split(" ").map(&:to_i)
if h == 1 || w == 1
puts 1
else
puts (h * w + 1) / 2
end | [["-", 0, 121, 64, 749, 0, 652, 3, 4, 0, 612], ["+", 0, 121, 64, 749, 0, 652, 3, 4, 0, 612]] | 4 | 40 |
h, w = [int(i) for i in input().split()]
if h == 1 or w == 1:
print(1)
a = (h + 1) // 2
b = h // 2
c = (w + 1) // 2
d = w // 2
print(a*c+b*d) | h, w = [int(i) for i in input().split()]
if h == 1 or w == 1:
print(1)
exit()
a = (h + 1) // 2
b = h // 2
c = (w + 1) // 2
d = w // 2
print(a*c+b*d) | [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 71 |
H,W=map(int,input().split())
if H==1 or W==1:
print(0)
exit(0)
if W%2==0:
w=W//2
ans=w*H
else:
w=W//2 + 1
ans=w*H
ans-=H//2
print(ans) | H,W=map(int,input().split())
if H==1 or W==1:
print(1)
exit(0)
if W%2==0:
w=W//2
ans=w*H
else:
w=W//2 + 1
ans=w*H
ans-=H//2
print(ans) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 73 |
a=input().split(" ")
b=int(a[0])*int(a[1])
if int(a[0])==1 or int(a[1])==1:
print(0)
else:
if b%2==0:
print(b//2)
else:
print(b//2+1) | a=input().split(" ")
b=int(a[0])*int(a[1])
if int(a[0])==1 or int(a[1])==1:
print(1)
else:
if b%2==0:
print(b//2)
else:
print(b//2+1) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 79 |
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) begin(v), end(v)
#define fi first
#define se second
template <typename A, typename B> inline bool chmax(A &a, B b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
... | #include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, b) for (int i = (a); i < (b); ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(v) begin(v), end(v)
#define fi first
#define se second
template <typename A, typename B> inline bool chmax(A &a, B b) {
if (a < b) {
a = b;
return 1;
}
return 0;
}
... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 233 |
h,w = map(int,input().split())
oneloop = w
rest = (w-w//2)
if h == 1:
print(1)
else:
if h%2 == 0:
print(oneloop*(h//2))
else:
print(oneloop*(h//2)+rest)
| h,w = map(int,input().split())
oneloop = w
rest = (w-w//2)
if h == 1 or w == 1:
print(1)
else:
if h%2 == 0:
print(oneloop*(h//2))
else:
print(oneloop*(h//2)+rest)
| [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 70 |
def inpl():
return list(map(int, input().split()))
HW = inpl()
HW.sort()
if HW[0] == 1:
print(1)
exit()
print(HW[0] * HW[1] // 2 + int(H[0] % 2 == 1 and H[1] % 2 == 1))
| def inpl():
return list(map(int, input().split()))
HW = inpl()
HW.sort()
if HW[0] == 1:
print(1)
exit()
print(HW[0] * HW[1] // 2 + int(HW[0] % 2 == 1 and HW[1] % 2 == 1))
| [["-", 0, 679, 31, 666, 0, 657, 31, 206, 51, 22], ["+", 0, 679, 31, 666, 0, 657, 31, 206, 51, 22], ["-", 0, 679, 12, 666, 0, 657, 31, 206, 51, 22], ["+", 0, 679, 12, 666, 0, 657, 31, 206, 51, 22]] | 5 | 81 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int i, j;
ll h, w;
cin >> h >> w;
if (h == 1) {
cout << 1 << endl;
return 0;
}
ll ans = 0;
if (w % 2 == 0) {
ans = w * h / 2;
} else {
if (h % 2 == 0) {
ans = w * h / 2;
} else {
ans = w * ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int i, j;
ll h, w;
cin >> h >> w;
if (h == 1 || w == 1) {
cout << 1 << endl;
return 0;
}
ll ans = 0;
if (w % 2 == 0) {
ans = w * h / 2;
} else {
if (h % 2 == 0) {
ans = w * h / 2;
} else {
... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 126 |
a = list(map(int, input().split()))
k = a[0] * a[1]
if a[0]==1 or a[1] ==1:
print(0)
elif k % 2 == 0:
print(k//2)
else:
print((k // 2) + 1) | a = list(map(int, input().split()))
k = a[0] * a[1]
if a[0]==1 or a[1] ==1:
print(1)
elif k % 2 == 0:
print(k//2)
else:
print((k // 2) + 1) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 72 |
def div_ceil(x, y): return (x + y - 1) // y
H, W = map(int, input().split())
ans = div_ceil(W, 2) * div_ceil(H, 2) + (W // 2) * (H // 2)
print(ans if H != 1 and W != 1 else 0) | def div_ceil(x, y): return (x + y - 1) // y
H, W = map(int, input().split())
ans = div_ceil(W, 2) * div_ceil(H, 2) + (W // 2) * (H // 2)
print(ans if H != 1 and W != 1 else 1) | [["-", 0, 1, 0, 652, 3, 4, 0, 41, 0, 612], ["+", 0, 1, 0, 652, 3, 4, 0, 41, 0, 612]] | 5 | 75 |
main() {
long long a, b;
scanf("%lld%lld", &a, &b);
printf("%lld\n", (~a ^ 1 || ~b ^ 1) ? 1 : (a * b + 1) >> 1);
} | main() {
long long a, b;
scanf("%lld%lld", &a, &b);
printf("%lld\n", (a == 1 || b == 1) ? 1 : (a * b + 1) >> 1);
} | [["-", 15, 23, 0, 16, 31, 16, 31, 91, 17, 92], ["-", 0, 41, 15, 23, 0, 16, 31, 16, 17, 140], ["+", 0, 41, 15, 23, 0, 16, 31, 16, 17, 60], ["-", 15, 23, 0, 16, 12, 16, 31, 91, 17, 92], ["-", 0, 41, 15, 23, 0, 16, 12, 16, 17, 140], ["+", 0, 41, 15, 23, 0, 16, 12, 16, 17, 60]] | 0 | 56 |
h, w = map(int,input().split())
if h == w == 1:
print(1)
elif h%2 == 1 and w % 2 ==1:
print(h*w // 2 + 1)
else:
print(h*w // 2 ) | h, w = map(int,input().split())
if h == 1 or w == 1:
print(1)
elif h%2 == 1 and w % 2 ==1:
print(h*w // 2 + 1)
else:
print(h*w // 2 ) | [["+", 0, 656, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354]] | 5 | 60 |
h, w = map(int, input().split())
if h == 1:
print(0)
elif w == 1:
print(0)
elif (h * w) % 2 == 0:
print(h*w//2)
else:
print((h*w+1)//2)
| h, w = map(int, input().split())
if h == 1:
print(1)
elif w == 1:
print(1)
elif (h * w) % 2 == 0:
print(h*w//2)
else:
print((h*w+1)//2)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 67 |
import sys
# S = input()
# N, M = map(int, input().split())
# nums = list(map(int, input().split()))
# nums_2d = [list(map(int, input().split())) for _ in range(N)]
def main():
print(solve())
def solve():
h, w = map(int, input().split())
if h == 1 or w == 1:
return 0
return ((h * w) + 1) ... | import sys
# S = input()
# N, M = map(int, input().split())
# nums = list(map(int, input().split()))
# nums_2d = [list(map(int, input().split())) for _ in range(N)]
def main():
print(solve())
def solve():
h, w = map(int, input().split())
if h == 1 or w == 1:
return 1
return ((h * w) + 1) ... | [["-", 8, 196, 0, 57, 64, 196, 0, 37, 0, 612], ["+", 8, 196, 0, 57, 64, 196, 0, 37, 0, 612]] | 5 | 71 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++)
#define RFOR(i, a, n) for (ll i = (ll)n - 1; i >= (ll)a; i--)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) RFOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define bra(first, second) '(' << fi... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; i++)
#define RFOR(i, a, n) for (ll i = (ll)n - 1; i >= (ll)a; i--)
#define rep(i, n) FOR(i, 0, n)
#define rrep(i, n) RFOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define bra(first, second) '(' << fi... | [["-", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13], ["+", 64, 9, 0, 1, 0, 16, 31, 16, 12, 13]] | 1 | 213 |
H, W = map(int, input().split())
if min(H, W) == 1 :
print(1)
if (H*W)%2 == 0 :
print((H*W)//2)
else :
print((H*W)//2 + 1)
| H, W = map(int, input().split())
if min(H, W) == 1 :
print(1)
exit()
if (H*W)%2 == 0 :
print((H*W)//2)
else :
print((H*W)//2 + 1)
| [["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 65 |
i = list(map(int, input().split()))
H=i[0]
W=i[1]
x=H*W
if H==1 or W==1:
print(0)
elif x%2==0:
print(x//2)
else:
print((x+1)//2) | i = list(map(int, input().split()))
H=i[0]
W=i[1]
x=H*W
if H==1 or W==1:
print(1)
elif x%2==0:
print(x//2)
else:
print((x+1)//2) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 72 |
import sys
input=lambda: sys.stdin.readline().rstrip()
h,w=map(int,input().split())
ans=((h+1)//2+h//2)*(w//2)
if w%2==1:
ans+=(h+1)//2
if h==1 or w==1:
ans=1
peint(ans) | import sys
input=lambda: sys.stdin.readline().rstrip()
h,w=map(int,input().split())
ans=((h+1)//2+h//2)*(w//2)
if w%2==1:
ans+=(h+1)//2
if h==1 or w==1:
ans=1
print(ans)
| [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22]] | 5 | 86 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long H, W;
cin >> H >> W;
if (H == 1 || W == 1)
cout << "0";
else
cout << (((H % 2) && (W % 2)) ? (H * W + 1) / 2 : H * W / 2);
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long H, W;
cin >> H >> W;
if (H == 1 || W == 1)
cout << "1";
else
cout << (((H % 2) && (W % 2)) ? (H * W + 1) / 2 : H * W / 2);
}
| [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]] | 1 | 74 |
typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll h, w;
std::cin >> h >> w;
if (h == 1 || w == 1) {
std::cout << 1 << std::endl;
return 0;
}
if (h % 2 == 0 || w % 2 == 0) {
std::cout << h / 2 * w << std::endl;
} else {
std::cout << (h - 1) / 2 * (w - 1) + (h... | typedef long long ll;
#include <bits/stdc++.h>
using namespace std;
int main() {
ll h, w;
std::cin >> h >> w;
if (h == 1 || w == 1) {
std::cout << 1 << std::endl;
return 0;
}
if (h % 2 == 0 || w % 2 == 0) {
std::cout << h * w / 2 << std::endl;
} else {
std::cout << (h - 1) / 2 * (w - 1) + (h... | [["-", 0, 16, 31, 16, 12, 16, 31, 16, 17, 85], ["-", 0, 16, 31, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 85], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 128 |
# -*- coding: utf-8 -*-
#整数値龍力 複数の入力
def input_multiple_number():
return map(int, input().split())
h,w = input_multiple_number()
if h == 1 or w == 1:
print(0)
else:
print((h*w+1)//2)
| # -*- coding: utf-8 -*-
#整数値龍力 複数の入力
def input_multiple_number():
return map(int, input().split())
h,w = input_multiple_number()
if h == 1 or w == 1:
print(1)
else:
print((h*w+1)//2)
| [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 54 |
import sys
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(100000)
def read_values():
return map(int, input().split())
def read_index():
return map(lambda x: x - 1, map(int, input().split()))
def read_list():
return list(read_values())
def read_lists(N):
return [read_list() for... | import sys
import itertools
input = sys.stdin.readline
sys.setrecursionlimit(100000)
def read_values():
return map(int, input().split())
def read_index():
return map(lambda x: x - 1, map(int, input().split()))
def read_list():
return list(read_values())
def read_lists(N):
return [read_list() for... | [["+", 0, 14, 8, 196, 0, 57, 75, 76, 0, 95], ["+", 0, 14, 8, 196, 0, 57, 75, 76, 0, 102]] | 5 | 189 |
h,w=map(int,input().split())
if h==1 or w==1:
print(0)
exit()
print(-(-h*w//2)) | h,w=map(int,input().split())
if h==1 or w==1:
print(1)
exit()
print(-(-h*w//2)) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 44 |
import sys
input = lambda: sys.stdin.readline().rstrip()
H,W = map(int, input().split())
if H == 1 or W == 1:
print(0)
exit()
if H*W % 2 == 0:
print(H*W // 2)
else:
print((H*W+1) // 2) | import sys
input = lambda: sys.stdin.readline().rstrip()
H,W = map(int, input().split())
if H == 1 or W == 1:
print(1)
exit()
if H*W % 2 == 0:
print(H*W // 2)
else:
print((H*W+1) // 2) | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 612]] | 5 | 80 |
#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
//#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, n) for (ll i = 0; i < (n); ++i)
// typedef pair<ll, ll> P;
typedef pair<ll, ll> P;
const ll IN... | #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846;
typedef long long ll;
const double EPS = 1e-9;
//#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep(i, n) for (ll i = 0; i < (n); ++i)
// typedef pair<ll, ll> P;
typedef pair<ll, ll> P;
const ll IN... | [["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 48], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 51, 16, 31, 16, 31, 16, 31, 16, 17, 33]] | 1 | 341 |
#include <bits/stdc++.h>
#include <cmath>
const double PI = 3.14159265358979323846;
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
// typedef pair<ll, ll> P;
typedef pair<ll, int> P;
const ll INF = 1e15;
#define cmin(x, y) x = min(x, y)
#define cmax(... | #include <bits/stdc++.h>
#include <cmath>
const double PI = 3.14159265358979323846;
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
#define rep(i, n) for (int i = 0; i < (n); ++i)
// typedef pair<ll, ll> P;
typedef pair<ll, int> P;
const ll INF = 1e15;
#define cmin(x, y) x = min(x, y)
#define cmax(... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 31, 16, 31, 16, 31, 16, 12, 16, 12, 22]] | 1 | 349 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using vi = vector<int>;
using Graph = vector<vi>;
using P = pair<int, int>;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const ll LINF = (ll)1e18;
int main() {
ll a, b, c;
cin >> a >>... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using ll = long long;
using vi = vector<int>;
using Graph = vector<vi>;
using P = pair<int, int>;
const int MOD = (int)1e9 + 7;
const int INF = (int)1e9;
const ll LINF = (ll)1e18;
int main() {
ll a, b, c;
cin >> a >>... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 220 |
<?php
fscanf(STDIN,"%d %d %d", $a, $b, $c);
if ($c-($a+$b)){
if (4*$a*$b - ($c-$a-$b)*($c-$a-$b) < 0){
echo "Yes\n";
} else {
echo "No\n";
}
} else {
echo "No\n";
}
| <?php
fscanf(STDIN,"%d %d %d", $a, $b, $c);
if ($c-($a+$b) > 0){
if (4*$a*$b - ($c-$a-$b)*($c-$a-$b) < 0){
echo "Yes\n";
} else {
echo "No\n";
}
} else {
echo "No\n";
}
| [["+", 0, 493, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 0, 493, 0, 57, 15, 23, 0, 16, 12, 612]] | 6 | 94 |
#include <iostream>
#include <math.h>
using namespace std;
int main() {
long long int a;
long long int b;
long long int c;
cin >> a >> b >> c;
if (a + b > c) {
cout << "Yes";
} else {
c -= a + b;
if (c * c > a * b * 4) {
cout << "Yes";
} else {
cout << "No";
}
}
retur... | #include <iostream>
#include <math.h>
using namespace std;
int main() {
long long int a;
long long int b;
long long int c;
cin >> a >> b >> c;
if (a + b > c) {
cout << "No";
} else {
c -= a + b;
if (c * c > a * b * 4) {
cout << "Yes";
} else {
cout << "No";
}
}
return... | [["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 94 |
#include <cmath>
#include <iostream>
bool solve(int a, int b, int c) {
int64_t cur = c - a - b;
return (int64_t)4 * a * b < cur * cur;
}
int main() {
int a, b, c;
std::cin >> a >> b >> c;
if (solve(a, b, c))
std::cout << "Yes" << std::endl;
else
std::cout << "No" << std::endl;
return 0;
}
| #include <cmath>
#include <iostream>
bool solve(int a, int b, int c) {
int64_t cur = c - a - b;
return cur > 0 && ((int64_t)4 * a * b < cur * cur);
}
int main() {
int a, b, c;
std::cin >> a >> b >> c;
if (solve(a, b, c))
std::cout << "Yes" << std::endl;
else
std::cout << "No" << std::endl;
retur... | [["+", 8, 9, 0, 37, 0, 16, 31, 16, 31, 22], ["+", 8, 9, 0, 37, 0, 16, 31, 16, 17, 47], ["+", 8, 9, 0, 37, 0, 16, 31, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 37, 0, 16, 17, 98], ["+", 8, 9, 0, 37, 0, 16, 12, 23, 0, 24], ["+", 8, 9, 0, 37, 0, 16, 12, 23, 0, 25]] | 1 | 103 |
#include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <assert.h>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric... | #include <algorithm>
#include <iostream>
#include <string>
#include <vector>
#define _USE_MATH_DEFINES
#include <assert.h>
#include <bitset>
#include <cmath>
#include <deque>
#include <functional>
#include <iomanip>
#include <iterator>
#include <limits>
#include <list>
#include <map>
#include <math.h>
#include <numeric... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 85], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 0, 41, 15, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 41, 15, 16, 31, 16, 31, 16, 17, 48]] | 1 | 1,250 |
#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimization_level 3
using ll = long long;
constexpr ll INF = 1'010'000'000'000'000'017LL;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
int main() {
ll a, b, c;
cin >> a >> b >> c;
// if (sqrt(a)+sqrt(b)<sqrt(c))... | #include <bits/stdc++.h>
using namespace std;
#pragma GCC optimization_level 3
using ll = long long;
constexpr ll INF = 1'010'000'000'000'000'017LL;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
int main() {
ll a, b, c;
cin >> a >> b >> c;
// if (sqrt(a)+sqrt(b)<sqrt(c))... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 72], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 135 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define ll long long
#define LINF 0x3f3... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define ll long long
#define LINF 0x3f3... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 205 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.