Critical Links 题目链接:https://vjudge.net/problem/UVA-796 Description: In a computer network a link L, which interconnects two servers, is considered cri ...
分类:
其他好文 时间:
2019-02-17 23:52:42
阅读次数:
284
题意:有一块草坪,这块草坪长l 米,宽 w 米,草坪有一些喷头,每个喷头在横坐标为 p 处,每个喷头的纵坐标都是(w/2) ,并且喷头的洒水范围是一个以喷头为圆心,半径为 r 米的圆。每次最少需要打开多少个喷头来给草坪洒水,并且草坪各处都能被洒到,不行输出-1 思路:这是一道区间覆盖(贪心)题: 有 ...
分类:
其他好文 时间:
2019-02-17 23:34:39
阅读次数:
211
题目: 思路: 求两个串的最长公共子序列,则这个最短的串就是给出的两个串的长度和减去最长公共子序列的长度。 状态转移方程: 如果s[i-1]==t[j-1]就有dp[i][j] = dp[i-1][j-1]+1; 否则有dp[i][j] = max(dp[i-1][j], dp[i][j-1]) d ...
分类:
其他好文 时间:
2019-02-17 13:06:52
阅读次数:
118
题目链接:https://vjudge.net/problem/UVA-10129 题目大意:输入N 代表有n个字符串 每个字符串最长1000 要求你把所有的字符串连成一个序列 每个字符串的第一个字母是前一个字符串的最后一个字母 思路:这是学的欧拉回路的第一道题 ,把单词的首字母和尾字母看做结点,单 ...
分类:
其他好文 时间:
2019-02-17 12:42:39
阅读次数:
169
无法用复杂状态进行转移时改变计算方式;整体考虑;压缩空间优化时间 ...
分类:
其他好文 时间:
2019-02-17 10:48:35
阅读次数:
176
Dr William Larch, noted plant psychologist and inventor of the phrase “Think like a tree — Think Fig” has invented a new classification system for tre ...
分类:
其他好文 时间:
2019-02-17 01:00:35
阅读次数:
151
题目 https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2515 题意 n*n矩阵中填入大写字母,n <= 10,要求从上到下从左到右字母序最小,相邻格子字母 ...
分类:
其他好文 时间:
2019-02-16 20:43:50
阅读次数:
214
题意: 思路:来自:https://blog.csdn.net/guozlh/article/details/53209339利用map<pair<char,int>,int>模拟数组,map<char,int>用于存放定义数组的长度定义语句不用考虑,直接模拟存放其长度即可赋值语句要分别计算等号左边 ...
分类:
其他好文 时间:
2019-02-16 18:22:16
阅读次数:
202
https://vjudge.net/problem/UVA-12657 题目 你有一行盒子,从左到右依次编号为1, 2, 3,…, n。你可以执行四种指令: 1 X Y表示把盒子X移动到盒子Y左边(如果X已经在Y的左边则忽略此指令)。 2 X Y表示把盒子X移动到盒子Y右边(如果X已经在Y的右边则 ...
分类:
其他好文 时间:
2019-02-16 13:35:33
阅读次数:
202
The decimal expansion of the fraction 1/33 is 0.03, where the 03 is used to indicate that the cycle 03 repeats inde?nitely with no intervening digits. ...
分类:
其他好文 时间:
2019-02-16 09:27:03
阅读次数:
147