水题

#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std; const int maxn=+;
char s1[maxn],s2[maxn];
int a[maxn],b[maxn];
int lena,lenb;
int c; int main()
{
scanf("%s%s",s1,s2);
lena=strlen(s1);
lenb=strlen(s2); c=; for(int i=lena-;i>=;i--) a[c++]=s1[i]-'';
c=; for(int i=lenb-;i>=;i--) b[c++]=s2[i]-''; for(int i=lena;i<max(lena,lenb);i++) a[i]=;
for(int i=lenb;i<max(lena,lenb);i++) b[i]=; int flag=;
for(int i=max(lena,lenb)-;i>=;i--)
{
if(a[i]!=b[i]){
if(a[i]>b[i]) printf(">\n");
else printf("<\n");
flag=;
break;
}
}
if(!flag) printf("=\n");
return ;
}

CodeForces 616A Comparing Two Long Integers的更多相关文章

  1. Codeforces Educational Codeforces Round 5 A. Comparing Two Long Integers 高精度比大小,模拟

    A. Comparing Two Long Integers 题目连接: http://www.codeforces.com/contest/616/problem/A Description You ...

  2. Educational Codeforces Round 5 A. Comparing Two Long Integers

    A. Comparing Two Long Integers time limit per test 2 seconds memory limit per test 256 megabytes inp ...

  3. 第六周周赛——AK机会不易得,好好把握题解(出自HDU5650,codeforces 616A,624A,659A,655A,658A)

    A题: A题题目链接 题目描写叙述: 位运算 TimeLimit:1000MS  MemoryLimit:65536KB 64-bit integer IO format:%I64d Problem ...

  4. codeforces Educational Codeforces Round 5 A. Comparing Two Long Integers

    题目链接:http://codeforces.com/problemset/problem/616/A 题目意思:顾名思义,就是比较两个长度不超过 1e6 的字符串的大小 模拟即可.提供两个版本,数组 ...

  5. Educational Codeforces Round 37-G.List Of Integers题解

    一.题目 二.题目链接 http://codeforces.com/contest/920/problem/G 三.题意 给定一个$t$,表示有t次查询.每次查询给定一个$x$, $p$, $k$,需 ...

  6. Codeforces 1051E Vasya and Big Integers&1051F The Shortest Statement

    1051E. Vasya and Big Integers 题意 给出三个大整数\(a,l,r\),定义\(a\)的一种合法的拆分为把\(a\)表示成若干个字符串首位相连,且每个字符串的大小在\(l, ...

  7. Codeforces 920 G List Of Integers

    题目描述 Let's denote as L(x,p)L(x,p) an infinite sequence of integers yy such that gcd(p,y)=1gcd(p,y)=1 ...

  8. Codeforces 1051E. Vasya and Big Integers

    题意:给你N个点M条边,M-N<=20,有1e5个询问,询问两点的最短距离.保证没有自环和重边. 题解:连题目都在提示你这个20很有用,所以如果是颗树的话那任意两点的最短距离就是求一下lca搞一 ...

  9. CodeForces 616A(水题)

    while(t--) 最后结果t=-1 #include <iostream> #include <string> #include <cstring> #incl ...

随机推荐

  1. A*搜寻算法(A星算法)

    A*搜寻算法[编辑] 维基百科,自由的百科全书 本条目需要补充更多来源.(2015年6月30日) 请协助添加多方面可靠来源以改善这篇条目,无法查证的内容可能会被提出异议而移除. A*搜索算法,俗称A星 ...

  2. block 的演练和使用

    概念 block 是 C 语言的 是一种数据类型,可以当作参数传递 是一组预先准备好的代码,在需要的时候执行 动画 block 回顾 self.demoView.center = CGPointMak ...

  3. URL的# (转)

    http://www.ruanyifeng.com/blog/2011/03/url_hash.html

  4. cookie使用随笔

    cookie是一种浏览器缓存,可以理解为存放在浏览器上的一种小文件. 大小数目限制: 不同浏览器对于大小和数目均有不一样的限制,大小一般为4k,数目从30~50个(视浏览器类型),以键值对的形式存储, ...

  5. cocos2d-x中使用tinyxml遇到的问题及解决

    1.问题: cocos2d-x集成tinyxml后在vs下运行正常,但是在Android下在读取xml文件时发生异常,读取时使用的是LoadFile函数 2. 解决方案: 先把xml文件内容读取到内存 ...

  6. web项目docker化的两种方法

    标题所讲的两种方法其实就是创建docker镜像的两种方法 第一种:启动镜像后进入容器中操作,将需要的软件或者项目移动到容器中,安装或者部署,然后退出即可 第二种:编写dockerfile,将需要的镜像 ...

  7. CSS样式 初学

    CSS样式 参考网站: CSS用法:3种 一:直接样式表 如<p style="color:red;">这是一个段落</p> 二:内部样式表 如:<s ...

  8. Swift -> Optional嵌套 探讨

    准备运动:Optional 的介绍 王巍的<Swifter>一书中,介绍了一个有用的命令:在 LLDB 中输入 fr v -R foo,可以查看foo 这个变量的内存构成.我们稍后的分析将 ...

  9. Android中Canvas绘图基础详解(附源码下载) (转)

    Android中Canvas绘图基础详解(附源码下载) 原文链接  http://blog.csdn.net/iispring/article/details/49770651   AndroidCa ...

  10. 转载 Deep learning:四(logistic regression练习)

    前言: 本节来练习下logistic regression相关内容,参考的资料为网页:http://openclassroom.stanford.edu/MainFolder/DocumentPage ...