- 博客(20)
- 资源 (2)
- 收藏
- 关注
原创 堆的应用
#include #include #include #include #include #include #include #include #include #define N 400005#define INF 0x6f6f6f6f#define debug(a)cout<<#a<<' '<<a<<endl;typedef long long LL;using n
2013-04-27 22:47:18 715
原创 省赛热身赛之——Yet Another Story of Rock-paper-scissors
原题:DescriptionAkihisa and Hideyoshi were lovers. They were sentenced to death by the FFF Inquisition. Ryou, the leader of the FFF Inquisition, promised that the winner of Rock-paper-scissors
2013-04-25 18:52:00 1368
原创 省赛热身赛之_Taxi Fare
原题:DescriptionLast September, Hangzhou raised the taxi fares.The original flag-down fare in Hangzhou was 10 yuan, plusing 2 yuan per kilometer after the first 3km and 3 yuan per kilometer
2013-04-25 18:44:46 1259
原创 最长上升子序列
原题;题目描述一个数的序列bi,当b1 2 S的时候,我们称这个序列是上升的。对于给定的一个序列(a1, a2, ..., aN),我们可以得到一些上升的子序列(ai1, ai2, ..., aiK),这里1<= i1 2 K 你的任务,就是对于给定的序列,求出最长上升子序列的长度。输入输入的第一行是序列的长度N (1 输出最长上升子序列的长度。示例输入
2013-04-24 20:44:53 760
原创 hdu 2578——Dating with girls(1)
原题Problem DescriptionEveryone in the HDU knows that the number of boys is larger than the number of girls. But now, every boy wants to date with pretty girls. The girls like to date with the boys
2013-04-23 21:44:42 1333
原创 省AK赛——J - Happy Great BG
原题:DescriptionThe summer training of ZJU ICPC in July is about to end. To celebrate this great and happy day, the coaches of ZJU ICPC TeamNavi andFancy decided to BG everyone! Beside the two
2013-04-18 19:16:29 858
原创 poj1163——The Triangle
原题:Description73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route th
2013-04-18 18:23:51 842
原创 poj2694——逆波兰表达式
原题:问题描述:逆波兰表达式是一种吧运算符前置的算术表达式,例如普通的表达式2+3的逆波兰表示为+23.逆波兰表达式的优点是运算符之间不必有优先级的关系,也不必有括号改变运算次序,例如(2+3)*4的逆波兰表示法为*+2 3 4.本题求解的逆波兰表达式的值。 输入数据:输入为一行,其中运算符和运算数之间都用空格分隔,运算数是浮点数。输出要求:输出为一行,即表达式的值。
2013-04-17 17:47:11 1119
原创 poj2756——二叉树
描述 2756:二叉树" alt="POJ 2756:二叉树" src="http://media.openjudge.cn/images/2756_1.jpg">如上图所示,由正整数1, 2, 3, ...组成了一棵无限大的二叉树。从某一个结点到根结点(编号是1的结点)都有一条唯一的路径,比如从10到根结点的路径是(10, 5, 2, 1),从4到根结点的路径是(4, 2, 1),从
2013-04-16 23:13:51 1193
原创 UVA 11389——The Bus Driver Problem
原题: In a city there are n bus drivers. Also there are n morning bus routes &nafternoon bus routes with various lengths. Each driver is assigned one morning route & one evening route. Fo
2013-04-15 21:02:55 1287
原创 poj2975——Caesar密码
原题:Description据说最早的密码来自于罗马的凯撒大帝。消息加密的办法是:对消息原文中的每个字母,分别用该字母之后的第5个字母替换(例如:消息原文中的每个字母A都分别替换成字母F)。而你要获得消息原文,也就是要将这个过程反过来。 密码字母:A B C D E F G H I J K L M N O P Q R S T U V W X Y Z M 原文字母:V W X
2013-04-13 16:02:54 1159
原创 不给力啊,不给力~~
不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~不给力啊,不给力~~
2013-04-08 22:05:09 970
原创 高精度之——模板
唉,高精度前前后后加起来忙活了一整天,累啊、疲啊、乏啊。。。。 但为了AC事业,还是值了。。。。 #include #include #include #include #include #include #include #include #include #include #include #include #include #inc
2013-04-05 18:37:10 881
原创 高精度之求N!
原题:求数的阶乘。分析:用数组存单个数字。原码: #include#include#define N 3000int f[N];int main(){ int i,j,n; scanf("%d",&n); memset(f,0,sizeof(f)); f[0]=1; for(i=2; i<=n; i++) {
2013-04-05 11:47:10 1952
原创 SDUT——K-based Numbers
原题:题目描述Let’s consider K-based numbers, containing exactly N digits. We define a number to be valid if its K-based notation doesn’t contain two successive zeros. For example:(1)1010230 is a valid
2013-04-04 13:42:00 1196
原创 poj2389——Bull Math
原题:DescriptionBulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... or so they say. Farmer John wonders if their answers ar
2013-04-04 11:53:25 1067
原创 hdu1002——A + B Problem II
原题:Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. InputThe first line of the input contains an integer
2013-04-03 18:28:08 1110
原创 递推专题
一、母牛的故事原题:题目描述有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛?输入输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0输出对于每个测试实例,输出在第n年的时候母牛的数量。 每个输出占一行。示例输入2450示例输出246
2013-04-03 11:21:23 845
原创 省赛AK练习赛之Pizza Cutting
原题:Description Problem EPizza CuttingInput:standard inputOutput: standard output When someone calls Ivan lazy, he claims that it is his intelligence that helps him to be so.
2013-04-01 20:17:38 1082
原创 两道相似题——water-easy&&Javabeans
一、Javabeans原题:DescriptionJavabeans are delicious. Javaman likes to eat javabeans very much. Javaman has n boxes of javabeans. There are exactly i javabeans in thei-th box (i = 1, 2, 3,...n
2013-04-01 19:43:03 1050
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人