
搜索
文章平均质量分 81
qq_775395462
是什么让我们每天早上7点起床,不辞辛苦来到公司上班,是穷吗?
不,是对老板的信任以及对公司企业文化的认可!
展开
-
TKP(BFS)
DescriptionA friend of you is doing research on the Traveling Knight Problem (TKP) where you are to find the shortest closed tour of knight moves that visits each square of a given set of n squa原创 2014-08-22 18:06:20 · 364 阅读 · 0 评论 -
Square
DescriptionGiven a set of sticks of various lengths, is it possible to join them end-to-end to form a square? InputThe first line of input contains N, the number of test c原创 2015-01-21 00:19:42 · 293 阅读 · 0 评论 -
The Game
DescriptionOne morning, you wake up and think: "I am such a good programmer. Why not make some money?'' So you decide to write a computer game.The game takes place on a rectangular board原创 2015-01-21 16:14:18 · 332 阅读 · 0 评论 -
Stealing Harry Potter's Precious
Description Harry Potter has some precious. For example, his invisible robe, his wand and his owl. When Hogwarts school is in holiday, Harry Potter has to go back to uncle Vernon's home. Bu原创 2015-01-21 12:41:42 · 421 阅读 · 0 评论 -
翻纸牌游戏
Problem Description有一种纸牌游戏,很有意思,给你N张纸牌,一字排开,纸牌有正反两面,开始的纸牌可能是一种乱的状态(有些朝正,有些朝反),现在你需要整理这些纸牌。但是麻烦的是,每当你翻一张纸牌(由正翻到反,或者有反翻到正)时,他左右两张纸牌(最左边和最右边的纸牌,只会影响附近一张)也必须跟着翻动,现在给你一个乱的状态,问你能否把他们整理好,使得每张纸牌都正面朝上,如果可以原创 2015-01-22 10:42:45 · 523 阅读 · 0 评论 -
Dearboy's Puzzle
DescriptionDearboy is a game lover. Recently, he loves playing the game Lian Lian Kan. This game is played on a board with N*M grids, and lots of cards are put on the board in the grids. You原创 2015-01-21 22:06:58 · 378 阅读 · 0 评论 -
Battle City
DescriptionMany 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 discussing is a simple edition of t原创 2015-01-22 11:00:18 · 378 阅读 · 0 评论 -
Dungeon Master
DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It takes one minute to move原创 2015-01-23 20:22:55 · 328 阅读 · 0 评论 -
数独
#include#include#include#include#include/* 构造完成标志 */int sign; //0代表false,1代表true/* 创建数独矩阵 */int num[9][9];/* 函数声明 */void Input();void Output();int Check(int n, int key);//返回0代表fals原创 2015-01-23 13:26:52 · 518 阅读 · 0 评论 -
A计划
Description可怜的公主在一次次被魔王掳走一次次被骑士们救回来之后,而今,不幸的她再一次面临生命的考验。魔王已经发出消息说将在T时刻吃掉公主,因为他听信谣言说吃公主的肉也能长生不老。年迈的国王正是心急如焚,告招天下勇士来拯救公主。不过公主早已习以为常,她深信智勇的骑士LJ肯定能将她救出。现据密探所报,公主被关在一个两层的迷宫里,迷宫的入口是S(0,0,0),公主原创 2015-01-29 16:29:59 · 403 阅读 · 0 评论 -
Rescue
Problem DescriptionAngel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M Angel's friends want to save Angel. Their task is: approach Ange原创 2015-01-28 14:43:39 · 328 阅读 · 0 评论 -
Sum It Up
DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t = 4, n = 6, and the list is [4, 3, 2, 2, 1,原创 2014-08-14 22:57:48 · 274 阅读 · 0 评论 -
骑士漫游
DescriptionBackgroundThe knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the world. Whenever a knight moves, it is原创 2014-08-22 19:03:00 · 829 阅读 · 0 评论 -
非常可乐
Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升 可乐的体积为S (S Input三个整数 : S 可乐的体积 , N 和 M原创 2014-08-22 01:12:26 · 313 阅读 · 0 评论 -
BFS经典题
DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point原创 2014-08-22 10:45:39 · 299 阅读 · 0 评论 -
oil deposits
DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a gri原创 2014-08-22 20:05:06 · 290 阅读 · 0 评论 -
迷宫问题
Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程序找出从左上角到右下角的最短原创 2014-08-22 01:13:42 · 423 阅读 · 0 评论 -
Sum it up
DescriptionGiven a specified total t and a list of n integers, find all distinct sums using numbers from the list that add up to t. For example, if t = 4, n = 6, and the list is [4, 3, 2, 2, 1,原创 2014-08-22 20:39:52 · 293 阅读 · 0 评论 -
DFS剪枝
DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized原创 2014-08-14 21:05:43 · 301 阅读 · 0 评论 -
Robot Motion(水题)
DescriptionA robot has been programmed to follow the instructions in its path. Instructions for the next direction the robot is to move are laid down in a grid. The possible instructions are原创 2014-08-14 22:31:11 · 362 阅读 · 0 评论 -
推箱子
Description推箱子是一个很经典的游戏.今天我们来玩一个简单版本.在一个M*N的房间里有一个箱子和一个搬运工,搬运工的工作就是把箱子推到指定的位置,注意,搬运工只能推箱子而不能拉箱子,因此如果箱子被推到一个角上(如图2)那么箱子就不能再被移动了,如果箱子被推到一面墙上,那么箱子只能沿着墙移动.现在给定房间的结构,箱子的位置,搬运工的位置和箱子要被推去的位置,原创 2015-01-23 14:55:38 · 918 阅读 · 0 评论