112A
#include <iostream>
#include <string>
#include <cctype>
using namespace std;
int main()
{
string str1;
string str2;
int length;
while(cin>>str1>>str2)
{
length=str1.size();
int i;
for(i=0; i<length; ++i)
{
str1[i]=tolower(str1[i]);
str2[i]=tolower(str2[i]);
if((str1[i]-'0')>(str2[i]-'0'))
{
cout<<1<<endl;
break;
}
else if((str1[i]-'0') < (str2[i]-'0'))
{
cout<<-1<<endl;
break;
}
}
if(i==length)
cout<<0<<endl;
}
return 0;
}
112A的更多相关文章
- Linux系统升级更新openssh 7.3p1
放在最前面:鉴于网上爬虫猖獗,博客被盗时有发生,这里需要来个链接,大家请认准来自博客园的Scoter:http://www.cnblogs.com/scoter2008,本文将持续更新 最近绿盟给扫描 ...
- User Login Client Identification
w用HTTP认证首部注册用户名. HTTP The Definitive Guide Rather than passively trying to guess the identity of a u ...
- PatentTips - Reducing Write Amplification in a Flash Memory
BACKGROUND OF THE INVENTION Conventional NAND Flash memories move data in the background to write ov ...
- PatentTips - Enhanced I/O Performance in a Multi-Processor System Via Interrupt Affinity Schemes
BACKGROUND OF THE INVENTION This relates to Input/Output (I/O) performance in a host system having m ...
- 探究机器码,深入研究C语言程序的机制
用C高级编程语言写的程序,都要经过编译链接成本机可执行的程序.这个可执行程序究竟是什么呢?在Linux上,我们可以用objdump命令很方便地查看一个可执行程序的机器码.我们从一个简单的示例开始,说一 ...
- 硬件vendor id查询对照列表
Hex-ID Vendor Name003D Lockheed Martin Corp0E11 Compaq1000 Symbios Logic Inc.1001 KOLTER ELECTRONIC1 ...
随机推荐
- Linux模拟网络延迟、丢包等
一.工具介绍 1.netem netem 是 Linux 2.6 及以上内核版本提供的一个网络模拟功能模块.该功能模块可以用来在性能良好的局域网中,模拟出复杂的互联网传输性能,诸如低带宽.传输延迟.丢 ...
- Tomcat服务器使用和debug
1 在写程序的过程中,遇到了tomcat服务器不能重启的情况,要排查出这个错误并解决它. tomcat就像一棵树,我不能对书上的每片叶子的纹理都熟悉,我只能看到树的轮廓.好像之前出现过这个问题,在se ...
- ORM跨表查询问题
环境准备: 表结构 from django.db import models # Create your models here. class Publisher(models.Model): id ...
- node.js 简单的获取命令参数
class Argvs { constructor() { this.argvsAll = this.argvsAll(); } argvsAll() { return process.argv.sl ...
- HTML滚动文字代码 marquee标签
看到一个HTML滚动文字代码 marquee标签的内容,非常全面,而且觉得有点意思,可以让大家为自己博客或者网站设置一个漂亮的滚动文字. 以下是原文: <marquee style=" ...
- ubuntu下hadoop0.20.2报错/dfs/name is in an inconsistent state
Hadoop0.20.2在关机重启后,namenode启动报错: 用bin/hadoop namenode -format重新格式化一下就好了.这个问题已经出现了两次.每次都格式化,显然不是一个专业的 ...
- express工程的优化和请求参数的处理
1.让工程自动刷新 在Express的默认工程中,ejs, jade等模板的改变会立刻被渲染到浏览器中,但是js的改变不能立即刷新.这时候我们要用到一些自动刷新工具, 如 nodemon, super ...
- 创建结点 与 分配内存 Function to create a Node. Allocates memory for a new node. 主动申请内存 链表 指针的写法
Self Referential Data Structure in C - create a singly linked list http://www.how2lab.com/programmin ...
- An optimizer that trains as fast as Adam and as good as SGD. https://www.luolc.com/publications/ad…
设立3个指针pa.pb和pc,其中pa和pb分别指向La表和Lb表中当前待比较插入的结点,而pc指向Lc表中当前最后一个结点:若pa->data<=pb->data,则将pa所指结点 ...
- php之code tips
使用list来实现一次获取explode后的特定段值: list( , $mid) = explode(';', $string); 使用NULL === 来代替is_null: is_null和 N ...