摘要: The cows don't use actual bowling balls when they go bowling. They each take a number (in the range 0..99), though, and line up in a standard bowling- 阅读全文
posted @ 2020-02-02 18:23 Vetsama 阅读(87) 评论(0) 推荐(0)
摘要: 最近xhd正在玩一款叫做FATE的游戏,为了得到极品装备,xhd在不停的杀怪做任务。久而久之xhd开始对杀怪产生的厌恶感,但又不得不通过杀怪来升完这最后一级。现在的问题是,xhd升掉最后一级还需n的经验值,xhd还留有m的忍耐度,每杀一个怪xhd会得到相应的经验,并减掉相应的忍耐度。当忍耐度降到0或 阅读全文
posted @ 2020-02-02 17:58 Vetsama 阅读(126) 评论(0) 推荐(0)
摘要: A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = <x1, x2, ..., xm> another se 阅读全文
posted @ 2020-02-02 17:47 Vetsama 阅读(114) 评论(0) 推荐(0)
摘要: A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence ( a1, a2, ..., aN) be any sequence ( ai1, 阅读全文
posted @ 2020-02-02 17:42 Vetsama 阅读(114) 评论(0) 推荐(0)
摘要: 给出两个字符串A B,求A与B的最长公共子序列(子序列不要求是连续的)。 比如两个串为: abcicba abdkscab ab是两个串的子序列,abc也是,abca也是,其中abca是这两个字符串最长的子序列。 Input 第1行:字符串A 第2行:字符串B (A,B的长度 <= 1000) Ou 阅读全文
posted @ 2020-02-02 17:00 Vetsama 阅读(178) 评论(0) 推荐(0)
摘要: 题意就是一堆字符串,每个点之间的距离就是字符串不同的字母个数,字符串长度都是7 把不同字符个数存到图里面,然后用prim算法就行 poj放不下map[2001][2001],所以放到全局区 #include<iostream> #include<string> using namespace std 阅读全文
posted @ 2020-01-26 21:48 Vetsama 阅读(87) 评论(0) 推荐(0)
摘要: 普普通通的最小生成树,写了一遍prim的,所以用一下克鲁斯卡尔 注意输入数据有多组 #include <iostream> #include <cstdio> #include <cstdlib> #include <cstring> #include <algorithm> using names 阅读全文
posted @ 2020-01-26 21:14 Vetsama 阅读(82) 评论(0) 推荐(0)
摘要: 因为这个图比较稠密,所以用prim算法 每次选到最小边的时候判断,保存最小边里面最大的边 注意要用scanf不然会超时 #include<iostream> #include<cstdio> #include<cstring> #include<string> using namespace std 阅读全文
posted @ 2020-01-26 21:03 Vetsama 阅读(92) 评论(0) 推荐(0)