上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 58 下一页
摘要: 一、复杂度 构造回文树需要的空间复杂度为O(N*字符集大小),时间复杂度为O(N*log(字符集大小)) 二、应用 1、求串S前缀0~i内本质不同回文串的个数(两个串长度不同或者长度相同且至少有一个字符不同便是本质不同) 2、求串S内每一个本质不同回文串出现的次数 3、求串S内回文串的个数(其实就是 阅读全文
posted @ 2019-09-17 21:47 知道了呀~ 阅读(338) 评论(0) 推荐(0) 编辑
摘要: B. Light bulbs There are NNN light bulbs indexed from 000 to N−1N-1N−1. Initially, all of them are off. A FLIP operation switches the state of a conti 阅读全文
posted @ 2019-09-16 19:55 知道了呀~ 阅读(354) 评论(0) 推荐(0) 编辑
摘要: F、Moving On Firdaws and Fatinah are living in a country with nn cities, numbered from 11 to nn. Each city has a risk of kidnapping or robbery. Firdaws 阅读全文
posted @ 2019-09-16 17:03 知道了呀~ 阅读(479) 评论(0) 推荐(0) 编辑
摘要: linux的文件目录是一棵目录树,默认起始位置在主文件夹(/home/city),里面有若干子文件(视频、图片、下载、桌面等) 一、文件路径(目录操作) 1、绝对路径:从根目录/写起,完整的、详细的描述目标文件所在的位置。eg: /home/city/test.cpp test.cpp是在主文件夹下 阅读全文
posted @ 2019-09-14 21:05 知道了呀~ 阅读(768) 评论(0) 推荐(0) 编辑
摘要: You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13549 Accept 阅读全文
posted @ 2019-09-10 11:02 知道了呀~ 阅读(353) 评论(0) 推荐(0) 编辑
摘要: B、Fire-Fighting Hero 图论题-单源最短路径:添加一个顶点,连接各个救火团队所在的救火点,路径长度均设为 0,设该顶点为源,即变成了单源最短路径问题。使用两次Dijkstra算法可求出两个最短路径 的最大值。比较时将救火团队的乘以C进行比较可避免分数操作。 E、Magic Mast 阅读全文
posted @ 2019-09-09 22:04 知道了呀~ 阅读(261) 评论(0) 推荐(0) 编辑
摘要: D. Number Of Permutations time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output D. Number Of P 阅读全文
posted @ 2019-09-06 17:48 知道了呀~ 阅读(459) 评论(0) 推荐(0) 编辑
摘要: C. Gas Pipeline time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are responsible for 阅读全文
posted @ 2019-09-06 15:09 知道了呀~ 阅读(462) 评论(0) 推荐(0) 编辑
摘要: 题意: 给定 n 个点,每个点有一个权值a[i],如果a[u]&a[v] != 0,那么就可以在(u,v)之间连一条边,求最后图的最小环(环由几个点构成) 题解:逻辑运算 & 是二进制下的运算,题目给的每个权值 a[i] 的范围最大是1018,即二进制下最多64位。如果64位中有某一位的1的出现数大 阅读全文
posted @ 2019-09-04 21:45 知道了呀~ 阅读(307) 评论(0) 推荐(0) 编辑
摘要: find the mincost route Time Limit: 1000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8771 Accepted Submission(s 阅读全文
posted @ 2019-09-04 21:09 知道了呀~ 阅读(186) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29 30 31 32 33 ··· 58 下一页