- 博客(48)
- 资源 (152)
- 收藏
- 关注
原创 FZU 1019 猫捉老鼠
猫捉老鼠Time Limit:1sMemory limit:32MAccepted Submit:470Total Submit:1487一只猫和一只老鼠在10*10的迷宫中。迷宫中的每个方格可以是空的,或者含有障碍。猫和老鼠可以进入任意一个空的方格中。当他们相遇时,猫和老鼠在同一个方格中。但是,无论猫或老鼠都不能进
2009-07-31 16:38:00 2119
原创 最小生成树----Kruskal算法
最小生成树的另一种算法,比较适合处理稀疏图。算法思想:按权值的递增次序选择合适的边来构造最小生成树。以下代码包含无向带权图的建立,Kruskal算法的完整过程。请观看【动画演示Kruskal算法】,验证程序是否正确。代码说明:1.vest[]数组存放两个顶点间的连通分量2.结构体E[]数组是按权值从小到大排列的边集3.对E的排序采用了qsort排序,自定义的排序函数
2009-07-31 15:53:00 2602 1
原创 最小生成树----Prim算法
最小生成树是数据结构中图的一种重要应用,它的要求是从一个带权无向完全图中选择n-1条边并使这个图仍然连通(也即得到了一棵生成树),同时还要考虑使树的权最小。 以下代码包含生成无向网图,prim算法计算最小生成树的完整步骤。请观看【动画演示prim算法】,验证程序是否正确。代码说明几点:lowcost[]用来保存集合V-U中各顶点与集合U中顶点最短边的权值,low
2009-07-31 08:33:00 2810
原创 邻接矩阵(有向图,无向图实现的差异)
对于相似的一个图,若是无向图,则如下: 若是有向图,则如下: 而具体实现代码,相差无几,自己要注意的是无向图是对称矩阵,有向图不一定是。#include using namespace std;#define MaxVertexNum 100#define QueueSize 30bool visited[MaxVertexNum];type
2009-07-30 10:46:00 7541
原创 FZU 1053 Happy 2004
Happy 2004Time Limit:1sMemory limit:32MAccepted Submit:142Total Submit:279Consider a positive integer X,and let S be the sum of all positive integer divisors o
2009-07-29 20:20:00 2528
转载 [ 模运算 ] 与 [ 模取幂运算 ]
很多地方用到模运算,这里说明模运算的一些规律,并加以证明。 后续会对这些理论实际的应用加以记录和说明。1. 模运算是取余运算(记做 % 或者 mod),具有周期性的特点。 m%n的意思是n除m后的余数, 当m递增时m%n呈现周期性特点, 并且n越大,周期越长,周期等于n。 例如 0 % 20 = 0,1 % 20 = 1, 2 % 20 = 2, 3 % 20 = 3,
2009-07-29 16:24:00 5125
原创 FZU 1573 大学自习室
大学自习室Time Limit:1sMemory limit:32MAccepted Submit:184Total Submit:645图书馆终于建成了,可以自习的教室也多了。所以,往常从不自习的Roam也开始上自习了。图书馆的自习室虽然很大而且座位众多,但找到满意座位也确实能算一门学问……由于Roam找座不是
2009-07-29 16:00:00 1617
原创 FZU 1042 Ackermann Function
Ackermann FunctionTime Limit:1sMemory limit:32MAccepted Submit:332Total Submit:931As is known, Ackermann function plays an important role in the sphere of theo
2009-07-29 11:17:00 2293
原创 FZU 1036 四塔问题
四塔问题Time Limit:1sMemory limit:32MAccepted Submit:282Total Submit:705“汉诺塔”,是一个众所周知的古老游戏。现在我们把问题稍微改变一下:如果一共有4根柱子,而不是3根,那么至少需要移动盘子多少次,才能把所有的盘子从第1根柱子移动到第4根柱子上呢?
2009-07-29 10:31:00 2667
原创 图---邻接表(建立,深度遍历,广度遍历)
图的邻接表表示法类似于树的孩子链表表示法。对于图G中的每个顶点vi,该方法把所有邻接于vi的顶点vj链成一个带头结点的单链表,这个单链表就称为顶点vi的邻接表(Adjacency List)。以下代码测试过,为图的邻接表表示方式。/*******************************************************************
2009-07-28 21:50:00 46971 31
原创 图---邻接矩阵(建立,深度遍历,广度遍历)
图的存储方式可以用邻接矩阵来表示,我们假定顶点序号从0开始,即图G的顶点集的一般形式是V(G)={v0,vi,…,Vn-1}。以下代码测试过,为图的邻接矩阵表示方式。/************************************************************************//* 图的邻接矩阵存储结构
2009-07-28 20:01:00 17915 11
原创 数据结构----图(笔记)
图G由两个集合V和E组成,记为: G=(V,E) 其中: V是顶点的有穷非空集合, E是V中顶点偶对(称为边)的有穷集。 通常,也将图G的顶点集和边集分别记为V(G)和E(G)。E(G)可以是空集。若E(G)为空,则图G只有顶点而没有边。图有两种存储结构:邻接矩阵和邻接表 邻接矩阵: ① 用邻接矩阵表示顶点间的相邻关系
2009-07-28 16:58:00 8736
原创 KMP算法----利用nextval[]数组
KMP算法是通过分析子串,预先计算每个位置发生不匹配的时候,所需GOTO的下一个比较位置,整理出来一个next数组,然后再上面的算法中使用。对next数组的改进将会加快分析匹配速度。#include using namespace std;void GetNextVal(char T[],int nextval[]){ int i=0; int j=-1; nextv
2009-07-28 10:45:00 2264
原创 FZU 1076 穿越沙漠
穿越沙漠Time Limit:1sMemory limit:32MAccepted Submit:205Total Submit:304一辆吉普车来到x公里宽的沙漠边沿A点,吉普车的耗油量为1升/公里,总装油量为500升。通常,吉普车必须用自身油箱中的油在沙漠中设置若干个临时储油点,才能穿越沙漠的。假设在沙漠边沿A点有充足
2009-07-28 01:39:00 6710
原创 FZU 1752 A^B mod C
A^B mod CTime Limit:1sMemory limit:32MAccepted Submit:68Total Submit:376Problem DescriptionGiven A,B,C, You should quickly calculate the result of A^B mod C. (1
2009-07-28 00:22:00 2179 1
原创 FZU 1560 Binary Bit Benchmark
Binary Bit BenchmarkTime Limit:1sMemory limit:32MAccepted Submit:95Total Submit:197Amtel has announced that it will release a 128-bit computer chip by 2010, a
2009-07-27 21:52:00 1729
原创 FJNU 1307 阶乘结果末尾有多少零
阶乘结果末尾有多少零Time Limit: 1 Seconds Memory Limit: 32768 KTotal Submit:594 Accepted:314 Description1000的阶乘1*2*3*...*1000结果是一个很大的数,求这么大的数末尾有多少个连续的零。Input
2009-07-27 11:35:00 1521
原创 HDU 1002 A + B Problem II
A + B Problem IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 33295 Accepted Submission(s): 5948Problem DescriptionI have a very sim
2009-07-27 09:41:00 2231
转载 七种qsort排序方法
qsort 功 能: 使用快速排序例程进行排序 (要包含头文件#include ) 用 法: void qsort(void *base, int nelem, int width, int (*fcmp)(const void *,const void *)); 各参数:1 待排序数组首地址 2 数组中待排序元素数量
2009-07-26 19:22:00 2152
转载 sprintf用法
本文转载自http://hi.baidu.com/wzc1989/blog/item/c7d0e0065667e3ca7a8947c4.html在将各种类型的数据构造成字符串时,sprintf 的强大功能很少会让你失望。由于sprintf 跟printf 在用法上几乎一样,只是打印的目的地不同而已,前者打印到字符串中,后者则直接在命令行上输出。这也导致sprintf 比printf 有用得多
2009-07-26 17:30:00 1436
转载 C++中的64位整数
转自:http://hi.baidu.com/gchrist/blog/item/3e7df5fe81d1df305d600819.html 在做ACM题时,经常都会遇到一些比较大的整数。而常用的内置整数类型常常显得太小了:其中long 和 int 范围是[-2^31,2^31),即-2147483648~2147483647。而unsigned范围是[0,2^32),即0~4294967
2009-07-25 10:03:00 8965
原创 FZU 1062 洗牌问题
洗牌问题Time Limit:1sMemory limit:32MAccepted Submit:589Total Submit:1245设2n张牌分别标记为1, 2, ..., n, n+1, ..., 2n,初始时这2n张牌按其标号从小到大排列。经一次洗牌后,原来的排列顺序变成n+1, 1, n+2, 2, ..
2009-07-23 17:15:00 1306
原创 FZU 1099 Square
SquareTime Limit:1sMemory limit:32MAccepted Submit:184Total Submit:885Given a set of sticks of various lengths, is it possible to join them end-to-end to form
2009-07-23 14:52:00 2075
原创 FZU 1402 猪的安家
猪的安家Time Limit:1sMemory limit:32MAccepted Submit:306Total Submit:2702Andy和Mary养了很多猪。他们想要给猪安家。但是Andy没有足够的猪圈,很多猪只能够在一个猪圈安家。举个例子,假如有16头猪,Andy建了3个猪圈,为了保证公平,剩下1头猪就没
2009-07-23 08:40:00 1962
原创 FZU 1733 Image Distortion
Image DistortionTime Limit:1sMemory limit:32MAccepted Submit:77Total Submit:100 In the process of transmission, data loss may occur, resulting in image disto
2009-07-22 20:11:00 1155
原创 FZU 1629 Above Average
Above AverageTime Limit:1sMemory limit:32MAccepted Submit:266Total Submit:394 It is said that 90% of frosh expect to be above average in their class. You are
2009-07-22 19:41:00 1491
原创 FZU 1021 飞船赛
飞船赛Time Limit:1sMemory limit:32MAccepted Submit:840Total Submit:3389有N个飞船进行比赛,它们的跑道为直线并互相平行。每个飞船的起跑位置均不相同。第i个飞船从起跑线右边Xi处开始向右行驶(Xi各不相同)。比赛开始后,它能在零时间内加速到最大速度Vi并永
2009-07-22 17:28:00 1919 2
原创 FZU 1350 Very Simple Problem
Very Simple ProblemTime Limit:1sMemory limit:32MAccepted Submit:111Total Submit:317During a preparation of programming contest, its jury is usually faced with
2009-07-22 16:16:00 1376
原创 FZU 1685 跑跑卡丁车
跑跑卡丁车Time Limit:1sMemory limit:32MAccepted Submit:214Total Submit:586 cigam在宿舍闲着没事,又玩起了跑跑卡丁车,为了到达终点,他需要通过m段路,在通过每段路时,他可以利用加速器来加快速度,每段路最多只能使用一个加速器,假设一个加速器的加速效
2009-07-22 16:13:00 1494
原创 FZU 1582 众数问题
众数问题Time Limit:1sMemory limit:32MAccepted Submit:366Total Submit:1515给定含有n个元素的多重集合S,每个元素在S中出现的次数称为该元素的重数。多重集S中重数最大的元素称为众数。例如,S={1,2,2,2,3,5}。多重集S的众数是2,其重数为
2009-07-22 14:32:00 2085
原创 FZU 1343 WERTYU
WERTYUTime Limit:1sMemory limit:32MAccepted Submit:257Total Submit:526A common typing error is to place the hands on the keyboard one row to the right of the c
2009-07-22 09:19:00 1300
原创 FZU 1171 Hard to Believe, but True!
Hard to Believe, but True!Time Limit:1sMemory limit:32MAccepted Submit:229Total Submit:418The fight goes on, whether to store numbers starting with their most
2009-07-22 08:52:00 1411 1
原创 FZU 1150 Peter's smokes
Peters smokesTime Limit:1sMemory limit:32MAccepted Submit:496Total Submit:1090Peter has n cigarettes. He smokes them one by one keeping all the butts. Out of
2009-07-21 19:48:00 1530
原创 FZU 1060 Fibonacci数列
Fibonacci数列Time Limit:1sMemory limit:32MAccepted Submit:714Total Submit:28751202年,意大利数学家斐波那契出版了他的《算盘全书》,在书中第一次提到了著名的Fibonacci数列,定义如下: 现在你的任务是求出Fibona
2009-07-21 19:01:00 1722
原创 FZU 1558 Software Bugs
Software BugsTime Limit:1sMemory limit:32MAccepted Submit:141Total Submit:250The biggest problem for all software developers are bugs. You definitely know the
2009-07-21 10:03:00 1478
原创 FZU 1550 猪的分数
猪的分数Time Limit:1sMemory limit:32MAccepted Submit:175Total Submit:366输入一个自然数N。请写一个程序来增序输出分母小于等于N的既约真分数。Input输入包含多组测试数据,请处理到EOF结束。每组数据包括,一个自然数N(1Output
2009-07-21 08:38:00 1721
转载 c++ int to string(整型到字符串)
1. int sprintf( char *buffer, const char *format [, argument] ... ); 例如: int ss; char temp[64]; string str; ss = 1000; sprintf(temp, "%d", ss); string s(temp);
2009-07-20 22:04:00 3097
原创 FZU 1489 密码
密码Time Limit:1sMemory limit:32MAccepted Submit:435Total Submit:955密码的使用最早可以追溯到古罗马时期,《高卢战记》有描述恺撒曾经使用密码来传递信息,即所谓的“恺撒密码”,它是一种替代密码,通过将字母按顺序推后3位起到加密作用,如将字母A换作字母D,将字
2009-07-20 20:21:00 1633
原创 FZU 1410 变位词
变位词Time Limit:1sMemory limit:32MAccepted Submit:310Total Submit:1085Mr. Right有一个奇怪的嗜好,就是看见一个单词就有找它所有的变位词的冲动。一个单词的变位词就是该单词所有字母的一个排列。输入输出格式输入数据第一行为一个整数n,1对应Mr.
2009-07-20 19:38:00 1327
原创 FZU 1575 小学生的游戏
小学生的游戏Time Limit:1sMemory limit:32MAccepted Submit:307Total Submit:1057某天,无聊的小斌叫上几个同学玩游戏,其中有比较笨的小兴,比较傻的小雪,可爱的小霞和自以为是的小楠。他们去找聪明的小明去给他们当裁判。判定谁取得游戏胜利。而这个游戏是由小斌想
2009-07-20 19:22:00 1723
Live2D Cubism 3 最后版本 3.3.03_1 以及 Unity SDK R12
2019-10-17
CoolFormat源代码格式化 V3.4
2015-02-25
CoolFormat源代码格式化 V3.3
2015-01-26
MJP 播放和转换
2015-01-14
Custom Font in Property Sheets
2014-12-25
Windows SDK 8.1 ISO 第三部分
2014-09-29
Windows SDK 8.1 ISO 第二部分
2014-09-29
Windows SDK 8.1 ISO 第一部分
2014-09-29
Zeal 离线API文档浏览器
2014-07-27
Sword Girl.unitypackage
2014-07-09
Pocket RPG Weapon Trails.unitypackage
2014-07-09
Unity 4.3 2D横版射击游戏
2014-04-09
CatMazeFinal A星完整工程 cocos2d-x
2014-02-17
CatMazeStarter A星准备工程 cocos2d-x
2014-02-17
AnimBear cocos2d-x
2013-08-12
TinySeal3 cocos2d-x
2013-07-23
TinySeal2 cocos2d-x
2013-07-10
WPS_COOL_CSV插件 v0.1|WPS_COOL_CSV插件.zip
2020-10-08
CoolFormat源代码格式化 V3.5
2018-05-30
博客备份以及导出
2017-11-16
Unity - Behavior Designer 1.5.7 and samples
2017-01-09
Unity Text 超链接插件
2015-10-09
Unitypackage Unpacker for Unity
2015-09-11
Unity Assets Bundle Extractor 1.7 64bit
2015-09-11
Unity Assets Bundle Extractor 1.7 32bit
2015-09-11
Grim's Unity Asset Editor BETA 3
2015-09-11
Unity Studio beta 4
2015-09-11
UnityAssetsExplorer 1.5
2015-09-11
[GDC 2015] Scroll Back - 2D 卷轴游戏的摄影机理论与实务
2015-07-15
NShader VS2013 Unity Shader
2015-03-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人