自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(52)
  • 资源 (1)
  • 收藏
  • 关注

原创 poj 1942 Paths on a Grid

j求 aCb 的值,  可以用 拆分阶乘,逐项相除,再乘以前面所有项之积while(b > 0)       sum *= (double)a--/(double)b--;DescriptionImagine you are attending your math lesson at school. Once again, you are bored because you

2015-08-26 11:11:13 317

原创 poj 1019 Number Sequence

#include #include #include #include #include #include #include #include #include #include #define RR freopen("in.txt","r",stdin)#define WW freopen("out.txt","w",stdin)#define LL long long

2015-08-26 10:12:41 368

原创 BestCoder Round #52 (div.2) 1001 Victor and Machine

Problem DescriptionVictor has a machine. When the machine starts up, it will pop out a ball immediately. After that, the machine will pop out a ball everywww seconds. However, the machine has

2015-08-22 19:29:55 518

原创 poj 1837 Balance

DescriptionGigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary balance.It orders two arms of negligible weight and each arm's length i

2015-08-21 16:19:44 328

原创 poj 1129 Channel Allocation(DFS减枝)

DescriptionWhen a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that every receiver has a strong signal. However, the channels used by each rep

2015-08-21 14:10:52 423

原创 poj 2676(DFS减枝)

DescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller squares 3x3 as shown on the Figure. In some of the cells are written decimal digits from 1 t

2015-08-21 14:07:42 394

原创 poj 1416 Shredding Company(DFS减枝)

DescriptionYou have just been put in charge of developing a new shredder for the Shredding Company Although a "normal" shredder would just shred sheets of paper into little pieces so that the conten

2015-08-21 14:02:58 337

原创 poj 2531 Network Saboteur(DFS减枝)

题意:将n个计算机分成两部分,求权值的最大值方法:先默认将所有的放入一个集合,然后将里面的元素一个一个的转移到另一个集合DescriptionA university network is composed of N computers. System administrators gathered information on the traffic between nodes,

2015-08-20 10:51:16 385

原创 poj 3414 Pots

题意:给出A, B, C分别代表第一个瓶子的容量,第二个瓶子的容量,以及目标水量,只要是经过以下六个步骤能够有一个瓶子能够达到目标水量,就完成目标,记录步骤;1. 倒空第一个2. 倒空第二个3. 把第一个瓶子的水倒入第二个4. 把第二个瓶子的水倒入第一个5. 倒满第一个6. 倒满第二个ps : 上述六个步骤无先后顺序DescriptionYou are

2015-08-19 16:03:47 361

原创 poj 3087 Shuffle'm Up(简单的广搜)

DescriptionA common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips,S1 and S2, each stack contai

2015-08-19 10:49:15 469

原创 poj 1113(凸包)

题意:城堡N个点,建立围墙,围墙与城堡的距离为L,求建立的围墙最短长度做法:求出N个城堡的点的凸包,在加上以L为半径的圆的周长即可DescriptionOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. T

2015-08-18 19:55:33 392

原创 poj 2187 Beauty Contest(凸包)

不知道这道题在比较的时候为什么用qsort()才能过,不过找到了一组数据100 010000 01 1002 1999999 1009998 199100 -900200 -17999800 -17999900 -900答案应该是100000000DescriptionBessie, Farmer John's prize cow, has just

2015-08-18 19:50:45 381

原创 poj 1426 Find The Multiple

DescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than

2015-08-18 19:39:26 446

原创 poj 2251 Dungeon Master

还是简单的搜索题,只是简单的把3二维转化成3维,多写几个方向和括号就OK了 QAQ~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 w

2015-08-18 09:10:14 318

原创 poj 1321

POJ 难得的中文题,秒敲Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数据。每组数据的第一行是两个正整数,n k,用一个空格隔开,表示了将在一个n*n的矩阵内描述棋盘,以及

2015-08-17 21:32:45 351

原创 poj 1442 Black Box

DescriptionOur Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box is empty and i equals 0. This Black Box processes

2015-08-17 21:30:26 333

原创 poj 2442 Sequence

DescriptionGiven m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's clear that we may get n ^ m this kind of

2015-08-17 21:30:01 317

原创 poj 3009 Curling 2.0

DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a squa

2015-08-17 21:28:34 296

原创 poj 2488 A Knight's Journey

题意:给你一个n*m的矩阵,看能从(1,1)点开始按照字典序开始遍历,能否遍历n*m内的所有的点盗张图~~ 没找到,但我见到过,、等找到再发吧~~按照字典序遍历,其实就是规定遍历的优先方向,也就是下面这个int Dir[][2] = {{-2,-1},{-2,1},{-1,-2},{-1,2},{1,-2},{1,2},{2,-1},{2,1}};Description

2015-08-17 21:26:23 316

原创 BestCoder Round #51 (div.2) 1001 Zball in Tina Town

判断素数,如果是n素数的话,输出n-1,(n == 4 输出 2)  否则 输出 0Tina Town is a friendly place. People there care about each other.Tina has a ball called zball. Zball is magic. It grows larger every day. On the first

2015-08-15 20:00:40 537

原创 poj 3080 Blue Jeans

DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth was

2015-08-14 11:35:24 399

原创 poj 2503 Babelfish

DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.

2015-08-14 11:26:30 306

原创 poj 2002 Squares

DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about its centre by 90 degrees gives the same

2015-08-14 11:17:54 397

原创 poj 2996 Help Me with the Game

DescriptionYour task is to read a picture of a chessboard position and print it in the chess notation.InputThe input consists of an ASCII-art picture of a chessboard with chess pieces on positio

2015-08-10 21:34:56 235

原创 poj 2993 Emag eht htiw Em Pleh

DescriptionThis problem is a reverse case of the problem 2996. You are given the output of the problem H and your task is to find the corresponding input.Inputaccording to output of proble

2015-08-10 21:33:51 264

原创 poj 1068 Parencodings

DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways:q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses bef

2015-08-10 21:31:43 310

原创 poj 3274 Gold Balanced Lineup

DescriptionFarmer John's N cows (1 ≤ N ≤ 100,000) share many similarities. In fact, FJ has been able to narrow down the list of features shared by his cows to a list of onlyK different features

2015-08-10 21:20:50 305

原创 poj 3349 Snowflake Snow Snowflakes

题意:一共n组数,每组有六个数,查询在n组数列里有没有(包含的数字相同,并且数字顺序符合,可以是顺序也可以是逆序,也可以是从任意一个数开始的顺序)DescriptionYou may have heard that no two snowflakes are alike. Your task is to write a program to determine whether th

2015-08-10 21:17:41 217

原创 Removing Columns

You are given an n × m rectangular table consisting of lower case English letters. In one operation you can completely remove one column from the table. The remaining parts are combined forming a new

2015-08-09 20:32:16 485

原创 HDU 4907 Task schedule

Description有一台机器,并且给你这台机器的工作表,工作表上有n个任务,机器在ti时间执行第i个任务,1秒即可完成1个任务。有m个询问,每个询问有一个数字q,表示如果在q时间有一个工作表之外的任务请求,请计算何时这个任务才能被执行。 机器总是按照工作表执行,当机器空闲时立即执行工作表之外的任务请求。   Input输入的第一行包含一个整数T,

2015-08-09 20:31:06 451

原创 LightOJ 1002(最短路Dijkstra算法)

DescriptionI am going to my home. There are many cities and many bi-directional roads between them. The cities are numbered from0 to n-1 and each road has a cost. There are m roads. You are gi

2015-08-09 20:29:22 448

原创 CodeForces 445B DZY Loves Chemistry(并查集)

DZY loves chemistry, and he enjoys mixing chemicals.DZY has n chemicals, and m pairs of them will react. He wants to pour these chemicals into a test tube, and he needs to pour them in one by one,

2015-08-09 20:28:01 420

原创 Codeforces445A DZY Loves Chessboard

DZY loves chessboard, and he enjoys playing with it.He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, others are good. For every good cell, DZY wants to put a ches

2015-08-09 20:26:04 434

原创 Codeforces Round #303 Equidistant String

Little Susie loves strings. Today she calculates distances between them. As Susie is a small girl after all, her strings contain only digits zero and one. She uses the definition of Hamming distance:

2015-08-09 20:24:10 396

原创 Codeforces Round #303 A. Toy Cars

Little Susie, thanks to her older brother, likes to play with cars. Today she decided to set up a tournament between them. The process of a tournament is described in the next paragraph.There are n

2015-08-09 20:22:22 307

原创 BestCoder Round #50 (div.2) 1003

Problem DescriptionZJiaQ want to become a strong man, so he decided to play the mook jong。ZJiaQ want to put some mook jongs in his backyard. His backyard consist of n bricks that is 1*1,so it is

2015-08-08 21:21:19 444

原创 BestCoder Round #50 (div.2) 1001

Problem DescriptionAFA want to distribution her money to somebody.She divide her money into n same parts.One who want to get the money can get more than one part.But if one man's money is more tha

2015-08-08 21:19:54 450

原创 poj 1936 All in All

纯暴力!!!!!,很久没有享受到1Y的感受了DescriptionYou have devised a new encryption technique which encodes a message by inserting between its characters randomly generated strings in a clever way. Because of pe

2015-08-07 09:10:24 261

原创 poj 1035 Spell checker

虽然是属于串类的,但是总感觉是一个大模拟,题意:先往字典里存入正确的字符串,并以‘#’结束,然后开始输入测试数据,也是以‘#’结束首先先比较与字典里的字是否有相同的,如果相同直接输出,否则判断长度,若长度差1以上,则直接不予匹配,然后再比较长度不同的串,若无法匹配的字符差大于1;,不予匹配DescriptionYou, as a member of a development

2015-08-06 21:37:29 403

原创 poj 3041 Asteroids

DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N <= 500). The grid contains K asteroids (1 <= K <= 10,000), which are conven

2015-08-06 11:14:51 216

超市进销存管理系统

山东理工大学2014级数据结构实训项目-超市进销存管理系统

2016-01-27

空空如也

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

TA关注的人

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