自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Orz~~Orz

愈接近死亡,愈拥抱真理。

  • 博客(63)
  • 资源 (3)
  • 收藏
  • 关注

原创 POJ 1416-Shredding Company(DFS+更新路径)

题意:给一个目标值goal,然后再给一个数num,将num分解,比如 给目标值50,num为12346 num可以分解为 1   2   34   6 这么4部分,要求部分和尽量接近目标值但不能大于目标值,求最优分解;思路:深搜每次分割部分的起点,更新最优解的时候更新一下路径,以前也是被路径打印给困惑了,其实和更新最优值思想一样,可以设一个ans_path[] 数组,更新最优值的时候顺便更新一

2014-11-27 15:31:13 890

原创 HDU 2841-Visible Trees(容斥原理)

题目链接:传送门题意:有一个n*m的矩阵上布满了树(矩阵从(1,1)开始),现在有一个农夫站在(0,0)点,问农夫可以看到多少棵树,其中如果这些树在一条线上那么只能看到最前面的那棵树,这个一开始看到确实蒙了。。看了题解其实是挺简单的。首先考虑只能看到一条线上最前面的那棵树这个条件,对于坐标 比如 (2,3)(4,6)(6,9)。。等 这些坐标是在一条直线上的 可以看出其除了(2,3) 其他的都

2014-11-26 20:39:48 993

原创 HDU 4135-Co-prime(容斥原理)

题目链接:传送门题意:求区间[a,b]内与n互质的数的个数。思路:用容斥求出[1-b]与n互质的个数—[1-(a-1)]内与n互质的个数。 #include #include #include #include #include #include #include #include #include #include #include #include #inc

2014-11-26 19:42:16 965

原创 SDUT 3023-当N遇上M(容斥原理)

题目链接:传送门题意:求[1,n]内与m互质的个数。容斥原理:奇加偶减(奇数个类的计数和-偶数个类的计数和)对于这个问题,首先求出m的质因数fac[] , 然后所在区间内有n/fac[i]个数 一定不能与m互质(比如m=8,n=10,对于fac[]=2,有2,4,6,8,10  即5(10/2)个数不能与8互质)。。枚举每一个质因数选还是不选。可以位运算,也可以dfs第一发容斥,准

2014-11-25 22:58:49 833

原创 POJ 3411-Paid Roads(DFS)

题目链接:传送门题意:n个城市,m条道路,要求1--N的最小花费。规定从a城市到城市的花费有两种:如果之前到过c,花费为p,否则花费为r。注意:道路是双向的。难点:可能a到b有多条路而且花费不同这样的话邻接矩阵会错;有人可能深搜的时候会让每个城市只走一次(DFS惯性思维),但这道题不一样,因为到达下一个城市之前可能需要先到另外一个城市以降低花费。这样的话可以标记每个城市访问过的次数,可以设

2014-11-25 14:56:01 788

原创 UVA 10361-Automatic Poetry(串)

题意链接:传送门题意转自:http://blog.csdn.net/sjf0115/article/details/8854304题意:输入:输入N组测试用例,每组输入两个字符串。第一个字符串格式:s12>s34>s5s1,s2,s3,s3,s4,s5都可以为空或者不存在或者全是小写字符第二个字符串格式:s ....输出:每组测试

2014-11-25 13:30:26 740

原创 POJ 1131-Octal Fractions(高精度)

题目链接:传送门题意:小数八进制转成10进制。。BigDecimal水过去。。import java.io.*;import java.util.*;import java.math.*;import java.text.*;public class Main { public static void main(String[] args) { Scanne

2014-11-23 23:32:11 1074

原创 POJ 1129-Channel Allocation(四色定理+迭代深搜)

题目链接:传送门题意:n个信号站,给出连接情况,要用信号覆盖所有信号站,要求相连的信号站不能用同一个信号。等价问题==无向图染色==四色定理(每个平面地图都可以只用四种颜色来染色,而且没有两个邻接的区域颜色相同。已证明)思路:深搜一条路(枚举颜色,判断当前点用已有的颜色能不能染,如不能则加一种颜色,判断强判就行了),搜到头答案就出来了。。然后返回就可以了注意单复数。。#incl

2014-11-23 22:57:17 1071

原创 HDU 1075-What Are You Talking About(map)

题目链接:传送门字典树。。题意:给以部字典,英文和火星文对照的,再给一篇火星文,要求把火星文翻译成英文(字典中没有的火星文直接原样输出)map水过。。#include #include #include #include #include #include #include #include #include #include #include #includ

2014-11-23 19:06:08 1072

原创 POJ 2662-A Walk Through the Forest(最短路+记忆化搜索)

题目链接:

2014-11-23 00:04:24 1773

原创 POJ 1580-String Matching(枚举)

题目链接:http://poj.org/problem?id=1580题意:给出两个串a,b,求它们的最大匹配度。最大匹配度=最大匹配个数*2/(len_a+len_b)因为a和b的最开始匹配的部位都是任意的,所以枚举它们最开始匹配的部位即可。复杂度O(len_a*len_b*(k))k其实这个穿应该都不是很长(不然这么挫的办法不可能0MS过。。)#include #includ

2014-11-22 18:27:47 1008

原创 SDUT 第12周周赛

题目链接:http://acm.sdut.edu.cn:8080/vjudge/contest/view.action?cid=425#overviewA题:转置矩阵,水题,直接交换行和列的值。#include #include #include #include #include #include #include #include #include #include

2014-11-22 18:17:10 828

原创 POJ 2676-Sudoku(DFS)

SudokuTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 14120 Accepted: 6976 Special JudgeDescriptionSudoku is a very simple task. A square table with

2014-11-21 23:50:30 732

原创 Uva 644-Immediate Decodability(串)

An encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all codes are in binary,

2014-11-21 21:04:10 709

原创 POJ 1080-Human Gene Functions(DP)

Human Gene FunctionsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 17300 Accepted: 9617DescriptionIt is well known that a human gene can be considered

2014-11-21 20:33:20 795

原创 Uva 409-Excuses, Excuses!(串)

Judge Ito is having a problem with people subpoenaed for jury duty giving rather lame excuses in order to avoid serving. In order to reduce the amount of time required listening to goofy excuses, Judg

2014-11-21 00:10:26 1018

原创 Uva 10815-Andy's First Dictionary(串)

Problem B: Andy's First DictionaryTime limit: 3 secondsAndy, 8, has a dream - he wants to produce his very own dictionary. This is not an easy task for him, as the number of wo

2014-11-20 23:13:36 961

原创 POJ 2531-Network Saboteur(DFS)

Network SaboteurTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 9435 Accepted: 4458DescriptionA university network is composed of N computers. System ad

2014-11-20 20:06:19 841

原创 POJ 1260-Pearls(DP)

PearlsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7465 Accepted: 3695DescriptionIn Pearlania everybody is fond of pearls. One company, called The Ro

2014-11-19 23:37:51 1407

原创 POJ 2251-Dungeon Master(BFS)

Dungeon MasterTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17007 Accepted: 6620DescriptionYou are trapped in a 3D dungeon and need to find the quicke

2014-11-19 20:13:21 828

原创 POJ 3009-Curling 2.0(DFS)

Curling 2.0Time Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12158 Accepted: 5125DescriptionOn Planet MM-21, after their Olympic games this year, curling

2014-11-19 13:01:02 818

原创 POJ 3077-Rounders(水题乱搞)

RoundersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7697 Accepted: 4984DescriptionFor a given number, if greater than ten, round it to the nearest t

2014-11-18 13:48:52 1112

原创 POJ 2488-A Knight's Journey(DFS)

A Knight's JourneyTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 31702 Accepted: 10813DescriptionBackground The knight is getting bored of seeing the

2014-11-17 23:47:50 912

原创 POJ 1321-棋盘问题(DFS)

棋盘问题Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 23338 Accepted: 11567Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求

2014-11-17 22:40:20 861

原创 POJ 1159-Palindrome(DP/LCS变形)

PalindromeTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 53770 Accepted: 18570DescriptionA palindrome is a symmetrical string, that is, a string read i

2014-11-16 19:30:32 924

原创 POJ 2533-Longest Ordered Subsequence(DP)

Longest Ordered SubsequenceTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 34454 Accepted: 15135DescriptionA numeric sequence of ai is ordered if a1 a2 

2014-11-16 18:27:55 731

原创 POJ 3176-Cow Bowling(DP||记忆化搜索)

Cow BowlingTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 14210 Accepted: 9432DescriptionThe cows don't use actual bowling balls when they go bowling.

2014-11-16 18:17:47 921

原创 POJ 1836-Alignment(DP/LIS变形)

AlignmentTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 13465 Accepted: 4336DescriptionIn the army, a platoon is composed by n soldiers. During the mor

2014-11-16 17:35:56 761

原创 POJ 3267-The Cow Lexicon(DP)

The Cow LexiconTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 8252 Accepted: 3888DescriptionFew know that the cows have their own dictionary with W (1

2014-11-16 15:53:03 751

原创 HDU 1873-看病要排队(优先队列+模拟乱搞)

看病要排队Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5042    Accepted Submission(s): 2073Problem Description看病要排队这个是地球人都知道的常识。

2014-11-15 23:31:14 941

原创 Codeforces 34C-Page Numbers(set+vector+暴力乱搞)

C. Page Numberstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output«Bersoft» company is working on a new versi

2014-11-15 23:23:25 1230

原创 Codeforces 34B-Sale(暴力)

B. Saletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOnce Bob got to a sale of old TV sets. There were n

2014-11-15 23:15:53 1181

原创 Codeforce 34A-Reconnaissance 2(水)

A. Reconnaissance 2time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputn soldiers stand in a circle. For each

2014-11-15 23:07:20 917

原创 HDU 1978-How many ways(记忆化搜索)

How many waysTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3105    Accepted Submission(s): 1823Problem Description这是一个简单的生存游戏,

2014-11-14 21:30:28 744

原创 POJ 1579-Function Run Fun(记忆化搜索)

Function Run FunTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 16503 Accepted: 8514DescriptionWe all love recursion! Don't we? Consider a three-par

2014-11-14 21:26:27 835

原创 HDU 2152-Fruit(母函数)

FruitTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3320    Accepted Submission(s): 1885Problem Description转眼到了收获的季节,由于有TT的专业指导

2014-11-14 20:13:50 759

原创 HDU 2110-Crisis of HDU(母函数)

Crisis of HDUTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 3606    Accepted Submission(s): 1015Problem Description话说上回讲到HDU大战东

2014-11-14 18:25:25 882

原创 HDU 2082-找单词(母函数)

找单词Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4208    Accepted Submission(s): 3023Problem Description假设有x1个字母A, x2个字母B,....

2014-11-14 17:54:55 852

原创 SDUT 3002-素数间隙(素数筛+暴力)

素数间隙Time Limit: 1000ms   Memory limit: 262144K  有疑问?点这里^_^题目描述Neko猫是一个很喜欢玩数字游戏的会说话的肥猫,经常会想到很多很好玩的数字游戏,有一天,它想到一个叫做素数间隙的游戏。据Neko猫的定义,素数间隙是两个相邻素数p和q组成的开区间[p, q),所以素数间隙的长度就是q-p。

2014-11-13 23:33:24 1109

原创 二叉排序树

Time Limit: 1000MS Memory limit: 65536K题目描述二叉排序树的定义是:或者是一棵空树,或者是具有下列性质的二叉树: 若它的左子树不空,则左子树上所有结点的值均小于它的根结点的值; 若它的右子树不空,则右子树上所有结点的值均大于它的根结点的值; 它的左、右子树也分别为二叉排序树。 今天我们要判断两序列是否为同一二叉排序树输入

2014-11-13 22:32:07 995

winload.efi

Win10 开机引导文件

2021-05-21

模电课程设计-万用表 基于Multisim仿真

模电课程设计万用表的整机电路,基于Multisim10仿真。。以测试通过

2015-07-21

空空如也

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

TA关注的人

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