题目链接:点击打开链接
代码实现:
#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
long long m,n,count;
while(cin>>m>>n)
{
count=1;
while(m>=0&&n>=0)
{
if(count%2)
{
m=m-count;
count++;
}
else
{
n=n-count;
count++;
}
}
if(n<0)
cout<<"Valera"<<endl;
else if(m<0)
cout<<"Vladik"<<endl;
}
return 0;
}