处理出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. gRPC helloworld service, RESTful JSON API gateway and swagger UI

    概述 本篇博文完整讲述了如果通过 protocol buffers 定义并启动一个 gRPC 服务,然后在 gRPC 服务上提供一个 RESTful JSON API 的反向代理 gateway,最后 ...

  2. 结构-行为-样式-css&html横纵居中最佳实践

    最近在做手机端的H5项目,有个标题是在一根横线中的,就是水平居中加垂直居中(如图一).这应该是前端开发中经常遇到的一个场景了,做的次数多了就有一些体会,我今天就总结了下这种结构的实现思路:首先,用元素 ...

  3. phpwamp单身狗模式的详解与分析,单身狗模式/即霸体模式的作用讲解。

    最近有学生在使用PHPWAMP的时候,问我霸体模式的作用. 学生问:老师,PHPWAMP里面的霸体模式是什么意思,有什么用? 回答:额...就是以前我发布测试版的时候,模式切换里面的单身狗模式. 学生 ...

  4. 双色球机选算法java实现

    双色球机选算法java实现 一.代码 package com.hdwang; import java.util.Random; /** * Created by admin on 2017/1/10. ...

  5. quagga源码分析--内核通信netlink

    Linux操作系统中当CPU处于内核状态时,可以分为有用户上下文的状态和执行硬件.软件中断两种.其中当处于有用户上下文时,由于内核态和用户态的内 存映射机制不同,不可直接将本地变量传给用户态的内存区: ...

  6. BTE 增强

    BTE的设计思路还是比较简单,和BADI有点类似.在标准程序中留有OPEN_FI的出口(以函数OPEN_FI_PERFORM_event id_type的形式存在),然后提供一个可配置的TABLE,可 ...

  7. 【NOIP2012】DAY1+DAY2题解

    不贴代码的原因是我的代码在初中机房.忘记带过来了. DAY 1 T1随便搞,但是字符串相关的题我经常犯蠢 T2 一个结论题,OAO但是需要高精度写. 具体就是按左手的数除右手的数(还是怎么的来着)排个 ...

  8. 第11章 使用PHP从Web访问MySQL数据库

    1.过滤用户可能值其搜索条件的起始或结束位置不小心输入的空白字符: 应用trim(): 2.转义数据(第4章)函数:addslashes(),stripslashes(),get_magic_quot ...

  9. mac下virtualbox配置全网通

    mac下virtualbox实现主机和虚拟机.虚拟机和外网互访的方案 全局添加Host-Only网络 Adapter IPv4 Address:192.168.56.1 IPv4 Network Ma ...

  10. 在Windows上创建同样的Linux操作环境

    在之前的文章中,介绍了我在GNU/Linux图形界面环境下所使用的工具集合.其基本目的是在保证占用最少系统资源的条件下,将电脑操作效率推向极致.这样的工具组合尤如瑞士军刀一般,简洁.高效.功能全面.与 ...