hdu-5703 Desert(水题)
题目链接:
Desert
Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 65535/32768 K (Java/Others)
Write a program to calculate how many different ways the tourist can drink up the water.
Next T lines contain the number n(1≤n≤1000000) for each test case.
Each line contains the binary number which represents number of different ways to finish up the water specified in the test case.
#include <bits/stdc++.h>
/*
#include <iostream>
#include <queue>
#include <cmath>
#include <map>
#include <cstring>
#include <algorithm>
#include <cstdio>
*/
using namespace std;
#define Riep(n) for(int i=1;i<=n;i++)
#define Riop(n) for(int i=0;i<n;i++)
#define Rjep(n) for(int j=1;j<=n;j++)
#define Rjop(n) for(int j=0;j<n;j++)
#define mst(ss,b) memset(ss,b,sizeof(ss));
typedef long long LL;
const LL mod=1e9+;
const double PI=acos(-1.0);
const LL inf=1e18;
const int N=1e6+;
int n,q;
int main()
{
int t;
scanf("%d",&t);
while(t--)
{
scanf("%d",&n);
n--;
printf("");
while(n--)printf("");
printf("\n");
}
return ;
}
hdu-5703 Desert(水题)的更多相关文章
- HDU 5703 Desert 水题 找规律
已知有n个单位的水,问有几种方式把这些水喝完,每天至少喝1个单位的水,而且每天喝的水的单位为整数.看上去挺复杂要跑循环,但其实上,列举几种情况之后就会发现是找规律的题了= =都是2的n-1次方,而且这 ...
- hdu 5210 delete 水题
Delete Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5210 D ...
- hdu 1251 (Trie水题)
统计难题 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)Total Submi ...
- HDU - 5703 Desert 【找规律】
题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5703 题意 给出一杯容量为N的水 每次至少喝1个单位 有多少种不同的方式喝完 比如 给出3 就有4种方 ...
- HDU 4493 Tutor 水题的收获。。
题目: http://acm.hdu.edu.cn/showproblem.php?pid=4493 题意我都不好意思说,就是求12个数的平均数... 但是之所以发博客,显然有值得发的... 这个题最 ...
- hdu 4802 GPA 水题
GPA Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4802 Des ...
- hdu 4493 Tutor 水题
Tutor Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=4493 D ...
- hdu 5495 LCS 水题
LCS Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=5495 Descr ...
- hdu 4891 模拟水题
http://acm.hdu.edu.cn/showproblem.php?pid=4891 给出一个文本,问说有多少种理解方式. 1. $$中间的,(s1+1) * (s2+1) * ...*(sn ...
随机推荐
- PropertiesUtil 读取配置文件工具类
package org.konghao.basic.util; import java.io.FileInputStream; import java.io.FileNotFoundException ...
- spring4 定时任务
一.spring 定时任务 spring 定时任务 ,最好使用quartz 实现.下面我以spring4为例 二.实战(默认) 1.pom配置 <!-- spring time task --& ...
- 【转】获取手机的ipv4地址
http://blog.csdn.net/yueqinglkong/article/details/17391051 直接贴代码: public class GetLocalIpAddress ext ...
- Receive Windows Messages In Your Custom Delphi Class - NonWindowed Control - AllocateHWnd
http://delphi.about.com/od/windowsshellapi/a/receive-windows-messages-in-custom-delphi-class-nonwind ...
- 神秘常量复出!用0x077CB531计算末尾0的个数 -- De Bruijn 序列
http://www.matrix67.com/blog/archives/3985 神秘常量复出!用0x077CB531计算末尾0的个数 大家或许还记得 Quake III 里面的一段有如天书般的代 ...
- Java常见排序算法之折半插入排序
在学习算法的过程中,我们难免会接触很多和排序相关的算法.总而言之,对于任何编程人员来说,基本的排序算法是必须要掌握的. 从今天开始,我们将要进行基本的排序算法的讲解.Are you ready?Let ...
- myeclipse 10 载入新的项目报错Cannot return from outside a function or method
myeclipse 10 载入新的项目报错Cannot return from outside a function or method 解决方法: 方法一: window -->prefere ...
- Microsoft SQL Server 2008 基本安装说明
Microsoft SQL Server 2008 基本安装说明 安装SQL2008的过程与SQL2005的程序基本一样,只不过在安装的过程中部分选项有所改变,当然如果只熟悉SQL2000安装的同志来 ...
- .NET连接SAP系统专题:C#调用RFC代码(三)
本文就说明在C#中如何编写代码来调用SAP中的RFC函数获取数据. 首先需要引用两个NCO3.0的DLL DLL下载地址:http://files.cnblogs.com/mengxin523/SAP ...
- Codeforces Gym 100231G Voracious Steve 记忆化搜索
Voracious Steve 题目连接: http://codeforces.com/gym/100231/attachments Description 有两个人在玩一个游戏 有一个盆子里面有n个 ...