CF811A.Vladik and Courtesy

入门

通过率:0%

时间限制:2.00s

内存限制:256MB

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

At regular competition Vladik and Valera won a and b candies respectively. Vladik offered 1 his candy to Valera. After that Valera gave Vladik 2 his candies, so that no one thought that he was less generous. Vladik for same reason gave 3 candies to Valera in next turn.

More formally, the guys take turns giving each other one candy more than they received in the previous turn.

This continued until the moment when one of them couldn’t give the right amount of candy. Candies, which guys got from each other, they don’t consider as their own. You need to know, who is the first who can’t give the right amount of candy.

在一场常规比赛中,弗拉基克和瓦莱拉分别赢得了 aa 颗和 bb 颗糖果。弗拉基克先给瓦莱拉 1 颗自己的糖果。随后,瓦莱拉出于同样的原因(不想显得不够慷慨)回赠给弗拉基克 2 颗自己的糖果。接着,弗拉基克又出于相同原因,在下一轮中给瓦莱拉 3 颗自己的糖果。

更形式化地讲:两人轮流给对方糖果,每次给出的数量比上一次自己收到的数量多 1。

这一过程持续进行,直到某一方无法给出规定数量的糖果为止。注意:双方从对方那里获得的糖果不被视为自己所有。你需要判断:谁是第一个无法给出规定数量糖果的人?

输入格式

Single line of input data contains two space-separated integers a, b (1 ≤ a, b ≤ 109) — number of Vladik and Valera candies respectively.

输入数据为一行,包含两个以空格分隔的整数 aa、bb(1 ≤ a, b ≤ 1091 ≤ a, b ≤ 10^9),分别表示弗拉迪克和瓦莱拉所拥有的糖果数量。

输出格式

Pring a single line "Vladik’’ in case, if Vladik first who can’t give right amount of candy, or "Valera’’ otherwise.

如果弗拉迪克是第一个无法给出正确数量糖果的人,则输出一行 "Vladik";否则输出 "Valera"。

输入输出样例

  • 输入#1

    1 1

    输出#1

    Valera
  • 输入#2

    7 6

    输出#2

    Vladik

说明/提示

Illustration for first test case:

Illustration for second test case:

第一个测试用例的示意图:

第二个测试用例的示意图:

输入解题思路,AI测评打分。不知道怎么写?

首页