自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 收藏
  • 关注

原创 uva 10137 The Trip

DescriptionA number of students are members of a club that travels annually to exotic locations. Their destinations in the past have included Indianapolis, Phoenix, Nashville, Philadelphia, San Jose, a

2017-03-02 14:18:19 556 1

原创 UVA 10189 - Minesweeper(扫雷)

//// main.cpp// PC_test//// Created by liuyuhan on 17/2/20.// Copyright (c) 2017年 liuyuhan. All rights reserved.///* scan every node of the field, when the node is *, let the correspondin

2017-02-20 21:37:49 438

原创 3n+1 problem

简单粗暴

2017-02-20 20:27:16 291

原创 poj-1001 Exponentiation

DescriptionProblems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national debt is a taxing experience for many co

2016-09-03 23:38:56 436

原创 AI-路径导航(最短路径算法 and A算法)

输入: 城市坐标文件,需导航两个城市编号输出:路径序列就路径长度2.1 试采用最短路径算法实现,分析其存在的主要问题;2.2 设计适当的启发式策略,采用A算法实现最短路径:#include //with this method,we can find all the shortest ways from the start point to any other poin

2015-09-19 14:43:57 4842 1

原创 Project0(Get familiar with Linux) (Part 2)

Part 2You need to compile/run a C program set_operation.c. The program contains several simple bugs, and you are going to detect and correct them using the gdb debugger.Here are some details of

2015-09-17 21:16:58 929

原创 Project1(Sorting)

Project 1: SortingOverviewYou will write a simple sorting program. This program should be invoked as follows:% ./fastsort inputfile outputfileThe above line means the users typed in the name

2015-09-17 21:11:07 1328

原创 AI-N Queen Problem(bfs)

#include //because of the limit of the queue's length,the biggest N is only 14(2s).And I really don't think bfs is a good way to solve this queen problem.#include #include #define BG 10000000usin

2015-09-16 16:37:46 547

原创 AI-N Queen Problem(dfs)

#include //the biggest N of this dfs method is 29(4s)#include #include using namespace std;int col[50];//col[row] seems the col of queen in the rowint n;bool check(int r,int c){ int i;

2015-09-16 16:37:02 561

原创 AI--N Queens Problem(Look-Back method)

#include #include #include using namespace std;int col[10];//col[row] seems the col of queen in the rowbool check(int r,int c){    int i;    for(i=1;i//make sure all

2015-09-09 16:20:06 437

原创 Project0(Get familiar with Linux) (Part 1)

Part 1You need to write two shell scripts, both of them should be executable in a Linux shell.s1.sh:% ./s1.sh fooThe script first builds a new directory foo in the current directory (the

2015-09-09 12:48:12 1115

转载 心经(截取一段我爱的描写)--张爱玲

众人一齐笑了。小寒高高坐在白宫公寓屋顶花园的水泥栏杆上,五个女孩子簇拥在她下 面,一个小些的伏在她腿上,其余的都倚着栏杆。那是仲夏的晚上,莹澈的天,没有星,也 没有月亮,小寒穿着孔雀蓝衬衫与白裤子,孔雀蓝的衬衫消失在孔雀蓝的夜里,隐约中只看 见她的没有血色的玲珑的脸,底下什么也没有,就接着两条白色的长腿。她人并不高,可是 腿相当的长,从栏杆上垂下来,分外的显得长一点。她把两只手撑在

2015-09-06 00:15:20 937

转载 致橡树--舒婷

我如果爱你——  绝不像攀援的凌霄花,  借你的高枝炫耀自己:  我如果爱你——  绝不学痴情的鸟儿,  为绿荫重复单调的歌曲;  也不止像泉源,  常年送来清凉的慰籍;  也不止像险峰,增加你的高度,衬托你的威仪。  甚至日光。  甚至春雨。  不,这些都还不够!  我必须是你近旁的一株木棉,  做为树的形象和你站在一起。  根,紧握在地下,  叶,相触在云里。 

2015-09-05 20:32:27 516

原创 Uva-816 - Abbott's Revenge

InputThe input file will consist of one or more arrow mazes. The first line of each maze description containsthe name of the maze, which is an alphanumeric string of no more than 20 characters. The

2015-09-04 18:38:56 863

原创 A new friend,Tim

When I was 4 years old,a unforgettable and horrible thing happened.Almost every member of family stayed away from me till my 19 except my two brothers and my sister.I didn't know why at that moment

2015-09-03 18:33:25 440

原创 Uva-572 - Oil Deposits(DFS)

Oil Deposits The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creat

2015-09-01 17:19:34 348

原创 Vampire Family and Horrible Father

My father is always a mild gentleman and my mother is also very considerate,so I am not afraid of anybody in my family.Therefore,to my surprise,my father is a so grim person who hides a dagger behind

2015-08-31 18:30:00 536

原创 Uva-297 - Quadtrees(四分树与结构体指针)

Quadtrees A quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadrants. Each quadrant may again

2015-08-31 18:26:42 723

原创 Uva-699 - The Falling Leaves(二叉树与递归)

The Falling Leaves Each year, fall in the North Central region is accompanied by the brilliant colors of the leaves on the trees, followed quickly by the falling leaves accumulating under

2015-08-30 22:06:57 435

原创 Uva-839 - Not so Mobile

Not so Mobile Before being an ubiquous communications gadget, a mobile was just a structure made of strings and wires suspending colourfull things. This kind of mobile is usually found han

2015-08-30 17:10:03 392

转载 悄悄是别离的笙箫

当这一切都结束 你是否失落当我随烟云消散 谁为我难过没有不散的伴侣 你要走下去没有不终的旋律 但我会继续倘若有天想起我 你蓦然寂寞人生是一场错过 愿你别蹉跎当这一切已结束 请不要失落我将随烟云消散 别为我难过千言万语不必说 只有一首歌都知欢聚最难得 难奈别离多

2015-08-30 16:41:28 388

原创 Uva-548-Tree(二叉树与stream与dfs)

Tree You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any leaf. The value of

2015-08-30 16:23:45 345

原创 Uva-122 - Trees on the level(二叉树与set)

Trees on the level BackgroundTrees are fundamental in many branches of computer science. Current state-of-the art parallel computers such as Thinking Machines' CM-5 are based on fat tr

2015-08-28 20:13:39 391

原创 Uva-679 - Dropping Balls(二叉树)

Dropping BallsDropping Balls A number of  K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first visits a non-terminal no

2015-08-28 13:04:40 435

原创 Uva-12657 Boxes in a Line(双向链表)

注意操作3是通过数字寻找位置的,不会受是否翻转的影响#include #include using namespace std;#define BG 100005int be[BG],ne[BG];int w=1;int main(){ int n,m; while(scanf("%d%d",&n,&m)!=EOF) { int i;

2015-08-24 20:59:36 368

原创 Uva-11988 - Broken Keyboard (a.k.a. Beiju Text)(链表)

You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problemwith the keyboard is that sometimes the “home” key or the “end” key gets automatically pressed(internal

2015-08-24 18:40:09 470

原创 UESTC-594 我要长高(动态规划+单调队列优化)

我要长高Time Limit: 4000/2000MS (Java/Others)     Memory Limit: 65535/65535KB (Java/Others)Submit Status韩父有N个儿子,分别是韩一,韩二…韩N。由于韩家演技功底深厚,加上他们间的密切配合,演出获得了巨大成功,票房甚至高达2000万。舟子是名很有威望的公知,可是

2015-08-24 13:07:17 1670

原创 Poj-1661 Help Jimmy(动态规划)

Help JimmyTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 9527 Accepted: 3079Description"Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低的平台

2015-08-22 20:36:24 371

原创 Uva10881 - Piotr's Ants(蚂蚁)

这是一个等效变换问题,感觉解法还是蛮叼的。应注意记录输入次序;在按照Pos从大到小排序后,用一个数组存储输入次序;在对Pos进行T的+/-后,重新按照Pos排序并将存储的输入次序附回原位(结构体中的位置)——以此表示变换后的该位置的结构体依然是第一次排序后的对象)最后按输入次序输入。#include using namespace std;#include typedef

2015-06-18 20:16:31 438

空空如也

空空如也

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

TA关注的人

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