轻院题库解题报告
inlcude_cx
这个作者很懒,什么都没留下…
展开
-
轻院题库:1478 Problem B:不死兔…
不死兔子,斐波那契数列用矩阵乘法做的,调试了半天,竟然一次通过,太出我意外了|0 1|*|f[i-1]|= |f[i] ||1 1| |f[i] | |f[i+1]|两矩阵相乘就得出来了,然后根据乘法交换率,先算出前面矩阵的n次幂就行了#include#include__int64 x[2][2],y[2][2];void cheng(int s){ __in原创 2012-12-05 17:07:21 · 318 阅读 · 0 评论 -
ZZULI 1595 Pills
PillsTime Limit:1000MS MemoryLimit:65536KTotal Submit:13 Accepted:9DescriptionAunt Lizzie takes half apill of a certain medicine every day. She starts with a bottle thatcontains N pills.On t原创 2012-12-05 17:14:22 · 620 阅读 · 0 评论 -
ZZULI 1597 Maze(果断DFS)
MazeTime Limit:1000MS MemoryLimit:65536KTotal Submit:6 Accepted:3DescriptionTechnicians in a pathologylab analyze digitized images of slides. Objects on a slide areselected for analysis by a m原创 2012-12-05 17:14:26 · 365 阅读 · 0 评论 -
ZZULI 1599(POJ 1975)Median Wei…
Median Weight BeadTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2182Accepted: 1076DescriptionThere are N beads which of the same shape andsize, but with different weights原创 2012-12-05 17:14:28 · 514 阅读 · 0 评论 -
ZOJ 1539(ZZULI 1606) LOT (递…
LotTime Limit: 2 Seconds Memory Limit: 65536 KBOut of N soldiers, standing in one line, it is required tochoose several to send them scouting.In order to do that, the following operation is原创 2012-12-05 17:14:45 · 808 阅读 · 0 评论 -
HDU 4160 (ZZULI 1598) Dolls(二分…
DollsTime Limit:1000MS Memory Limit:65536KTotal Submit:48 Accepted:16DescriptionDo you remember the box ofMatryoshka dolls last week? Adam just got another box of dolls fromMatryona. This time,原创 2012-12-05 17:14:50 · 334 阅读 · 0 评论 -
ZZULI 1617 (HDU 1686)Oulipo (…
OulipoTime Limit:1000MS Memory Limit:65536KTotal Submit:63 Accepted:18DescriptionThe French author GeorgesPerec (1936–1982) once wrote a book, La disparition, without theletter 'e'. He was a mem原创 2012-12-05 17:15:11 · 401 阅读 · 0 评论 -
ZZULI 1498 做梦!
这个是典型的背包问题,研究了好久才做出来的,不会的话看看我的博客上面的背包九讲啊!http://blog.sina.com.cn/s/blog_7b7c7c5f0100qmpt.html#include#includeint max(int a,int b){ if(a>=b) return a; else return b;}int main(){ int f[102][原创 2012-12-05 17:07:19 · 296 阅读 · 0 评论 -
ZZULI 等差数列 解题报告
这个题可以用搜索的方法遍历所有情况,先排序,然后以前两个数为数列的前两个数,然后寻找后面的数列,记下长度,并与当前最大长度比较,最后得出最大数列代码如下:#include#include#includeint cmp(const void *a,const void *b){ return *(int *)a-*(int *)b;}int main(){原创 2012-12-05 17:07:34 · 396 阅读 · 0 评论 -
ZZULI 1234 数字串 解题报告
和最大公共子序列相似!#include#include#includeint dp[1002][1002];int min3(int a,int b,int c){ if(a<=b&&a<=c) return a; if(b<=a&&b<=c) return b; if(原创 2012-12-05 17:07:36 · 407 阅读 · 0 评论 -
NOIP 2007 普及组解题报告--…
原文地址:2007 普及组解题报告-------3、守望者的逃离">NOIP 2007 普及组解题报告-------3、守望者的逃离作者:Oriverira3、守望者的逃离(escape.pas/c/cpp)【问题描述】恶魔猎手尤迪安野心勃勃,他背叛了暗夜精灵,率领深藏在海底的娜迦族企图叛变。守望者在与尤迪安的交锋中遭遇了围杀,被困在一个荒芜的大岛上。为了杀死守望者,尤迪安开始对这个荒岛施咒转载 2012-12-05 17:08:17 · 486 阅读 · 0 评论 -
ZZULI 1497 Reading Books
ReadingBooksTime Limit:1000MS MemoryLimit:65536KTotal Submit:15 Accepted:2DescriptionIn the summer vacation,LRJwants to improve himself incomputer science.So he finds out Nbooksof computer sc原创 2012-12-05 17:08:58 · 432 阅读 · 0 评论 -
ZZULI 1210 二叉树(3)
二叉树(3)Time Limit:1000MS MemoryLimit:65536KTotal Submit:24 Accepted:6Description按扩展的先序序列(即包括空结点,1表示空结点)输入二叉树的各结点。 1210 二叉树(3)" TITLE="ZZULI 1210 二叉树(3)" />你要完成的任务有三个(1)建立二叉树(2)按中序序列线索化二叉原创 2012-12-05 17:09:35 · 379 阅读 · 0 评论 -
ZZULI 1616(POJ 2243||HDU 1372)…
KnightMovesTime Limit:1000MS Memory Limit:65536KTotal Submit:62 Accepted:13DescriptionA friend of you is doingresearch on the Traveling Knight Problem (TKP) where you are tofind the shortest cl原创 2012-12-05 17:15:09 · 416 阅读 · 0 评论 -
ZZULI 1209 二叉树(2)
二叉树(2)Time Limit:1000MS MemoryLimit:65536KTotal Submit:69 Accepted:29Description1、按扩展的先序序列(即包括空结点,1表示空结点)输入二叉树的各结点,建立二叉树,1209 二叉树(2)" TITLE="ZZULI 1209 二叉树(2)" />输出包括两行,第一行为该二叉树的高度,第二行按自左原创 2012-12-05 17:09:33 · 394 阅读 · 0 评论 -
ZZUPC校赛第六题 三国志(最短路+0…
三国志TimeLimit: 5000MS MemoryLimit: 32768 KbDescription 《三国志》是一款很经典的经营策略类游戏。我们的小白同学是这款游戏的忠实玩家。 现在他把游戏简化了一下,地图上只有他一方势力,现在他只有一个城池,而他周边有一些无人占有的空城,但是这些空城中有很着不同数量的同种财宝。我们的小白同学虎视眈眈的看着这些城池中原创 2012-12-05 17:07:41 · 266 阅读 · 0 评论 -
ZZULI Greedy Gift Givers Greedy…
还是那个IMPORTANTNOTE惹的祸!把个gets()改为scanf就行了#include#include#includestruct fen{ int money; char name[20];}fen[20];int main(){ int m,i,d,q,j,s; char a[20]; s原创 2012-12-05 17:08:06 · 357 阅读 · 0 评论 -
数列(sequence)
原文地址:数列(sequence)作者:_Dear_毒【问题描述】给定一个正整数k(3≤k≤15),把所有k的方幂及所有有限个互不相等的k的方幂之和构成一个递增的序列,例如,当k=3时,这个序列是:1,3,4,9,10,12,13,…(该序列实际上就是:30,31,30+31,32,30+32,31+32,30+31+32,…)请你求出这个序列的第N项的值(用10进制数表示)。例如,转载 2012-12-05 17:09:18 · 718 阅读 · 0 评论 -
ZZULI 1208 二叉树(1)
二叉树(1)Time Limit:1000MS MemoryLimit:65536KTotal Submit:189 Accepted:77Description1、按扩展的先序序列(即包括空结点)输入二叉树的各结点,建立二叉树,并输出其先序、中序和后序遍历序列。1208 二叉树(1)" TITLE="ZZULI 1208 二叉树(1)" />如图所示的二叉树的扩展的先序原创 2012-12-05 17:09:31 · 363 阅读 · 0 评论 -
POj 1013 Counterfeit Dollar
Counterfeit DollarTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 29572Accepted: 9267DescriptionSally Jones has adozen Voyageur silver dollars. However, only eleven of the原创 2012-12-05 17:09:40 · 360 阅读 · 0 评论 -
POj 1017 Packets
PacketsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 31043Accepted: 10279DescriptionA factory producesproducts packed in square packets of the same height h and of thesi原创 2012-12-05 17:09:42 · 1252 阅读 · 0 评论 -
UVA 10189 C - MINES p
C - MINES p Time Limit: 3000MS Memory Limit: Unknown 64bitIO Format: %lld & %llu [Submit] [GoBack] [Status] Description Problem B: Minesweeper The ProblemHave you ever played原创 2012-12-05 17:11:11 · 393 阅读 · 0 评论 -
ZZULI 1596 Assign the task(暴力…
Assign thetaskTime Limit:1000MS MemoryLimit:65536KTotal Submit:20 Accepted:6DescriptionThere is a company thathas N employees(numbered from 1 to N),every employee in the companyhas a immediat原创 2012-12-05 17:14:24 · 446 阅读 · 0 评论 -
HDU 1051(ZZULI 1609) Wooden St…
WoodenSticksTime Limit:1000MS MemoryLimit:65536KTotal Submit:33 Accepted:9DescriptionThere is a pile of nwooden sticks. The length and weight of each stick are known inadvance. The sticks are原创 2012-12-05 17:14:47 · 347 阅读 · 0 评论 -
ZZULI 1618 (HDU 1082)Matrix Ch…
Matrix ChainMultiplicationTime Limit:1000MS Memory Limit:65536KTotal Submit:8 Accepted:2DescriptionMatrix multiplicationproblem is a typical example of dynamical programming.Suppose you have t原创 2012-12-05 17:15:13 · 402 阅读 · 0 评论 -
ZZULI 1480 图论的起源
第一道图论题!原来没看清要求,以为只是一笔画走完就可以了,后来一看,原来还是要走回原点的。#include#includestruct tu{ int num; int index; int sum[102];}str[102];void cha(int n,int k){ int j;原创 2012-12-05 17:08:45 · 386 阅读 · 0 评论 -
HDU 3123(ZZULI 1605) GCC(递推) …
GCCTime Limit:1000MS MemoryLimit:65536KTotal Submit:42 Accepted:12DescriptionThe GNU CompilerCollection (usually shortened to GCC) is a compiler system producedby the GNU Project supporting va原创 2012-12-05 17:14:43 · 445 阅读 · 0 评论