坑题

#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
using namespace std; int main()
{
int N,S,T;
while(~scanf("%d%d%d",&N,&S,&T))
{
if((S==&&T==N)||(S==N&&T==))
{
printf("0\n");
continue;
} if(S==T)
{
printf("-1\n");
continue;
} if((<S&&S<T&&T<N)||(<T&&T<S&&S<N))
{ if(abs(S-T)==)
{
printf("1\n");
continue;
}
else if(abs(S-T)!=)
{
printf("2\n");
continue;
}
} if(S==||S==N)
{
printf("1\n");
continue;
} if(T==||T==N)
{
if(abs(T-S)==) printf("1\n");
else printf("2\n");
continue;
}
}
return ;
}

HDU 5523 Game的更多相关文章

  1. HDU 5523:Game

    Game  Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 131072/131072 K (Java/Others) 问题描述 XY在玩一 ...

  2. HDOJ 2111. Saving HDU 贪心 结构体排序

    Saving HDU Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total ...

  3. 【HDU 3037】Saving Beans Lucas定理模板

    http://acm.hdu.edu.cn/showproblem.php?pid=3037 Lucas定理模板. 现在才写,noip滚粗前兆QAQ #include<cstdio> #i ...

  4. hdu 4859 海岸线 Bestcoder Round 1

    http://acm.hdu.edu.cn/showproblem.php?pid=4859 题目大意: 在一个矩形周围都是海,这个矩形中有陆地,深海和浅海.浅海是可以填成陆地的. 求最多有多少条方格 ...

  5. HDU 4569 Special equations(取模)

    Special equations Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u S ...

  6. HDU 4006The kth great number(K大数 +小顶堆)

    The kth great number Time Limit:1000MS     Memory Limit:65768KB     64bit IO Format:%I64d & %I64 ...

  7. HDU 1796How many integers can you find(容斥原理)

    How many integers can you find Time Limit:5000MS     Memory Limit:32768KB     64bit IO Format:%I64d ...

  8. hdu 4481 Time travel(高斯求期望)(转)

    (转)http://blog.csdn.net/u013081425/article/details/39240021 http://acm.hdu.edu.cn/showproblem.php?pi ...

  9. HDU 3791二叉搜索树解题(解题报告)

    1.题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=3791 2.参考解题 http://blog.csdn.net/u013447865/articl ...

随机推荐

  1. 读苹果开发文档时遇到瓶颈,转而花2天看了Objc基本语法

    根据这篇博客中列出的文章开始看Objc基本语法: http://blog.hellolucky.info/articles/ios-beginner-ios-development/ 看完以后,明白多 ...

  2. 获得正在编辑行的数据 esayui datagrid

    function getEditRow(datagridId) {//datagridId为table容器的id var input = $('#' + datagridId).parent().fi ...

  3. ORACLE里锁有以下几种模式,v$locked_object,locked_mode【转】

    ORACLE里锁有以下几种模式:0:none1:null 空2:Row-S 行共享(RS):共享表锁,sub share 3:Row-X 行独占(RX):用于行的修改,sub exclusive 4: ...

  4. openCV(三)---图像缩放

    UIImage *img1 = [UIImage imageNamed:@"1448941176867"]; //将UIImage转换为IplImage格式 IplImage *p ...

  5. IOS 中常用站位符

      CGPoint.CGRect等可以转化为字符串打印出来 如:   NSLog(@"-------------%@",NSStringFromCGPoint(point));   ...

  6. HTTPclient cookie的获取与设置

    因为代码与Java用apache的HttpClient发送Post请求大部份重复,所以就不贴整段代码了,只把不同的地方贴出来.发送Cookie就必须先得到Cookie,所以至少发送两次请求,第一次用于 ...

  7. Update Case的用法与execute执行字符串

    摘自于网路:http://www.cnblogs.com/joinger/articles/1297160.html update h_crm_SafetyAccessUser set         ...

  8. ignite客户端找不到服务端的时候如何设置退出

    ignite启动客户端时需要有服务端支持: Ignition.setClientMode(true); Ignition.start("ignite.xml"); 这里有个问题,当 ...

  9. java内部类继承--构造函数传参

    /: innerclasses/InheritInner.java // Inheriting an inner class. class WithInner { class Inner {} } / ...

  10. lucene 查询 (转载)

    原网址:http://hi.baidu.com/lszhuhaichao/blog/item/ccffc7cb858f1514bf09e66f.html Lucene3.0之查询处理(1):原理201 ...