自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

路漫漫 始于足下

博客 让生活更充实

  • 博客(21)
  • 资源 (11)
  • 收藏
  • 关注

原创 C++实现九宫格游戏人机对战

九宫格游戏是大家熟悉的“草稿纸”游戏。记得曾经经常和同学在草稿纸上画着玩。规则很简单,就是在3*3的格子里双方交替落子,先连成3个的(横竖斜都行)一方获胜。实现人机对战我主要分成两大类,一是人先下,二是电脑先下。期间主要运用九宫格的对称性以及等价位置来画博弈树来实现决策。大致四个决策顺序:1.看自己是否连成两个。2.看对方是否连成两个。3.特殊情况讨论。4.已是绝对平局情况,找到第一个

2015-08-23 11:37:25 5310

原创 二维线段树解析 (HDU1823)解题报告

学习二维线段树,需有一维线段树的基础。倘若对一维线段树还不是很了解的同学可以点开这个链接看看。http://blog.csdn.net/jobsandczj/article/details/47808213Luck and Love                                                                 Time

2015-08-20 16:03:05 566

原创 一维线段树模板 (HDU 1166)解题报告

线段树是一种二叉搜索树,与区间树相似,它将一个区间划分成一些单元区间,每个单元区间对应线段树中的一个叶结点。对于线段树中的每一个非叶子节点[a,b],它的左儿子表示的区间为[a,(a+b)/2],右儿子表示的区间为[(a+b)/2+1,b]。因此线段树是平衡二叉树,最后的子节点数目为N,即整个线段区间的长度。使用线段树可以快速的查找某一个节点在若干条线段中出现的次数,时间复杂度为O

2015-08-20 15:12:10 1048

原创 UVALive 5986解题报告

You are the organizer of a Wizarding Duel tournament at Hogwarts. N players participated in thetournament and each player played with every other player exactly once, and each such game resultedin

2015-08-19 18:44:31 988

原创 数据库基础知识概述

提到数据库,最先想到的就是数据了。数据(Data)在大多数人头脑里第一反应就是数字。其实这是对数据一种传统和狭义的理解。数据种类很多,文本(text),图形(graph),图像(image),音频(audio),视频(video),学生的档案记录,货物运输情况等,这些都是数据。可以对数据作如下定义:描述事物的符号记录称为数据。文字、图形、图像、声音、语言等,都可以经过数字化后存入计算机。数据的

2015-08-19 09:54:34 1253 2

原创 SPFA算法模板

SPFA(Shortest Path Faster Algorithm)(队列优化)算法是求单源最短路径的一种算法,在Bellman-ford算法的基础上加上一个队列优化,减少了冗余的松弛操作,是一种高效的最短路算法。求单源最短路的SPFA算法的全称是:Shortest Path Faster Algorithm,是西南交通大学段凡丁于1994年发表的。 原理是从原点出发,遍历与之

2015-08-18 19:14:07 668

原创 深搜玩转数独

数独是十分流行的智力游戏 但用深搜(DFS),可以轻松解决这个问题。#include#include#includeusing namespace std;int map[9][9],vis[10][10],a[10][10],b[10][10];int count_num,flag;  //count表示0的个数 struct node{

2015-08-18 14:48:46 1179

原创 UVALive 5797解题报告

The Braille system, designed by Louis Braille in 1825, revolutionized written communication for blindand visually impaired persons. Braille, a blind Frenchman, developed a tactile language where eac

2015-08-18 10:45:22 709

转载 图的邻接表表示方法 (两种形式) 转自《挑战程序设计竞赛》

//  first example#include#include#includeusing namespace std;/*struct edge{int to,cost;              //边上有属性的情况};vector G[MAX_A];*/vector G[MAX_A];int main(){

2015-08-18 10:35:05 628

原创 UVALive 5789 双向链表解法

Nlogonia is ghting a ruthless war against the neighboring country of Cubiconia. The Chief General ofNlogonia's Army decided to attack the enemy with a linear formation of soldiers, that would advanc

2015-08-17 21:26:29 607

原创 用优先队列求最优二叉树根的权值

#include#include#include#include#include#include#include#include#includeusing namespace std;priority_queue,greater > qq;   //优先从小到大int a,n;int w1,w2; int W;   //记录最终权值

2015-08-17 19:03:38 2268

原创 NYOJ 坦克大战(宽度优先搜索)

坦克大战时间限制:1000 ms  |  内存限制:65535 KB难度:3描述Many of us had played the game "Battle city" in our childhood, and some people (like me) even often play it on computer now. What we are dis

2015-08-17 17:03:53 657 1

原创 杭电OJ 1042 N!(大数阶乘模板)

N!Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 65997    Accepted Submission(s): 18938Problem DescriptionGiven an integer N

2015-08-17 16:53:25 1047

原创 杭电OJ 5387 Clock

ClockTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 529    Accepted Submission(s): 356Problem DescriptionGive a time.(hh:mm:ss)

2015-08-17 11:04:40 579

原创 杭电(oj)ACM 2586 简单LCA

How far away ?Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8950    Accepted Submission(s): 3106Problem DescriptionThere are n

2015-08-16 18:45:42 648

原创 C++二叉搜索树容器set的调用

#include#include#include#include#include#include#include#include#include#includeusing namespace std;set s;    //左小右大存放元素 int main(){//插入元素 s.insert(1);s.insert(

2015-08-16 08:03:27 956

原创 C++键树容器map的调用

#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;int main(){//声明(int为键,const char*为值)map m;//插入元素m.in

2015-08-16 08:02:30 767

原创 C++容器vector的调用

#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;int main(){//声明(int为键,const char*为值)map m;//插入元素m.in

2015-08-16 08:00:37 650

原创 C++栈的调用

#include#include#includeusing namespace std;int main(){stack s;  //声明 for(int i=0;i{s.push(i);} if(!s.empty()) coutcoutfor(int i=0;i{couts.pop();}return 0;

2015-08-16 07:58:26 657

原创 C++优先队列的调用

#include#include#include#include#include#include#include#include#includeusing namespace std;//#includeusing namespace std;struct A{int x,y;};bool operator

2015-08-16 07:56:04 571

原创 C++普通队列容器

#include#include#includeusing namespace std;int main(){queue que;for(int i=0;i{que.push(i);}if(!que.empty()) coutcoutfor(int i=0;i{coutque.pop();}return 0

2015-08-16 07:54:22 711

JVM调优.pptx

JVM调优分享,简单的一些分享,希望能帮助大家。凑字数真的烦!!!

2019-10-27

myrpc-自主实习的RPC工具框架

自主实现的RPC工具框架,非常方便使用与学习,非常高效,可靠

2018-03-26

自主实现的简易SpringMVC

自主实现的简易SpringMVC 一个控制器

2017-05-17

自主实现的简易Spring框架

自主实现的简易Spring框架,通过注解实现IoC容器和AOP。

2017-05-12

模拟Spring的IoC容器实现注解自动装配

自己实现的简易的模拟Spring的IoC容器,实现注解自动装配

2017-05-10

2016年第四届湘潭大学新生趣味程序设计竞赛题解

2016-12-19

MyBlog(个人博客)

个人技术类博客,支持多种代码格式和动态地图。

2016-12-08

游戏OOXX棋

原创小游戏 内含人机对战

2016-06-24

源程序OOXX

OOXX源程序,java开发

2016-06-08

小游戏OOXX

java开发的小游戏,期末课程设计。

2016-06-08

OOXX源代码

自创游戏OOXX的源代码

2016-05-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除