HDU5914
Triangle
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 336 Accepted Submission(s): 229
Problem Description
any three of the remaining sticks.
Input
For each test case, there is only one line describing the given integer n (1≤n≤20).
Output
Sample Input
Sample Output
Source
//2016.10.08
#include <iostream>
#include <cstdio>
#include <cstring> using namespace std;
int ans[] = {, , , , , , , , , , , , , , , , , , , , };
int main()
{
int T, n, kase = ;
scanf("%d", &T);
while(T--)
{
scanf("%d", &n);
printf("Case #%d: %d\n", ++kase, ans[n]);
} return ;
}
HDU5914的更多相关文章
- HDU 5914 Triangle 斐波纳契数列 && 二进制切金条
HDU5914 题目链接 题意:有n根长度从1到n的木棒,问最少拿走多少根,使得剩下的木棒无论怎样都不能构成三角形. 题解:斐波纳契数列,a+b=c恰好不能构成三角形,暴力就好,推一下也可以. #in ...
随机推荐
- ural1003 Parity
Parity Time limit: 2.0 secondMemory limit: 64 MB Now and then you play the following game with your ...
- java采用Apache FileUpload组件实现上传
可见:FileItemSteam(servletFileUpload.getItemIterator(httpServletRequest))速度要快于FileItem(servletFileUplo ...
- 轻量级别的Cache和反向代理软件---Varnish
1.Varnish描述 1.1 Varnish的结构与特点 Varnish是一个轻量级别的Cache和反向代理软件,先进的设计理念和成熟的设计框架是Varnish的主要特点: 基于内存进行缓存,重启后 ...
- HDU 1068 Girls and Boys 二分图最大独立集(最大二分匹配)
Girls and Boys Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) ...
- PHP json不转义
json_encode($result, JSON_UNESCAPED_UNICODE);
- python----mysql链接汉字编码的问题
解决python连接mysql,UTF-8乱码问题 1. Python文件设置编码 utf-8 (文件前面加上 #encoding=UTF-8) 2. MySQL数据库charset=utf ...
- windows下使用waveout函数族播放wav文件
要使用waveout函数组,族,首先要知道几个数据结构,首先是这个 typedef struct tWAVEFORMATEX { WORD wFormatTag; /* 格式的类型 */ WORD n ...
- linux 驱动入门6
看/sys目录经常看到bus device driver class. 这也是网上大量说的驱动驱动模型.这些的关系得熟悉得明白吧.是的.今天我先不整他们的关系.先逐个击破,然后再统一来理清楚他们之间的 ...
- LPC1788的EMC驱动norflash
Norflash型号为sst39vf32 #ifndef __NORFLASH_H_ #define __NORFLASH_H_ #include "common.h" #incl ...
- dom4j生成和解析xml文件
dom4j生成和解析xml文件 要生成和解析如下格式的xml文件: <?xml version="1.0" encoding="UTF-8"?> & ...