#Lutece3005. 我忘记了啊
我忘记了啊
Migrated from Lutece 3005 我忘记了啊
All parts of this problem, including description, images, samples, data and checker, might be broken. If you find bugs in this problem, please contact the admins.
Description
KDU决定给CLA做一份布朗尼作为礼物,于是她准备了 种食材,每种食材用一个正整数 表示。她认为将这些食材摆放一棵二叉排序树上看起来会更美味,即:将每个 一一对应到一棵树的每个节点,这棵树满足上每个节点至多拥有两个儿子,左子树中的食材的数值都小于该节点,右子树都大于该节点。另外,她还希望树上直接相邻节点食材的数值之和的二进制表示中(不包含前导0)0与1的个数之差不超过 。但是KDU购买食材之前忘记了这一点,于是她向你求助是否存在一种树满足上述要求。
Input
第一行两个正整数,第二行 个正整数,具体含义见上文。
Output
如果存在一种分配方式,则输出OC
,否则输出Wasureteta
。
Samples
2 0
1 2
Wasureteta
4 1
3 4 9 12
Wasureteta
3 0
1 8 127
OC
Constraints
$2\le n\le 700,0\le m\le 20,1\le a_1<a_2<\cdots a_n\le 10^6$.
Resources
2023 UESTC ICPC Training for Search and Dynamic Programming