CodeForces 616A(水题)
2016-01-24 01:07
260 查看
while(t--)
最后结果t=-1
最后结果t=-1
#include <iostream> #include <string> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <algorithm> #include <stack> using namespace std; #define MEM(a,b) memset(a,b,sizeof(a)) #define pf printf #define sf scanf #define debug printf("!/n") #define INF 1000 #define MAX(a,b) a>b?a:b #define blank pf("\n") #define LL long long char a[10],b[10]; int main() { int i,j; while(~sf("%s",a)) { sf("%s",b); int m=0,n=0; while(a[m]=='0') m++; while(b =='0') n++; int len1 = strlen(a)-m; int len2 = strlen(b)-n; if(len1>len2) pf(">\n"); else if(len2>len1) pf("<\n"); else { while(len1--) { if(a[m]>b ) { pf(">\n"); break; } else if(a[m]<b ) { pf("<\n"); break; } else { m++; n++; } } if(len1==-1) pf("=\n"); } } return 0; }
相关文章推荐
- NYoj21 三个水杯
- 【Linux】LAMP架构之以模块方式让php和httpd搭档工作
- 在linux(ubuntu)下编译VLC中出现的问题
- 系统右键菜单添加剪贴板清空项(隐藏DOS窗口)
- Android源码版本
- 两次windows系统环境下jdk下载安装与环境配置经验
- 通过struts2-spring-plugin集成Struts2和Spring,报错:ClassNotFound:*Interceptor.......
- hdu1143 Tri Tiling
- 设计模式六大原则(1):单一职责原则
- [V4L2+RTP] FireWRT远程视频监控-2
- hellocharts-android开源图表库(效果非常好)
- 3 final、抽象类、值交换、接口、多态
- java volatile关键字
- 雪中西湖游
- FireWRT(MT7621)远程视频监控-1
- mysql笔记03 查询性能优化
- Mybatis自动生成insert,update,delete
- ArcGIS 地图切图系列之(二)JAVA实现
- Proguard
- [NOI2005]维修数列 (Splay)