http://acm.hdu.edu.cn/showproblem.php?pid=1409

没啥好说的,至今也不知道到底错在哪里了,看了discuss才过的

 #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <string.h>
#include <map>
using namespace std;
char s[];
int solve(char *s){
int i=;
int len=strlen(s);
while(s[i]>=''&&s[i]<=''){
i++;
} if(i==len){
return ;
}
if(s[i]=='.'){
i++;
while(s[i]>=''&&s[i]<=''){
i++;
}
if(i==len){
return ;
}
if(s[i]=='E'){
i++;
if(s[i]=='+'||s[i]=='-'){
i++;
}
if(i==len){
return ;
}
while(s[i]>=''&&s[i]<=''){
i++;
}
if(i==len){
return ;
}
return ;
}
}else if(s[i]=='E'){
if(i==){
return ;
}
i++;
if(s[i]=='+'||s[i]=='-'){
i++;
}
if(i==len){
return ;
}
while(s[i]>=''&&s[i]<=''){
i++;
}
if(i==len){
return ;
}
return ;
}
return ;
}
int t;
int main(){
scanf("%d",&t);
getchar();
while(t--){
gets(s);
if(solve(s)){
cout<<"YES"<<endl;
}else{
cout<<"NO"<<endl;
}
}
return ;
}

HDU1409 Is It a Number的更多相关文章

  1. JavaScript Math和Number对象

    目录 1. Math 对象:数学对象,提供对数据的数学计算.如:获取绝对值.向上取整等.无构造函数,无法被初始化,只提供静态属性和方法. 2. Number 对象 :Js中提供数字的对象.包含整数.浮 ...

  2. Harmonic Number(调和级数+欧拉常数)

    题意:求f(n)=1/1+1/2+1/3+1/4-1/n   (1 ≤ n ≤ 108).,精确到10-8    (原题在文末) 知识点:      调和级数(即f(n))至今没有一个完全正确的公式, ...

  3. Java 特定规则排序-LeetCode 179 Largest Number

    Given a list of non negative integers, arrange them such that they form the largest number. For exam ...

  4. Eclipse "Unable to install breakpoint due to missing line number attributes..."

    Eclipse 无法找到 该 断点,原因是编译时,字节码改变了,导致eclipse无法读取对应的行了 1.ANT编译的class Eclipse不认,因为eclipse也会编译class.怎么让它们统 ...

  5. 移除HTML5 input在type="number"时的上下小箭头

    /*移除HTML5 input在type="number"时的上下小箭头*/ input::-webkit-outer-spin-button, input::-webkit-in ...

  6. iOS---The maximum number of apps for free development profiles has been reached.

    真机调试免费App ID出现的问题The maximum number of apps for free development profiles has been reached.免费应用程序调试最 ...

  7. 有理数的稠密性(The rational points are dense on the number axis.)

    每一个实数都能用有理数去逼近到任意精确的程度,这就是有理数的稠密性.The rational points are dense on the number axis.

  8. [LeetCode] Minimum Number of Arrows to Burst Balloons 最少数量的箭引爆气球

    There are a number of spherical balloons spread in two-dimensional space. For each balloon, provided ...

  9. [LeetCode] Number of Boomerangs 回旋镖的数量

    Given n points in the plane that are all pairwise distinct, a "boomerang" is a tuple of po ...

随机推荐

  1. Lua调用C,C++函数案例

    该程序主要是C++与Lua之间的相互调用示例.执行内容:(1)新建一个lua_State(2)打开常用库,如io,os,table,string等(3)注册C函数(4)导入程序所在目录下所有*.lua ...

  2. centos6.3 安装python2.7.3

    现在比较流行python2.7版本,centos6.3的默认版本是2.6.6,所以需要安装下2.7版本 1.下载安装python2.7 #wget http://www.python.org/ftp/ ...

  3. listen 57

    Secondhand Smoke Exposure Doubled Asthmatic Kids' Hospital Readmissions If your child has asthma哮喘, ...

  4. linux 进程学习笔记-进程信号sigal

    信号(或软中断)是在软件层次上对中断的一个模拟,其运行在“用户空间”,一个进程对另外一个或几个进程通过发送信号来实现异步通信.当接收进程接收到信号后,其可以注册一下处理函数来说对这些信号进行处理(也可 ...

  5. Java 并发 —— Java 标准库对并发的支持及 java.util.concurrent 包

    0. Collections.synchronizedXxx() Java 中常用的集合框架中的实现类:HashSet/TreeSet.ArrayList/LinkedList.HashMap/Tre ...

  6. 【Lintcode】153.Combination Sum II

    题目: Given a collection of candidate numbers (C) and a target number (T), find all unique combination ...

  7. python后台架构Django教程——manage.py命令

    一.manage.py命令选项 manage.py是每个Django项目中自动生成的一个用于管理项目的脚本文件,需要通过python命令执行.manage.py接受的是Django提供的内置命令. 内 ...

  8. 使用ubuntu自带的Remmina Remote Desktop Client远程登录服务器配置

    1.配置:点击new , 配置服务器ip地址.名称.密码 2.打开本机终端执行一下命令: echo xfce4-session>.session echo xfce4-session>.x ...

  9. WPF error: does not contain a static 'Main' method suitable for an entry point

    WPF error: does not contain a static &apos;Main&apos; method suitable for an entry point doe ...

  10. Linq 支持动态字查询集合, 也就是说根据传入的值进行查询。

    Linq 支持动态字查询集合, 也就是说根据传入的值进行查询. 比如我们有个类Patient, 其中有个字段PatientName, 现在有Patient集合, 想要查询PatientName为&qu ...