hdu Children’s Queue
http://acm.hdu.edu.cn/game/entry/problem/show.php?chapterid=3§ionid=1&problemid=10
#include <cstdio>
#include <cstring>
#include <algorithm>
#define maxn 300000
using namespace std; int n;
int a[][]; void inti()
{
a[][]=;
a[][]=;
a[][]=;
a[][]=;
for(int i=; i<=; i++)
{
int c=;
for(int j=; j<=; j++)
{
a[i][j]=a[i-][j]+a[i-][j]+a[i-][j]+c;
c=a[i][j]/;
a[i][j]%=;
}
}
} int main()
{
inti();
while(scanf("%d",&n)!=EOF)
{
int i=4a99;
while(i>=&&!a[n][i]) i--;
while(i>=)
{
printf("%d",a[n][i]);
i--;
}
printf("\n");
}
return ;
}
hdu Children’s Queue的更多相关文章
- HDU 1297 Children’s Queue (递推、大数相加)
Children’s Queue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- Children’s Queue(hdu1297+递推)
Children’s Queue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Tot ...
- HDU1297 Children’s Queue (高精度+递推)
Children’s Queue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- 【高精度递推】【HDU1297】Children’s Queue
Children's Queue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- Children’s Queue
Children's Queue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- (递推 大整数) Children’s Queue hdu1297
Children’s Queue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- HDOJ 1297 Children’s Queue
版权声明:来自: 码代码的猿猿的AC之路 http://blog.csdn.net/ck_boss https://blog.csdn.net/u012797220/article/details/3 ...
- HDUOJ Children’s Queue
Children’s Queue Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- HDOJ/HDU 1297 Children’s Queue(推导~大数)
Problem Description There are many students in PHT School. One day, the headmaster whose name is Pig ...
随机推荐
- yum nfs
linux下3大文件共享方法 1.NFS NFS服务器配置 编辑/etc/exports,在文件中列出,要共享的目录.书写规则是:共享目录主机(参数).并且每条规则占据一行.例如: /mnt/mp3 ...
- NSOutputStream\NSInputStream
NSOutputStream-保存网络资源到本地 _filePath = [[NetworkManager sharedInstance] pathForTemporaryFileWithPrefix ...
- Jenkins错误“editable email notification aborted due to exception”的问题解决
如果出现:“editable email notification aborted due to exception”这样的错误,尝试升级一下jenkins,估计是这个导致的. 解决思路: http: ...
- 【基础练习】【vector】codevs3393 序列倒置
版权信息 转载请注明出处 [ametake版权全部]http://blog.csdn.net/ametake欢迎来看 题目非常easy,本质还是练习一下vector 题目描写叙述 Descriptio ...
- Debian编译内核
转自 yuzibo博客 http://yuzibo.github.io/DebianBuildKernel.html 最终成功一次了 之前又一次编译了好多次.可惜没有一次成功的,说实话.借助Debia ...
- MySQL主从复制(Master-Slave)与读写分离(MySQL-Proxy)
MySQL主从复制(Master-Slave)即同步与读写分离(MySQL-Proxy)即集群
- 数据库日期类型转换–HSQL
最近遇到要用HSQL查询离某个时间的后十分钟的记录,不像Oracle和SqlServer中可以直接有函数转换,而是直接通过'+'来得到 Hsql Document -- standard forms ...
- [MongoDB] Introduce to MongoDB
1. Use or create a database: use wandRecorder You will use keyword to create or fetch a exicting dat ...
- quick-cocos2dx学习笔记
20140603 下载quick,拉开拉链,跑setup.bat(注意,setup事就是在系统环境变量里加入QUICK_COCOS2DX_ROOT,假设不运行这个的话,启动player时会报找不到fr ...
- Java基础知识强化28:Scanner类之Scanner类的概述
1.Scanner概述: JDK5以后用于获取用户的键盘输入 2.Scanner的构造方法: public Scanner (InputStream source) ...