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

为什么我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

相关推荐

迟缓的斜杠青年巴比Q了:简历被投过的公司卖出去了,我前两天遇到过更离谱的,打电话来问我有没有意向报班学Java学习,服了,还拿我学校一个学长在他们那报班学了之后干了华为OD当招牌
点赞 评论 收藏
分享
醉蟀:你不干有的是人干
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务