from queue import PriorityQueue
n, A, B =map(int,input().split())
a =list(map(int,input().split()))
Q1 = PriorityQueue()# 负数
Q2 = PriorityQueue()# 正数
s = a[0]; cnt =0for i inrange(1, n):
s += a[i]# 求和if a[i]<0:# 统计负数个数(第一位除外)
cnt +=1; Q1.put(a[i])else:
Q2.put(a[i])if B >= cnt:# 理论上负号数为cntif n -1- cnt > A:# 正号个数不够 实际负号个数为n - 1 - A(更多)for i inrange(cnt):
x = Q1.get(); s +=2*(-x)for i inrange(n -1- A - cnt):
x = Q2.get(); s -=2* x
else:# 正号个数够for i inrange(cnt):
x = Q1.get(); s +=2*(-x)else:# 理论上负号数为Bfor i inrange(B):
x = Q1.get(); s +=2*(-x)print(s)
n, m =map(int,input().split())
maze =[input()for _ inrange(n)]
ans =0for i inrange(n -1,0,-1):# 不取第一行for j inrange(1, m -1):# 不取第一列和最后一列if maze[i][j]=='*':# 检查V的大小# k的取值范围[1, min(j, m - j - 1, i)]
base =min(j, m - j -1, i)if base <= ans:continue# 剪枝for k inrange(1, base +1):if maze[i - k][j - k]=='*'and maze[i - k][j + k]=='*':
ans =max(ans, k)else:# 提前剪枝breakprint(ans)
from bisect import bisect_left, insort
from copy import deepcopy
defcheck(nums, Len, num):# 判断 nums 能否凑出 1 ~ num
lst = deepcopy(nums)for i inrange(num,0,-1):
idx = bisect_left(lst, i)if idx == Len:# 凑不出来returnFalse
re = lst[idx]- i; lst.pop(idx)if re >0: insort(lst, re)else: Len -=1# 不插入returnTruedefcalc(nums, Len):# 二分模板
l =1; r =10**6while l <= r:
mid =(l + r)>>1if check(nums, Len, mid):
l = mid +1else:
r = mid -1return r
n, X =map(int,input().split())
a =[X]+list(map(int,input().split()))
a.sort(); ans1 = calc(a, n +1)# a能凑到连续的最大数
m, Y =map(int,input().split())
b =[Y]+list(map(int,input().split()))
b.sort(); ans2 = calc(b, m +1)# b能凑到连续的最大数if ans1 > ans2:print("Clrlss")elif ans1 < ans2:print("Yaya")else:print("Draw")
from queue import PriorityQueue
n, A, B =map(int,input().split())
a =list(map(int,input().split()))
Q1 = PriorityQueue()# 负数
Q2 = PriorityQueue()# 正数
s = a[0]; cnt =0for i inrange(1, n):
s += a[i]# 求和if a[i]<0:# 统计负数个数(第一位除外)
cnt +=1; Q1.put(a[i])else:
Q2.put(a[i])if B >= cnt:# 理论上负号数为cntif n -1- cnt > A:# 正号个数不够 实际负号个数为n - 1 - A(更多)for i inrange(cnt):
x = Q1.get(); s +=2*(-x)for i inrange(n -1- A - cnt):
x = Q2.get(); s -=2* x
else:# 正号个数够for i inrange(cnt):
x = Q1.get(); s +=2*(-x)else:# 理论上负号数为Bfor i inrange(B):
x = Q1.get(); s +=2*(-x)print(s)
n, m =map(int,input().split())
maze =[input()for _ inrange(n)]
ans =0for i inrange(n -1,0,-1):# 不取第一行for j inrange(1, m -1):# 不取第一列和最后一列if maze[i][j]=='*':# 检查V的大小# k的取值范围[1, min(j, m - j - 1, i)]
base =min(j, m - j -1, i)if base <= ans:continue# 剪枝for k inrange(1, base +1):if maze[i - k][j - k]=='*'and maze[i - k][j + k]=='*':
ans =max(ans, k)else:# 提前剪枝breakprint(ans)
from bisect import bisect_left, insort
from copy import deepcopy
defcheck(nums, Len, num):# 判断 nums 能否凑出 1 ~ num
lst = deepcopy(nums)for i inrange(num,0,-1):
idx = bisect_left(lst, i)if idx == Len:# 凑不出来returnFalse
re = lst[idx]- i; lst.pop(idx)if re >0: insort(lst, re)else: Len -=1# 不插入returnTruedefcalc(nums, Len):# 二分模板
l =1; r =10**6while l <= r:
mid =(l + r)>>1if check(nums, Len, mid):
l = mid +1else:
r = mid -1return r
n, X =map(int,input().split())
a =[X]+list(map(int,input().split()))
a.sort(); ans1 = calc(a, n +1)# a能凑到连续的最大数
m, Y =map(int,input().split())
b =[Y]+list(map(int,input().split()))
b.sort(); ans2 = calc(b, m +1)# b能凑到连续的最大数if ans1 > ans2:print("Clrlss")elif ans1 < ans2:print("Yaya")else:print("Draw")