处理出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. 结构-行为-样式-angularJs 指令实现滚动文字

    最近在做XX项目的大屏展示页面,有一个表格需要用到这个滚动效果,于是就写了个指令,记录下,共同学习. Html代码: <td word-roll tword="item"&g ...

  2. 用php 进行对文件的操作 (上)

    如何让自己磁盘中的文件夹和目录显示在网页上?那就来看一下,用php是怎么来操作他们的吧 php中文件,一般包含两块内容,文件和目录 先来一句一句的看代码,及他的作用 运行后看一下结果 file 指的是 ...

  3. 用友金蝶SQL数据库误格式化恢复 SQL数据库修复 SQL数据库恢复 工具 方法

    用友金蝶SQL数据库误格式化恢复 SQL数据库修复 SQL数据库恢复 硬盘误格式化.重分区.重装操作系统覆盖 SQL数据解决方法 [客户名称]:贵州铜仁市开天驾驶人培训中心 [软件名称]:用友T3普及 ...

  4. Android学习笔记(二)Git和Github

    一.添加SSH Key ssh-keygen -t rsa -C "email@example.com" 遇到提示只需要一直确认.用户目录(如/root)下会生成一个.ssh文件夹 ...

  5. 修改/etc/resolv.conf又恢复到原来的状态?[转]

    新装一台机器环境为服务器主板,双网卡,系统为CentOS5.4 ,eth0为内网ip,eth1为公网ip.但是由于在本地测试,设置的内网ip,域名服务器同样使用的是上海本地的域名解析,没有问题,可以上 ...

  6. solr最佳实践

    管理页面 页面地址:http://{ip}:{port}/solr/#/ 管理页面的data-import页可以手动重建索引,configuration指定了数据源,重建索引也可以通过http请求触发 ...

  7. js格式化时间为JSON格式 ajax提交 后台处理

    var effectRow = new Object();if ($('#grd_infos').datagrid('getChanges').length) {    var update = $( ...

  8. HDU 1272 小希的迷宫(乱搞||并查集)

    小希的迷宫 Problem Description 上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走.但是她设计迷宫的思路不一样,首先她认为所有 ...

  9. android 开发心得杂记

    1.Android周刊关注. 2.4季Android性能优化典范 胡凯 http://mp.weixin.qq.com/s?__biz=MzA4NTQwNDcyMA==&mid=4021354 ...

  10. vimtutor基础教程

    第一讲: 1. 光标在屏幕文本中的移动既可以用箭头键,也可以使用 hjkl 字母键.         h (左移)       j (下行)       k (上行)     l (右移)  2. 欲 ...