我提交了一二十遍。。。。

为什么我H题老是过99.99%
#include<iostream>
#include<cstdio>
using namespace std;

int main()
{
int x,y,stepless,k,hhh,ttt;
long long int a;
while(cin>>x>>y>>a)
{
//if(x==0&y==0)

if(x<0)
x=-x;
if(y<0)
y=-y;
k=0;


if(x>y)
stepless=x;
else if(x<=y)
stepless=y;
if((x+y)%2!=0)
{
//cout<<"Not the fate"<<endl;
k=1;
}
else  if(a<stepless||stepless%2!=a%2)
{
k=2;
}
else
{
k=3;
}
if(k==3)
puts("We are together");
else if(k==1)
puts("Not the fate");
else if(k==2)
puts("You are lying");
}
return 0;
}

全部评论
我一开始也是 要特判一下坐标为(0,0)的情况 这时候如果步数不是0就是You are lying
点赞 回复
分享
发布于 2018-12-11 22:37

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务