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. HTML/CSS实现的搜索框

    谷歌和百度首页的搜索框都是<input>+<button>模式的,bing的搜索框感觉要好点儿.简言之,就是将提交按钮放到<input>中,其实这是做不到的,只能伪 ...

  2. BZOJ 1612 [Usaco2008 Jan]Cow Contest奶牛的比赛:floyd传递闭包

    题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=1612 题意: 有n头牛比赛. 告诉你m组(a,b),表示牛a成绩比牛b高. 保证排名没有并 ...

  3. Smarty模板重点汇总

    Smarty模板重点回顾:1.功能:前后端分离:2.实现方法:通过使用Smarty的核心类来实现,利用display方法来读取模板文 件,用正则进行替换,替换完保存到临时文件,再将临时文件加载到当前页 ...

  4. python学习笔记:第五天( 字典)

    Python3 字典 字典是另一种可变容器模型,且可存储任意类型对象. 字典的每个键值(key=>value)对用冒号(:)分割,每个对之间用逗号(,)分割,整个字典包括在花括号({})中 ,格 ...

  5. POJ 2497 Strategies

    题意:有三个人,Bill, Steve and Linus,他们参加竞赛,给出竞赛的题目和比赛时间,然后给出每道题需要的时间(他们解同一道题花的时间相同),然后他们有不同的策略来做题.每道题的得分为当 ...

  6. display:inline-bock的注意

    前端当一组元素设置为display:inline-block;时,每个元素之间的回车会被作为一个空格.

  7. 2018.2.27 RF module distance test part I

    Last week,we finish 20  pcs EP2 sample for RF module, Fistly,we need to test PCBA  performance test ...

  8. leetcode 229. Majority Element II(多数投票算法)

    就是简单的应用多数投票算法(Boyer–Moore majority vote algorithm),参见这道题的题解. class Solution { public: vector<int& ...

  9. Codeforces Round #394 (Div. 2) 题解

    无需吟唱,直接传送 problem A 题目大意 已知有n个偶数,m个奇数,问这些数有没有可能组成一个严格递增1的序列 题解 判断abs(n,m) <= 1即可,注意n,m均为0的情况. Cod ...

  10. FFmpeg命令:几种常见场景下的FFmpeg命令(摄像头采集推流,桌面屏幕录制推流、转流,拉流等等)

    前提: 首先你得有FFmpeg(ffmpeg官网快捷通道:http://ffmpeg.org/) 再者,推流你得有个流媒体服务,个人测试用小水管:rtmp://eguid.cc:1935/rtmp/t ...