上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页
摘要: 题目链接:http://codeforces.com/contest/598/problem/A题目分类:大数题意:1到n 如果是2的次方则减去这个数,否则就加上这个数,求最后的结果是多少题目分析:数很大,关键是精度问题,刚开始用__int64和double发现都是不对的,后来发现用long lon... 阅读全文
posted @ 2015-11-16 23:30 Gssol 阅读(300) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://codeforces.com/problemset/problem/598/B题目分类:字符串题意:给定一个串,然后n次旋转,每次给l,r,k,表示区间l到r的字符进行k次平移,具体移动规则看题意,求经过n次旋转之后字符串是怎样的题目分析:自己的做法比较麻烦,后来发现别人用函... 阅读全文
posted @ 2015-11-16 23:01 Gssol 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.timus.ru/problem.aspx?space=1&num=1519题目分类:插头dp题意:求经过所有可行点的哈密顿回路的个数 * 不可走 . 可以走 2 ≤N,M≤ 12代码:括号匹配法,转移有点复杂,但是时间空间比较小#include#define LL ... 阅读全文
posted @ 2015-11-16 00:28 Gssol 阅读(129) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3415题目分类:后缀数组题意:给出两个串和一个数字k,求两个串的公共字串大于等于k的数目代码://#include#include#include#include#includeusing namespace std;#define N... 阅读全文
posted @ 2015-11-15 23:42 Gssol 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=3450题目分类:后缀数组题意:求n个串的最长公共字串(输出字串)//#include#include#include#include#includeusing namespace std;#define N 200005int wa[N... 阅读全文
posted @ 2015-11-15 23:32 Gssol 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://poj.org/problem?id=2774题目分类:后缀数组题意:两个串,求两个串的最长公共字串的长度代码://#include#include#include#include#includeusing namespace std;#define N 200005int ... 阅读全文
posted @ 2015-11-15 23:22 Gssol 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 比较两个数大小import java.math.*; import java.util.*; public class Main { public static void main(String[] args) { Scanner cin = ... 阅读全文
posted @ 2015-11-15 22:15 Gssol 阅读(205) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3488题意:给你一个N个顶点M条边的带权有向图,要你把该图分成1个或多个不相交的有向环.且所有定点都只被一个有向环覆盖.问你该有向环所有权值的总和最小是多少?(哈密顿图)题目分类:最小费用最大流题目代码:... 阅读全文
posted @ 2015-11-15 19:24 Gssol 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3376题意:给出一个矩阵,从(1,1)走到(n,n),然后再从(n,n)走到(1,1),每个点只能走一次,除了(n,n)点。求最大值题目分类:最大流题目代码:#includeusing namespace... 阅读全文
posted @ 2015-11-15 18:23 Gssol 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5090题意:n个数,k,给n个数加上k的正倍数或者不加,问最后能不能凑成1 到 n的序列题目分类:暴力题目分析:因为每个数只能变大或者不变,并不能变小,所以要从小数开始往大凑。先排序,然后凑到1了之后然后... 阅读全文
posted @ 2015-11-15 11:20 Gssol 阅读(150) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 13 下一页