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 ...
随机推荐
- JavaScript String 对象实例深入研究
本文主要介绍并分析JavaScript中String对象的具体用法,以及和String对象相关的方法,方便开发者在JavaScript开发中更好地处理字符串. 1. 介绍 String 对象,对字符串 ...
- Object -C 数组 -- 笔记
// // main.m // Array // // Created by facial on 23/8/15. // Copyright (c) 2015 facial_huo. All ...
- java遍历map方法
java 代码: import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class Map ...
- [RxJS] Returning subscriptions from the subscribe function
So far, when writing these subscribe functions, we haven't returned anything. It is possible return ...
- Spring-----1、Spring一个简短的引论
watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvaGVrZXdhbmd6aQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQk ...
- android Json解析详解
JSON的定义: 一种轻量级的数据交换格式,具有良好的可读和便于快速编写的特性.业内主流技术为其提供了完整的解决方案(有点类似于正则表达式 ,获得了当今大部分语 言的支持),从而可以在不同平台间进行数 ...
- LAMP php5.4编译 _php_image_stream_putc等问题
编译时出现下列问题时: In file included from /usr/local/src/php-5.4.6/ext/gd/gd.c:103: /usr/local/src/php-5.4.6 ...
- linux 网络状态工具ss命令
ss命令用于显示socket状态. 他可以显示PACKET sockets, TCP sockets, UDP sockets, DCCP sockets, RAW sockets, Unix dom ...
- linux定时任务1-crontab命令
简单测试例子: 添加定时任务前,注意查看crond服务是否已经启动,如果未启动,则用命令service crond start命令启动. 注意给脚本添加可执行权限. [root@rheltest1 ~ ...
- 自定义控件 TextView 歌词 Lrc
演示 <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> < ...