坑题

#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. 1305: Substring

    #include <iostream>#include<string.h>#include<stdio.h> using namespace std; #defin ...

  2. centos装openoffice

    一.安装openOffice1.使用tar -xzvf OOo_3.2.0_LinuxIntel_install_wJRE_en-US.tar.gz解压缩后,会得到OOO320_m12_native_ ...

  3. CTRL key

    ctrl key其实是用于扩展键盘,单独一个ctrl键没有什么作用,也没有ascii码,当与其他键相结合时,相当于创造出一个新键.例如:用getchar()侦测输入的字符,当按下ctrl+a时,只输出 ...

  4. Hadoop 中关于 map,reduce 数量设置

    map和reduce是hadoop的核心功能,hadoop正是通过多个map和reduce的并行运行来实现任务的分布式并行计算,从这个观点来看,如果将map和reduce的数量设置为1,那么用户的任务 ...

  5. CentOS 7 时区设置

    设置时区同样, 在 CentOS 7 中, 引入了一个叫 timedatectl 的设置设置程序. 用法很简单: # timedatectl # 查看系统时间方面的各种状态 $timedatectl  ...

  6. cdn是什么

    CDN的全称是Content Delivery Network,即内容分发网络.其目的是通过在现有的Internet中增加一层新的网络架构, 将网站的内容发布到最接近用户的网络”边缘”,使用户可以就近 ...

  7. 老鸟需要知道的一些php系统类函数

    作为一个老手级别的php程序员,知道下面几个php系统级别的函数,不足为多吧!获取系统信息和调试程序的时候应该能用的上! PHP系统类函数 assert函数:检查assertion声明是否错误 ext ...

  8. zabbix metrics

    http://blog.csdn.net/hengyunabc/article/details/44072285

  9. document.body与document.documentElement

    document.body 获取的是body,document.documentElement获取的是html,在任何浏览器上都是如此 相关问题: 1.获取页面滚动条滚动距离 chrome,safar ...

  10. offset,client,scroll,style相关笔记

    1.offsetTop 功能:获取元素上外缘与最近的定位父元素内壁的距离,如果没有定位父元素,则是与文档上内壁的距离 使用方法:js document.querySelector(...).offse ...