题目传送门

 /*
题意:比较型号的大小
模拟:坑点在长度可能为5,此时设为'A'
*/
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <ctime>
#include <cstdlib>
using namespace std; const int MAXN = 1e4 + ;
const int INF = 0x3f3f3f3f;
char s1[], s2[]; char check(void)
{
for (int i=; i<=; ++i)
{
if (s1[i] < s2[i]) return '<';
else if (s1[i] > s2[i]) return '>';
} if (s1[] == s2[])
{
if (s1[] == '\0') s1[] = 'A';
if (s2[] == '\0') s2[] = 'A';
if (s1[] < s2[]) return '<';
else if (s1[] > s2[]) return '>';
} return '=';
} int main(void) //HDOJ 5099 Comparison of Android versions
{
//freopen ("J.in", "r", stdin); int t, cas = ; scanf ("%d", &t);
while (t--)
{
scanf ("%s%s", s1, s2);
char ch1 = (s1[] == s2[]) ? '=' : (s1[] < s2[]) ? '<' : '>';
char ch2 = check ();
printf ("Case %d: %c %c\n", ++cas, ch1, ch2);
} return ;
} /*
Case 1: > >
Case 2: = <
*/

模拟 HDOJ 5099 Comparison of Android versions的更多相关文章

  1. HDOJ 5099 Comparison of Android versions 坑题

    现场赛的时候错了十四次. . ... Comparison of Android versions Time Limit: 2000/1000 MS (Java/Others)    Memory L ...

  2. HDU5099——Comparison of Android versions(简单题)(2014上海邀请赛重现)

    Comparison of Android versionsProblem DescriptionAs an Android developer, itˇs really not easy to fi ...

  3. Comparison of Android versions(strcmp的应用)

    Description As an Android developer, itˇs really not easy to figure out a newer version of two kerne ...

  4. hdoj-5099-Comparison of Android versions

    Comparison of Android versions Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (J ...

  5. Chrome模拟手机浏览器(iOS/Android)的三种方法,亲测无误!

    大网站都有推出自己的手机访问版本页面,不管是新闻类还是视频网站,我们在电脑是无法直接访问到手机网站的,比如我经常访问一个3g.qq.com这个手机站点,如果在电脑上直接打开它,则会跳转到其它页面,一般 ...

  6. 用Fiddler可以设置浏览器的UA 和 手动 --Chrome模拟手机浏览器(iOS/Android)的三种方法,亲测无误!

    附加以一种软件的方法是:用Fiddler可以设置浏览器的UA 以下3种方法是手动的 通过伪装User-Agent,将浏览器模拟成Android设备. 第一种方法:新建Chrome快捷方式 右击桌面上的 ...

  7. 模拟 HDOJ 5095 Linearization of the kernel functions in SVM

    题目传送门 /* 题意:表达式转换 模拟:题目不难,也好理解题意,就是有坑!具体的看测试样例... */ #include <cstdio> #include <algorithm& ...

  8. 模拟 HDOJ 5387 Clock

    题目传送门 /* 模拟:这题没啥好说的,把指针转成角度处理就行了,有两个注意点:结果化简且在0~180内:小时13点以后和1以后是一样的(24小时) 模拟题伤不起!计算公式在代码内(格式:hh/120 ...

  9. 模拟 HDOJ 4552 Running Rabbits

    题目传送门 /* 模拟:看懂题意,主要是碰壁后的转向,笔误2次 */ #include <cstdio> #include <algorithm> #include <c ...

随机推荐

  1. 甘特图——Excel搞定

    1. 甘特图 概念 甘特图就是条形图的一种. 甘特图是基于作业排序的目的,将活动与时间联系起来的最早尝试之中的一个. 这是什么意思呢?也就是说甘特图用来表示什么时间做什么事情,相当于一个计划安排.并且 ...

  2. aop中获取方法的注解

    @Around(value="@annotation(apiLog)") public Object around(ProceedingJoinPoint pjp, ApiLog ...

  3. Hibernate的一些使用技巧

    1.Hibernate是如今最流行的开源对象关系映射(ORM)持久化框架,SSH框架组合是很多JavaEE工程的首选,java持久化框架(JPA)的设计师是Hibernate的作者,因此对于Hiber ...

  4. HTML canvas

    什么是 Canvas? HTML5 的 canvas 元素使用 JavaScript 在网页上绘制图像. 画布是一个矩形区域,您可以控制其每一像素. canvas 拥有多种绘制路径.矩形.圆形.字符以 ...

  5. MySQL安装、安装时未提示输入密码、如何修改密码小结

    http://blog.csdn.net/fr555wlj/article/details/54971412

  6. javascript:;用法集锦

    如果是个# ,就会出现跳到顶部的情况,个人收藏的几种解决方法:1:<a href="####"></a> 2:<a href="javasc ...

  7. YTU 2442: C++习题 矩阵求和--重载运算符

    2442: C++习题 矩阵求和--重载运算符 时间限制: 1 Sec  内存限制: 128 MB 提交: 1457  解决: 565 题目描述 有两个矩阵a和b,均为2行3列.求两个矩阵之和.重载运 ...

  8. lucene 5可以运行的demo

    package hello; import java.io.IOException; import org.apache.lucene.analysis.Analyzer; import org.ap ...

  9. Perl解析JSON数据精解

    简介:JSON(JavaScript Object Notation) 是一种轻量级的数据交换格式.它基于JavaScript(Standard ECMA-262 3rd Edition - Dece ...

  10. SPOJ:One piece(不错的带权括号最大匹配问题)

    One of DB and TN common interests is traveling. One day, they went to Grand Line and found One Piece ...