Problem:


Score : 100 points

Problem Statement

X and A are integers between 0 and 9 (inclusive).

If X is less than A, print 0; if X is not less than A, print 10.

Constraints

0 \leq X, A \leq 9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

X A

Output

If X is less than A, print 0; if X is not less than A, print 10.

Sample Input 1

3 5

Sample Output 1

0

3 is less than 5, so we should print 0.

Sample Input 2

7 5

Sample Output 2

10

7 is not less than 5, so we should print 10.

Sample Input 3

6 6

Sample Output 3

10

6 is not less than 6, so we should print 10.



Sample input:
3 5


Sample output:
0

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
a = list(map(int, input().split()))

b = [0]
tmp = 0
for i in a:
    tmp += i
    b.append(tmp)
    
def f(l, k):
    if len(l) == 1:
        return 1

    pivot = len(l) // 2
    if l[pivot] < k:
        return pivot + f(l[pivot:], k)

    elif l[pivot] > k:
        return f(l[:pivot], k)

    return pivot

count = 0
for i in range(len(b)):
    if b[-1] - b[i] < K:
        continue
    else:
        index = f(b[i:], b[i] + K) + 1
        tmp = len(b[i:]) - index + 1
        if tmp > 0:
            count += tmp
print(count)

Submission status: Runtime Error

Solution code:
x, a = map(int, input().split())
if s < a:
    print(0)
else:
    print(10)

Submission status: Runtime Error

Solution code:
X, A = map(int,input().split())

if X < A:
    print(0)
else:
    pritnt(10)

Submission status: Runtime Error

Solution code:
a, b = map(int, input().split())
if a[0] < b[1] :
  print (0)
else:
  print (10)

Submission status: Runtime Error

Solution code:
inp = map(int, input().split())
if inp[0] < inp[1] :
  print (0)
else:
  print (10)

Submission status: Runtime Error

Solution code:
inp = map(int, input().split())
if (inp[0] < inp[1]) :
  print 0
else:
  print 10

Submission status: Runtime Error

Solution code:
X = int(input('Enter X:'))
A = int(input('Enter A:'))
 
if X < A:
  print(0)
elif X > A:
  print(10)

Submission status: Runtime Error

Solution code:
X=int(input("1st no.:"))
A=int(input("2nd no.:"))
if X<A:
  print("0")
else:
  print("10")

Submission status: Runtime Error

Solution code:
N,X = map(int, input().split())
L = list(map(int, input().split()))

l = []
cnt = 0
l.append(int(0))
for i in range(N):
  l.append(l[i]+L[i])
  if l[i] <= X:
    cnt += 1
if l[-1] <= X:
  cnt += 1
print(l)
print(cnt)

Submission status: Runtime Error

Solution code:
x, a = map(int, input())
if 0 < x < a:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
x, a = map(int, input())
if 0 < a < x:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
y = [int(z) for z in input().split()]
l = [int(z) for z in input().split()]
d = [0]*(y[0]+1)
c = 0
for i in range(1,y[0]+1):
      d[i] = d[i-1]+l[i-1]
      if (d[i]<=y[1]):
            c+=1
print(c)

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;

int X;
int A;

int main(){
  cin >> X >> A;
  if(X >= A){
    cout << "10";
  }
  else if(X < A){
    cout << "0";
  }
}

Submission status: Runtime Error

Solution code:
d = list(map(int, d.split()))
if d[0] < d[1]:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
x,a=map(int, input.split())
print('10' if x>=a else '0')

Submission status: Runtime Error

Solution code:
x,a=map(int, input.split())
print(10 if x>=a else 0)

Submission status: Runtime Error

Solution code:
x,a = map(int,input().split())
print([0,10][x//a])

Submission status: Runtime Error

Solution code:
x,a=map(int,input().split())
if X<a:
  print(0)
  else:print(10)

Submission status: Runtime Error

Solution code:
x,a = map(int, input().split())

if x < a:
    print(0)
else
    print(10)

Submission status: Runtime Error

Solution code:
count=0
a=0
n,x = map(int,input().split())
li = list(map(int,input().split()))
for i in range(n):
    if (a<=x):
        a=a+li[i]
        count+=1
print(count)

Submission status: Runtime Error

Solution code:
w,h, x,y = map(int,input().split())
ans = w*h/2
if w%2==0 and h%2==0:
    if w//2==x and h//2==y:
        print(ans, 1)
    else:
        print(ans, 0)
else:
    print(ans, 0)

Submission status: Runtime Error

Solution code:
x,a = map(int,input())

if(x<a):
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
x,a=int(input().split())
print("10" if a<=x  else "0")

Submission status: Runtime Error

Solution code:
x,a = map(int,input.split())
if x < a:
    print("0")
else:
    print("10")

Submission status: Runtime Error

Solution code:
x,a=map(int,input().split())
if x<a:
    print(0)
elif:
    print(10)

Submission status: Runtime Error

Solution code:
x,a = map(int,input().split())
if x <　a:
	print(0)
else:
	print(10)

Submission status: Runtime Error

Solution code:
w,h,x,y=map(int,input().split())
if x*2==w and y*2==h:
    print(w*h/2,1)
else:
    print(w*h/2,0)

Submission status: Runtime Error

Solution code:
#W, H, x, y
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)

Submission status: Runtime Error

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
import operator
from functools import reduce
from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


n, k = Is()
A = LI()
right = 1
ans = 0
SA = [0]  # SA[0]~SA[n]
SA += list(accumulate(A, operator.add))
for left in range(n):
    if left == right:
        right += 1

    while right < n and SA[right]-SA[left] < k:
        right += 1

    if right == n and SA[right]-SA[left] < k:
        break
    else:
        ans += n - right + 1

print(ans)

Submission status: Runtime Error

Solution code:
N,K = input().split(' ')
N = int(N)
K = int(K)
num_list = list(map(int,input().split(' ')))
pivot = 0
ans = 0
while (pivot < len(num_list)):
  flag = 0
  tmp_num = 0
  for i in range(pivot, len(num_list), 1):
    tmp_num += num_list[i]
    if tmp_num >= K:
      ans += (N - i)
      pivot += 1
      break
    elif tmp_num < K and i == len(num_list)-1:
      flag = 1
      break
      
  if flag == 1:
    break
    
for i in range(pivot, len(num_list), 1):
  sum_num = sum(num_list[pivot + 1:])
  if sum_num < K:
    break
  ans += 1
      
print(ans)

Submission status: Runtime Error

Solution code:
#ABC 130 B
N,X=map(int,input().split())
L= [int(j) for j in input().split()]
cnt=0
d = 0

for l in L :
    d+=l
    if d <= X:
        cnt+=1
    else:
        break
print(cnt+1)

Submission status: Runtime Error

Solution code:
if x < a:
	print(0)
if x >= a:
	print(10)

Submission status: Runtime Error

Solution code:
if x < a:
	print("0")
if x >= a:
	print("10")

Submission status: Runtime Error

Solution code:
x,a = map(int,input().split())
if x<a:
  print("0")
else:
  print("10!)

Submission status: Runtime Error

Solution code:
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")

Submission status: Runtime Error

Solution code:
N, K = map(int,input().split())
A = list(map(int,input().split()))

result = 0


for i in range(len(A) + 1):
    if sum(A[:i]) >= K:
        end = i
        break



start = 0
while True:
    if sum(A) < K:
        break
    while sum(A[start:end]) >= K:
        result += len(A) - end + 1
        start += 1
    end += 1

    if end == len(A) + 1:
        break

print(result)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
A = tuple(map(int, input().split()))
 
ans = 0
for i in range(N):
    for j in range(i+1, N+1):
        if sum(A[i:j]) >= K:
            ans += N - j + 1
            break
 
print(ans)

Submission status: Runtime Error

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

X, A = MAP()
print(0 if x <A else 10)

Submission status: Runtime Error

Solution code:
def resolve():
    import bisect
    n,k = map(int, input().split())
    a = list(map(int, input().split()))
    cuma = [0]*(n+1)
    total = 0
    for i in range(n):
        cuma[i+1] = cuma[i] + a[i]
    maxc = cuma[-1]
    ans = 0
    for i in range(1, n+1):
        test = cuma[i-1]+k
        if maxc >= test:
            loc = bisect.bisect_left(cuma[i:], test)
            ans += n-loc-i+1
    print(ans)
resolve()

Submission status: Runtime Error

Solution code:
X, A = map(int, input().split())

if X < A:
  print(0)
else:
  pfint(10)

Submission status: Runtime Error

Solution code:
w, h, x, y = map(int, input().split())

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)

Submission status: Runtime Error

Solution code:
W, H, x, y = map(int, input().split())
print(W*H/2, end=' ')
print(1 if W*y==x*H else 0)

Submission status: Runtime Error

Solution code:
W, H, x, y = map(int, input().split())

area = (W * H) / 2
div = 0
if W // 2 == x and H // 2 == y:
    div = 1

print(area, div)

Submission status: Runtime Error

Solution code:
x,a = map(int,input().split())
if x >= a:
  print(10)
else:
  priny(0)

Submission status: Runtime Error

Solution code:
XA = list(map(int, input().split()))
if XA[0]<XA[1]:
  print(0)
else:
  ptint(10)

Submission status: Runtime Error

Solution code:
XA = map(int, input().split())
if XA[0]<XA[1]:
  print(0)
else:
  ptint(10)

Submission status: Runtime Error

Solution code:
x, a = int(input())
if x < a:
     print("0")
else:
     print("10")

Submission status: Runtime Error

Solution code:
x, a = map(input()).split()

if x<a:
  print('10')
else:
  print('0')

Submission status: Runtime Error

Solution code:
X, A = int(input()).split()

if X > A:
  print 0
elif !(X<A):
  print 10

Submission status: Runtime Error

Solution code:
x, a = map(int, input())
if a<=x:
  print(10)
else:
  print(0)

Submission status: Runtime Error

Solution code:
x,n = map(int,input().split())
if x < a:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
X, A = int(input())

if X < A:
    print(0)
else:
    print(10)

Submission status: Runtime Error

Solution code:
x,a=[int(x) for x in input().rstrip().split()]
if x=>a:
  print(10)
else:
  print(0)

Submission status: Runtime Error

Solution code:
x = int(input()),a = int(input())

if x < a:
    print('0')

elif x >= a:
    print('10')

Submission status: Runtime Error

Solution code:
x = int(input())
a = int(input())

if x < a:
    print('0')

elif x >= a:
    print('10')

Submission status: Runtime Error

Solution code:
x = int(input())
a = int(input())

if x < a:
  print('0')
  
elif x >= a:
  print('10')

Submission status: Runtime Error

Solution code:
A=int(input())
X=int(input())
if X<A:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
import random
X=rand.randint(0,9)
A=rand.randint(0,9)
if X<A:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
X=int(input('X='))
A=int(input('A='))
if X<A:
  print(0)
elif:
  print(10)

Submission status: Runtime Error

Solution code:
a=int(imput('a='))
x=int(imput('x='))
if x<a:
  print(0)
elif:
  print(10)

Submission status: Runtime Error

Solution code:
X, A = map(int, input().split())
print(0 if x < A else 10)

Submission status: Runtime Error

Solution code:
x,a = map(int,input().split())

if x <a:
    print(o)
else:
    print(10)

Submission status: Runtime Error

Solution code:
print(10*(input()>=input()))

Submission status: Runtime Error

Solution code:
x,a = int(input())

if x > a:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
a,b = int(input())

if a >= b:
  print("10")
else:
  print("0")

Submission status: Runtime Error

Solution code:
N, X = map(int, input().split())
L = map(int, input().split())

x = 0
cnt = 0
for l in L:
    x += l
    if x > X:
        break
    else:
        cnt += 1

print(cnt+1)

Submission status: Runtime Error

Solution code:
n,x = map(int, input().split())
l = list(map(int, input().split()))

s = 0
d = 0
for i in range(n):
  d += l[i]
  s += 1
  if d >= x:
    break
print(s)

Submission status: Runtime Error

Solution code:
X, A = map(int, input(),split())
print(0 if X < A else 10)

Submission status: Runtime Error

Solution code:
n = int(input())
xyd = [list(input().split()) for i in range(n)]
xmax,ymax = [-10**18,-10**18,-10**18],[-10**18,-10**18,-10**18]
xmin,ymin = [10**18,10**18,10**18],[10**18,10**18,10**18]
#xmax: max(x1-t,x2,x3+t)
#xmin: min(x1+t,x2,x3-t)
#ymax: max(y1-t,y2,y3+t)
#ymin: min(y1+t,y2,y3-t)
def chp(ls,a,flg1,i):
  if flg1:
    ls[i] = max(ls[i],a)
  else:
    ls[i] = min(ls[i],a)
def area(t):
  x = max(xmax[0]-t,xmax[1],xmax[2]+t)-min(xmin[0]+t,xmin[1],xmin[2]-t)
  y = max(ymax[0]-t,ymax[1],ymax[2]+t)-min(ymin[0]+t,ymin[1],ymin[2]-t)
  return x*y
for x,y,d in xyd:
  x,y = int(x),int(y)
  if d in ("L","R"):
    chp(ymax,y,1,1)
    chp(ymin,y,0,1)
    if d == "R":
      chp(xmin,x,0,0)
      chp(xmax,x,1,2)
    if d == "L":
      chp(xmin,x,0,2)
      chp(xmax,x,1,0)
  elif d in ("U","D"):
    chp(xmax,x,1,1)
    chp(xmin,x,0,1)
    if d == "U":
      chp(ymax,y,1,2)
      chp(ymin,y,0,0)
    if d == "D":
      chp(ymin,y,0,2)
      chp(ymax,y,1,0)

event = [0]
for ls in xmax,ymax:
  event.append(ls[0]-ls[1])
  event.append((ls[0]-ls[2])/2)
  event.append(ls[1]-ls[2])
for ls in xmin,ymin:
  event.append(ls[1]-ls[0])
  event.append((ls[2]-ls[0])/2)
  event.append(ls[2]-ls[1])
ans = 10**20

for i in event:
  if i>=0:
    for j in range(-10,10):
      if i+j*0.5 >= 0:
        ans = min(ans,area(i+j*0.5))
l = 0
r = 10**9
for _ in range(10000):
  ml = l*2/3+r*1/3
  mr = l*1/3+r*2/3
  if area(ml) <= area(mr):
    r = mr
  else:
    l = ml
print(min(ans,area(ml)))

Submission status: Runtime Error

Solution code:
n = int(input())
xyd = [list(input().split()) for i in range(n)]
xmax,ymax = [-10**18,-10**18,-10**18],[-10**18,-10**18,-10**18]
xmin,ymin = [10**18,10**18,10**18],[10**18,10**18,10**18]
#xmax: max(x1-t,x2,x3+t)
#xmin: min(x1+t,x2,x3-t)
#ymax: max(y1-t,y2,y3+t)
#ymin: min(y1+t,y2,y3-t)
def chp(ls,a,flg1,i):
  if flg1:
    ls[i] = max(ls[i],a)
  else:
    ls[i] = min(ls[i],a)
def area(t):
  x = max(xmax[0]-t,xmax[1],xmax[2]+t)-min(xmin[0]+t,xmin[1],xmin[2]-t)
  y = max(ymax[0]-t,ymax[1],ymax[2]+t)-min(ymin[0]+t,ymin[1],ymin[2]-t)
  return x*y
for x,y,d in xyd:
  x,y = int(x),int(y)
  if d in ("L","R"):
    chp(ymax,y,1,1)
    chp(ymin,y,0,1)
    if d == "R":
      chp(xmin,x,0,0)
      chp(xmax,x,1,2)
    if d == "L":
      chp(xmin,x,0,2)
      chp(xmax,x,1,0)
  elif d in ("U","D"):
    chp(xmax,x,1,1)
    chp(xmin,x,0,1)
    if d == "U":
      chp(ymax,y,1,2)
      chp(ymin,y,0,0)
    if d == "D":
      chp(ymin,y,0,2)
      chp(ymax,y,1,0)

event = [0]
for ls in xmax,ymax:
  event.append(ls[0]-ls[1])
  event.append((ls[0]-ls[2])/2)
  event.append(ls[1]-ls[2])
for ls in xmin,ymin:
  event.append(ls[1]-ls[0])
  event.append((ls[2]-ls[0])/2)
  event.append(ls[2]-ls[1])
ans = 10**20

for i in event:
  if i>=0:
    for j in range(-10,10):
      if i+j*0.5 >= 0:
        ans = min(ans,area(i+j*0.5))
l = 0
r = 10**9
for _ in range(10000):
  ml = l*2/3+r*1/3
  mr = l*1/3+r*2/3
  if area(ml) <= area(mr):
    r = mr
  else:
    l = ml
print(min(ans,int(area(ml)*2*0.5)/2))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
xyd = [list(input().split()) for i in range(n)]
xmax,ymax = [-10**18,-10**18,-10**18],[-10**18,-10**18,-10**18]
xmin,ymin = [10**18,10**18,10**18],[10**18,10**18,10**18]
#xmax: max(x1-t,x2,x3+t)
#xmin: min(x1+t,x2,x3-t)
#ymax: max(y1-t,y2,y3+t)
#ymin: min(y1+t,y2,y3-t)
def chp(ls,a,flg1,i):
  if flg1:
    ls[i] = max(ls[i],a)
  else:
    ls[i] = min(ls[i],a)
def area(t):
  x = max(xmax[0]-t,xmax[1],xmax[2]+t)-min(xmin[0]+t,xmin[1],xmin[2]-t)
  y = max(ymax[0]-t,ymax[1],ymax[2]+t)-min(ymin[0]+t,ymin[1],ymin[2]-t)
  return x*y
for x,y,d in xyd:
  x,y = int(x),int(y)
  if d in ("L","R"):
    chp(ymax,y,1,1)
    chp(ymin,y,0,1)
    if d == "R":
      chp(xmin,x,0,0)
      chp(xmax,x,1,2)
    if d == "L":
      chp(xmin,x,0,2)
      chp(xmax,x,1,0)
  elif d in ("U","D"):
    chp(xmax,x,1,1)
    chp(xmin,x,0,1)
    if d == "U":
      chp(ymax,y,1,2)
      chp(ymin,y,0,0)
    if d == "D":
      chp(ymin,y,0,2)
      chp(ymax,y,1,0)
l = 0
r = 10**15
for _ in range(10000):
  ml = l*2/3+r*1/3
  mr = l*1/3+r*2/3
  if area(ml) <= area(mr):
    r = mr
  else:
    l = ml
print(int(area(ml)*2+0.5)/2)

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
xyd = [list(input().split()) for i in range(n)]
xmax,ymax = [-10**18,-10**18,-10**18],[-10**18,-10**18,-10**18]
xmin,ymin = [10**18,10**18,10**18],[10**18,10**18,10**18]
#xmax: max(x1-t,x2,x3+t)
#xmin: min(x1+t,x2,x3-t)
#ymax: max(y1-t,y2,y3+t)
#ymin: min(y1+t,y2,y3-t)
def chp(ls,a,flg1,i):
  if flg1:
    ls[i] = max(ls[i],a)
  else:
    ls[i] = min(ls[i],a)
def area(t):
  x = max(xmax[0]-t,xmax[1],xmax[2]+t)-min(xmin[0]+t,xmin[1],xmin[2]-t)
  y = max(ymax[0]-t,ymax[1],ymax[2]+t)-min(ymin[0]+t,ymin[1],ymin[2]-t)
  return x*y
for x,y,d in xyd:
  x,y = int(x),int(y)
  if d in ("L","R"):
    chp(ymax,y,1,1)
    chp(ymin,y,0,1)
    if d == "R":
      chp(xmin,x,0,0)
      chp(xmax,x,1,2)
    if d == "L":
      chp(xmin,x,0,2)
      chp(xmax,x,1,0)
  elif d in ("U","D"):
    chp(xmax,x,1,1)
    chp(xmin,x,0,1)
    if d == "U":
      chp(ymax,y,1,2)
      chp(ymin,y,0,0)
    if d == "D":
      chp(ymin,y,0,2)
      chp(ymax,y,1,0)
l = 0
r = 10**15
for _ in range(10000):
  ml = l*2/3+r*1/3
  mr = l*1/3+r*2/3
  if area(ml) <= area(mr):
    r = mr
  else:
    l = ml
print(area(ml))

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
n = int(input())
xyd = [list(input().split()) for i in range(n)]
xmax,ymax = [-10**18,-10**18,-10**18],[-10**18,-10**18,-10**18]
xmin,ymin = [10**18,10**18,10**18],[10**18,10**18,10**18]
#xmax: max(x1-t,x2,x3+t)
#xmin: min(x1+t,x2,x3-t)
#ymax: max(y1-t,y2,y3+t)
#ymin: min(y1+t,y2,y3-t)
def chp(ls,a,flg1,i):
  if flg1:
    ls[i] = max(ls[i],a)
  else:
    ls[i] = min(ls[i],a)
def area(t):
  x = max(xmax[0]-t,xmax[1],xmax[2]+t)-min(xmin[0]+t,xmin[1],xmin[2]-t)
  y = max(ymax[0]-t,ymax[1],ymax[2]+t)-min(ymin[0]+t,ymin[1],ymin[2]-t)
  return x*y
for x,y,d in xyd:
  x,y = int(x),int(y)
  if d in ("L","R"):
    chp(ymax,y,1,1)
    chp(ymin,y,0,1)
    if d == "R":
      chp(xmin,x,0,0)
      chp(xmax,x,1,2)
    if d == "L":
      chp(xmin,x,0,2)
      chp(xmax,x,1,0)
  elif d in ("U","D"):
    chp(xmax,x,1,1)
    chp(xmin,x,0,1)
    if d == "U":
      chp(ymax,y,1,2)
      chp(ymin,y,0,0)
    if d == "D":
      chp(ymin,y,0,2)
      chp(ymax,y,1,0)
l = 0
r = 10**12
for _ in range(10000):
  ml = l*2/3+r*1/3
  mr = l*1/3+r*2/3
  if area(ml) <= area(mr):
    r = mr
  else:
    l = ml
print(area(ml))

Submission status: Runtime Error

Solution code:
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


n, x = map(int, input().split())
l = list(map(int, input().split()))
#print(l)
ll = [0]
sum = 0
for i in range(n):
    sum += l[i]
    ll.append(sum)
#print(ll)

cnt = 0
for i in range(n+1):
    if ll[i] <= x:
        cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
from fractions import gcd
from copy import deepcopy
import math
import queue
import numpy as np
#import sympy as syp(素因数分解とか)
Mod = 1000000007
import sys
sys.setrecursionlimit(1000000) 
  
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

def factorial(i):
    if i == 1:
        return 1
    else:
        return i*factorial(i-1)
 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[py] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)




def main(): #startline--------------------------------------------
    n,m = map(int,input().split())
    s = list(map(int,input().split()))
    t = list(map(int,input().split()))
    dp = [[0]*(m+2) for i in range(n+2)]
    sdp = [[0]*(m+2) for i in range(n+2)]
    dp[0][0] = 1
    sdp[1][1] = 1
    for i in range(n+1):
        for j in range(m+1):
            if i == 0 and j == 0:continue
            if i>=1 and j >= 1 and s[i-1] == t[j-1]:
                dp[i][j] = sdp[i][j]%Mod
            sdp[i+1][j+1] = (sdp[i+1][j] + sdp[i][j+1] - sdp[i][j] + dp[i][j])%Mod

    print(sdp[n+1][m+1]%Mod)

if __name__ == "__main__":
    main() 
    
#endline===============================================

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
tmp=0
ans=1
for i in range(N):
	tmp+=L[i]
	if tmp>X:
		print(ans)
		exit()
	else:
		ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
cnt = 0
a_sum = []
i = 0
l = 0 
for i in range(n):
    a_sum.append(a[i])
    l += a(i)
    while l >= k:
      	l -= a_sum[0]
        cnt += n - i
        a_sum.pop(0)
        
print(cnt)

Submission status: Runtime Error

Solution code:
n,x=map(int,input().split())
l=list(map(int,input().split()))
d=0
a=1
for i in range(n-1):
    a+=1
    d+=l[i]
    #print(d)
    if d>x:
        break


print(a)

Submission status: Runtime Error

Solution code:
X, A = map(int, input())
if X >= A:
  print(10)
else:
  print(0)

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
D=[]
D.append(0)
for i in range(1,N+1):
  D.append(D[i-1]+L[i-1])
s=0
for j in range(0,N+1):
  if D[j]<=X:
    s+=1
print(s)

Submission status: Runtime Error

Solution code:
X, A = (int, input().split())
print(10 if X>=A else 0)

Submission status: Runtime Error

Solution code:
x,a=map(int,input())

if x < a:
    print(0)
else:
    print(10)

Submission status: Runtime Error

Solution code:
x, a = map(input().split())
if x < a:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
x = int(input())
a = int(input())
if x < a:
  print("0")
else:
  print("10")

Submission status: Runtime Error

Solution code:
x = input()
a = input()
y = int(x)
b = int(a)
 
 
 
 
if y < b:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
x = input()
a = intput()
 
 
 
 
if x < a:
  print("0")
else:
  print("10")

Submission status: Runtime Error

Solution code:
x = int
a = int



 
if x < a:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
x = int
a = int


 
if x < a:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
x >= 0
x <= 9
a >= 0
a <= 9

if x < a 
  print(0)
else
  print(10)

Submission status: Runtime Error

Solution code:
import sys

read = lambda: sys.stdin.readline().rstrip()

def tot_morethanK_substrings(N, K, A):

    ans, total, right = 0, 0, 0
    for left in range(N):
        while total < K and right < N:
            total += A[right]
            right += 1
        if total < K:
            break
        ans += N - right + 1
        total -= A[left]

        return ans

def main():
    
    N0, K0 = map(int, read().split())
    A0 = tuple(map(int, read().split()))

    res = tot_morethanK_substrings(N0, K0, A0)

    print(res)
 
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
M,A = map(int,input().split())
 
if X < A:
  print("0")
else:
  print("10")

Submission status: Runtime Error

Solution code:
M,A = map(int,input().split())

if X < A:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
def calcBoundCount(rangex, lstL):
    d = 0
    for i in range(0, len(lstL)):
        d = d + lstL[i]
        if rangex < d:
            return i + 1
    return len(lstL) + 1

N, X = map(int, input().split())
lstL = list(map(int, input().split()))

count = calcBoundCount(X, lstL)
print((count if count <= N+1 else N+1))

Submission status: Runtime Error

Solution code:
x,a=int(input())
print(0 if x<a else 10)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))

d=[0]
for i in range(1, n+1):
  d.append(d[-1]+l[i-1])
  
print(len([i for i in d if i <= x]))

Submission status: Runtime Error

Solution code:
N,X=map(int,input().split())
L=list(map(int,input().split()))
count=1
tmp=0
for i in range(N):
  tmp+=L[i]
  if tmp<=X:
    count+=1
print(count)

Submission status: Runtime Error

Solution code:
n,x = map(int,input().split())
l = list(map(int,input().split()))
count = 1
x1 = 0
for i in range(n):
  if x1 + l[i] <= x:
    count += 1
    x1 += l[i]
  else:
    print(count)
    exit()
print(count)

Submission status: Runtime Error

Solution code:
W, H, x, y = map(int, input().split())

s = W * H
if x == 0:
    a = W * y
    b = W * (H - y)
    p = 1 if a == b else 0
elif y == 0:
    a = H * x
    b = H * (W - x)
elif W % x == 0 and H % y == 0:
    a = b = W * H // 2
else:
    a = W * y
    b = H * x

p = 1 if a == b else 0
print("{0} {1}".format(min(a, b), p))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;

int main()
{
    int x,a;
    cin>>x>>a;
    cout<<((x<a)?0:10)<<endl;
}

Submission status: Runtime Error

Solution code:
x,a=map(int, input().split)
if 0<=x<a<=9:
  print ("0")
else: 
  print("10")

Submission status: Runtime Error

Solution code:
X, A = map( int, input().split() )
if X < A :
   print( 0 )
else
    print( 10 )

Submission status: Runtime Error

Solution code:
X, A = list(map(input().split()))
if X < A :
	print(0)
else :
	print(10)

Submission status: Runtime Error

Solution code:
a,b = map(int input().split())

if a < b:
    print(0)

else:
    print(10)

Submission status: Runtime Error

Solution code:
x,a = map(int,input().split())

if x < a:
    ans = 0
else;
    ans = 10

print(ans)

Submission status: Runtime Error

Solution code:
x, a = int(input())
 
if x >= a:
  print(10)
elif x < a:
  print(0)
else:
  pass

Submission status: Runtime Error

Solution code:
x, a = input()

if x >= a:
  print(10)
elif x < a:
  print(0)
else:
  pass

Submission status: Runtime Error

Solution code:
X, A = matp(int,input().split())

if X < A:
	print(0)
else:
	print(10)

Submission status: Runtime Error

Solution code:
h,w,x,y = map(int,input().split())
ans1 = (h*w)/2
if h == 2*x and w == 2*y:
    ans2 = 1
else:
    ans2 = 0
print(ans1,ans2)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
l = list(map(int, input().split()))

wk = 0
for i in range(n):
    wk += l[i]
    #print(i)
    #print(l[i])
    if(wk > x):
        print(i + 1)
        exit()
print(n + 1)

Submission status: Runtime Error

Solution code:
X, A = map(int, input())
if X < A:
    print(0)
else:
    print(10)

Submission status: Runtime Error

Solution code:
x,a = map(int,itput().split())

if x<a:
    print(0)
else:
    print(10)

Submission status: Runtime Error

Solution code:
X,A=map(int, input().split())
if X<A:
  print(0)
 else:
  print(10)

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=a.split()
d=b.split()
e=0
k=1
u=int(c[1])
for i in range(len(d)):
        e+=int(d[i])
        k+=1
        if e>u:
                break
print(k)

Submission status: Runtime Error

Solution code:
a=input()
b=input()
c=a.split()
d=b.split()
e=0
k=0
u=int(c[1])
for i in range(len(d)):
        e+=int(d[i])
        k+=1
        if e>u:
                break
print(k)

Submission status: Runtime Error

Solution code:
# coding: utf-8
# Your code here!
w,h,x,y=map(int,input().split())
#print(min(max(x*h,(w-x)*h),max(y*w,(h-y)*w)))
if w==x+x and h==y+y:
    print(float(w)*float(h)/2,1)
else:
    print(float(w)*float(h)/2,0)

Submission status: Runtime Error

Solution code:
w, h, x, y = map(int, input().split())
out = 0
if (x == w/2 and y!= 0 and y != h) or (y == h/2 and x != 0 and x != w) or (h*x == w*y and x !=0 and x != w):
  out = 1
print(w*h/2, out)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
a = list(map(int, input().split()))
count = 0
for i in range(N):
    sum = 0
    while i < N:
        sum += a[i]
        i += 1
        if sum >= K:
            count += N-1-i
            break

print(count)

Submission status: Runtime Error

Solution code:
N, A = map(int, input().split())
print(0 if X < A else 10)

Submission status: Runtime Error

Solution code:
W,H,x,y=map(int,input().split())
if x==W/2 and y==H/2:
  print(float(W*H/2),1)
else:
  print(float(W*H/2),0)

Submission status: Runtime Error

Solution code:
import itertools
N, M = [int(_) for _ in input().split()]
S = [int(_) for _ in input().split()]
T = [int(_) for _ in input().split()]
mod = 10**9 + 7
dp = [[1] * (M + 1)] + [[1] + [0] * M for _ in range(N)]
for n, m in itertools.product(range(N), range(M)):
    dp[n + 1][m + 1] = dp[n][m + 1] + dp[n + 1][m] - dp[n][m]
    if S[n] == T[m]:
        dp[n + 1][m + 1] += dp[n][m]
    dp[n + 1][m + 1] %= mod
print(dp[-1][-1])

Submission status: Runtime Error

Solution code:
x, a = [int(i) for i in input().split(' ')]

if X<A:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
X =input()
A =input()
if X < A:
  print(0)
else:
  print(10)

Submission status: Runtime Error

Solution code:
A=int(input())
X=int(input())

if X<A:
    print(0)
else:
    print(10)