A. Two Vessels
题目翻译
你有两个装有水的容器。第一个容器含有克水,第二个容器含有克水。这两艘船都非常大,可以容纳任意数量的水。
大约 14 分钟
你有两个装有水的容器。第一个容器含有a克水,第二个容器含有b克水。这两艘船都非常大,可以容纳任意数量的水。
给你一个由n个整数组成的数组。您的任务是确定是否可以将其所有元素着色为两种颜色,使得两种颜色的元素之和具有相同的奇偶性,并且每种颜色至少有一个元素着色。
链接:https://codeforces.com/contest/1846
There are n nails driven into the wall, the i-th nail is driven ai meters above the ground, one end of the bi meters long rope is tied to it. All nails hang at different heights one above the other. One candy is tied to all ropes at once. Candy is tied to end of a rope that is not tied to a nail.