811A - Vladik and Courtesy
- 811A - Vladik and Courtesy
- time limit per test2 seconds
- #include<iostream>
- using namespace std;
- int main(){
- long a,b;///vladik ,valera
- cin>>a>>b;
- int x,y;
- int i=1;
- while(1){if(a<0 or b<0) break;
- if(i%2!=0) a=a-i;
- else b=b-i;
- x=a;y=b;
- //cout<<x<<" "<<y<<endl;
- i++;
- }
- if(x <0) cout<<"Vladik";
- if(y<0)cout<<"Valera";
- }


Comments
Post a Comment