处理出1-99的,之后的加上多少hundred和and即可。整百和一千的时候注意一下。

#pragma comment(linker, "/STACK:1024000000,1024000000")
#include<cstdio>
#include<cstring>
#include<cmath>
#include<algorithm>
#include<vector>
#include<map>
#include<set>
#include<queue>
#include<stack>
#include<iostream>
using namespace std;
typedef long long LL;
const double pi=acos(-1.0),eps=1e-;
void File()
{
freopen("D:\\in.txt","r",stdin);
freopen("D:\\out.txt","w",stdout);
}
template <class T>
inline void read(T &x)
{
char c = getchar(); x = ;while(!isdigit(c)) c = getchar();
while(isdigit(c)) { x = x * + c - ''; c = getchar(); }
} int a[];
int b[]; int main()
{
b[]=; b[]=; b[]=; b[]=; b[]=;
b[]=; b[]=; b[]=; b[]=; for(int i=;i<=;i++) a[i]=b[i]; a[]=; a[]=; a[]=; a[]=; a[]=;
a[]=; a[]=; a[]=; a[]=; a[]=; a[]=; for(int i=;i<=;i++) a[i]=a[]+b[i-];
a[]=; for(int i=;i<=;i++) a[i]=a[]+b[i-];
a[]=; for(int i=;i<=;i++) a[i]=a[]+b[i-];
a[]=; for(int i=;i<=;i++) a[i]=a[]+b[i-];
a[]=; for(int i=;i<=;i++) a[i]=a[]+b[i-];
a[]=; for(int i=;i<=;i++) a[i]=a[]+b[i-];
a[]=; for(int i=;i<=;i++) a[i]=a[]+b[i-];
a[]=; for(int i=;i<=;i++) a[i]=a[]+b[i-]; int p;
for(int i=;i<=;i++)
{
if(i%==) p=i, a[i]=b[i/]+;
else a[i]=a[p]++a[i-p];
}
a[]=; for(int i=;i<=;i++) a[i]=a[i]+a[i-]; int T; scanf("%d",&T);
while(T--)
{
int n; scanf("%d",&n);
printf("%d\n",a[n]);
}
return ;
}

HDU 5867 Water problem的更多相关文章

  1. HDU 5867 Water problem (模拟)

    Water problem 题目链接: http://acm.split.hdu.edu.cn/showproblem.php?pid=5867 Description If the numbers ...

  2. HDU 5867 Water problem ——(模拟,水题)

    我发这题只是想说明:有时候确实需要用水题来找找自信的~ 代码如下: #include <stdio.h> #include <algorithm> #include <s ...

  3. HDU 5832A water problem

    大数 判断整除 /* *********************************************** Author :guanjun Created Time :2016/8/14 1 ...

  4. HDU 5832 A water problem(某水题)

    p.MsoNormal { margin: 0pt; margin-bottom: .0001pt; text-align: justify; font-family: Calibri; font-s ...

  5. hdu 5443 The Water Problem

    题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5443 The Water Problem Description In Land waterless, ...

  6. HDU 5832 A water problem (带坑水题)

    A water problem 题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=5832 Description Two planets named H ...

  7. hdu 5443 The Water Problem 线段树

    The Water Problem Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php? ...

  8. HDU 4974 A simple water problem(贪心)

    HDU 4974 A simple water problem pid=4974" target="_blank" style="">题目链接 ...

  9. HDU 5832 A water problem 水题

    A water problem 题目连接: http://acm.hdu.edu.cn/showproblem.php?pid=5832 Description Two planets named H ...

随机推荐

  1. ASP.NET上传大文件出现网页无法显示的问题

    使用FileUpload上传的时候,默认允许大小是4M,而当小于4M的时候正常运行:当超过4M将显示网页无法显示.解决方法如下: 在web.config中的<system.web>< ...

  2. .Net基于RealProxy实现AOP

    一.概述 关于AOP(面向切面编程)还是先讲一个日常经常碰到的场景"错误日志的记录",一般来说我们编码的时候想记录错误日志都是用try..catch来进行捕捉和记录,慢慢的你会发现 ...

  3. Dockerfile文件格式的简单介绍

    # This dockerfile uses the ubuntu image # VERSION 2 - EDITION 1 # Author: docker_user # Command form ...

  4. cocos2d环境及创建一个自己的项目

    一. mac环境:     1.在终端操作,准备好mac系统下的sdk,adt,ndk,ant文件,放在自己的目录中     2.进入mac终端,输入: vim ~/.bash_profile 然后回 ...

  5. gulp备忘

    // npm install gulp gulp-sourcemaps gulp-name gulp-notify del --save-dev // npm install gulp-ruby-sa ...

  6. eclipse集成配置JDK和Tomcat

    在eclipse中集成JDK和tomcat服务器方法很简单,我们可以在服务器上运行想要的东西.比如我们学习javaweb时就要用到. 工具/原料   eclipse,JDK,tomcat 方法/步骤 ...

  7. PRML 第二章mindmap

    PRML第二章的Mindmap,这一章读的比较快,主要是很多计算和证明的过程都跳过了,感觉不是特别需要认真去看每一个公式,能够记住每个小节的结论.公式就可以了.当然有能力.有时间的人还是可以认真读的, ...

  8. jquery 获取当前对象的id取巧验证的一种方法

    <!doctype html><html><head><meta charset="utf-8"><title>titl ...

  9. Ubuntu下安装python相关数据处理

    01. Ubuntu下安装ipython sudo apt-get install ipython 02. Ubuntu下安装pip $ sudo apt-get install python-pip ...

  10. Chrome 插件自定义博客编辑界面

    总觉得博客园的编辑器太白了,特别是在晚上,太明亮了刺眼.在后台设置里面找不到任何可以修改UI的地方,考虑用浏览器插件自己改一下.要是做得好,可以给大家一起用. 新建目录 E:/cnblog.js,添加 ...