07 2017 档案

字典树(Trie树) C++实现
摘要:说明:以下代码是个人按照自己的理解写的,可能有错误或者不太规范的地方,欢迎指出!代码如下://插入、删除、查询、遍历四种操作//注意:四种操作的函数实现中,T都是指向上一个结点的指针,以此方便操作。#includeusing namespace std;typedef... 阅读全文

posted @ 2017-07-31 12:45 h_z_cong 阅读(450) 评论(0) 推荐(0)

51Nod 1282 时钟 —— 最小表示法 + 字符串哈希
摘要:题目链接:https://vjudge.net/problem/51Nod-1282 1282 时钟 题目来源: Codility 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 1282 时钟 题目来源: Codility 基准时间限制:1 秒 空间限制:131 阅读全文

posted @ 2017-07-30 19:52 h_z_cong 阅读(368) 评论(0) 推荐(0)

HDU 5178 pairs —— 思维 + 二分
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5178 pairs Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submi 阅读全文

posted @ 2017-07-29 21:56 h_z_cong 阅读(206) 评论(0) 推荐(0)

CodeChef Forest Gathering —— 二分
摘要:题目链接:https://vjudge.net/problem/CodeChef-FORESTGA 题解: 现场赛。拿到这题很快就知道是二分,但是一直wa,怎么修改也wa,后来又换了种错误的思路,最后还是觉得二分是正确的,但还是wa。人生,就是在这些瞬间被怀疑的…… 结束后,才发现,test()的时 阅读全文

posted @ 2017-07-25 21:10 h_z_cong 阅读(208) 评论(0) 推荐(0)

UVA 11752 The Super Powers —— 数学与幂
摘要:题目链接:https://vjudge.net/problem/UVA-11752题解:1.首先变量必须用unsig long long定义。2.可以分析得到,当指数为合数的时候,该值合法。3.由于最大值为(2^64)-1,而最小的合数为4, 所以底数最大都不超过(2... 阅读全文

posted @ 2017-07-24 22:30 h_z_cong 阅读(219) 评论(0) 推荐(0)

HackerRank leonardo-and-lucky-numbers —— 模线性方程的通解
摘要:题目链接:https://vjudge.net/problem/HackerRank-leonardo-and-lucky-numbers 题解: 1.根据扩展欧几里得:7*x + 4*y = gcd(7,4) = 1,必有整数解,其中一组为(-1,2),通解为:(-1+4*k, 2-7*k)。 2 阅读全文

posted @ 2017-07-23 20:38 h_z_cong 阅读(308) 评论(0) 推荐(0)

CodeForces - 86D D. Powerful array —— 莫队算法
摘要:题目链接:http://codeforces.com/problemset/problem/86/D D. Powerful array time limit per test 5 seconds memory limit per test 256 megabytes input standard 阅读全文

posted @ 2017-07-23 20:16 h_z_cong 阅读(1174) 评论(0) 推荐(0)

POJ2115 C Looooops ——模线性方程(扩展gcd)
摘要:题目链接:http://poj.org/problem?id=2115 C Looooops Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 27838 Accepted: 7930 Description A Compiler 阅读全文

posted @ 2017-07-22 21:55 h_z_cong 阅读(175) 评论(0) 推荐(0)

HDU3605 Escape —— 二分图多重匹配
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3605 Escape Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Subm 阅读全文

posted @ 2017-07-22 20:33 h_z_cong 阅读(230) 评论(0) 推荐(0)

UESTC - 900 方老师炸弹 —— 割点
摘要:题目链接:https://vjudge.net/problem/UESTC-900 方老师炸弹 方老师炸弹 Time Limit: 4000/2000MS (Java/Others) Memory Limit: 65535/65535KB (Java/Others) Submit Status 方老 阅读全文

posted @ 2017-07-21 14:17 h_z_cong 阅读(308) 评论(0) 推荐(0)

BZOJ 3732 Network —— 最小生成树 + 倍增LCA
摘要:题目链接:http://www.lydsy.com/JudgeOnline/problem.php?id=3732 Description 给你N个点的无向图 (1 <= N <= 15,000),记为:1…N。 图中有M条边 (1 <= M <= 30,000) ,第j条边的长度为: d_j ( 阅读全文

posted @ 2017-07-21 11:03 h_z_cong 阅读(218) 评论(0) 推荐(0)

HDU2586 How far away? —— 倍增LCA
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2586How far away ?Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K... 阅读全文

posted @ 2017-07-21 10:50 h_z_cong 阅读(160) 评论(0) 推荐(0)

HDU 5969 最大的位或 —— 贪心 + 二进制的理解
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5969最大的位或Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Ot... 阅读全文

posted @ 2017-07-20 22:13 h_z_cong 阅读(233) 评论(0) 推荐(0)

HDU5968 异或密码 —— 二分 + 边界的细节处理
摘要:题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5968 异或密码 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submis 阅读全文

posted @ 2017-07-20 21:18 h_z_cong 阅读(287) 评论(0) 推荐(0)

Codeforces Round #383 (Div. 2) C. Arpa's loud Owf and Mehrdad's evil plan —— DFS找环
摘要:题目链接:http://codeforces.com/contest/742/problem/C C. Arpa's loud Owf and Mehrdad's evil plan time limit per test 1 second memory limit per test 256 meg 阅读全文

posted @ 2017-07-14 08:57 h_z_cong 阅读(185) 评论(0) 推荐(0)

Codeforces Round #383 (Div. 2) D. Arpa's weak amphitheater and Mehrdad's valuable Hoses —— DP(01背包)
摘要:题目链接:http://codeforces.com/contest/742/problem/D D. Arpa's weak amphitheater and Mehrdad's valuable Hoses time limit per test 1 second memory limit pe 阅读全文

posted @ 2017-07-13 19:38 h_z_cong 阅读(186) 评论(0) 推荐(0)

Codeforces Round #383 (Div. 2) B. Arpa’s obvious problem and Mehrdad’s terrible solution —— 异或
摘要:题目链接:http://codeforces.com/contest/742/problem/BB. Arpa’s obvious problem and Mehrdad’s terrible solutiontime limit per test1 secondme... 阅读全文

posted @ 2017-07-13 14:05 h_z_cong 阅读(168) 评论(0) 推荐(0)

Codeforces Round #394 (Div. 2) D. Dasha and Very Difficult Problem —— 贪心
摘要:题目链接:http://codeforces.com/contest/761/problem/DD. Dasha and Very Difficult Problemtime limit per test2 secondsmemory limit per test25... 阅读全文

posted @ 2017-07-12 10:36 h_z_cong 阅读(171) 评论(0) 推荐(0)

Codeforces Beta Round #96 (Div. 1) C. Logo Turtle —— DP
摘要:题目链接:http://codeforces.com/contest/132/problem/C C. Logo Turtle time limit per test 2 seconds memory limit per test 256 megabytes input standard input 阅读全文

posted @ 2017-07-10 17:11 h_z_cong 阅读(252) 评论(0) 推荐(0)

Educational Codeforces Round 2 C. Make Palindrome —— 贪心 + 回文串
摘要:题目链接:http://codeforces.com/contest/600/problem/C C. Make Palindrome time limit per test 2 seconds memory limit per test 256 megabytes input standard i 阅读全文

posted @ 2017-07-10 11:52 h_z_cong 阅读(257) 评论(0) 推荐(0)

Codeforces Beta Round #56 A. Where Are My Flakes? —— 贪心
摘要:题目链接:http://codeforces.com/problemset/problem/60/AA. Where Are My Flakes?time limit per test2 secondsmemory limit per test256 megabyte... 阅读全文

posted @ 2017-07-10 11:34 h_z_cong 阅读(263) 评论(0) 推荐(0)

Experimental Educational Round: VolBIT Formulas Blitz K. Indivisibility —— 容斥原理
摘要:题目链接:http://codeforces.com/contest/630/problem/K K. Indivisibility time limit per test 0.5 seconds memory limit per test 64 megabytes input standard i 阅读全文

posted @ 2017-07-10 11:24 h_z_cong 阅读(188) 评论(0) 推荐(0)

Codeforces Round #407 (Div. 1) B. Weird journey —— dfs + 图
摘要:题目链接:http://codeforces.com/problemset/problem/788/BB. Weird journeytime limit per test2 secondsmemory limit per test256 megabytesinput... 阅读全文

posted @ 2017-07-09 22:34 h_z_cong 阅读(131) 评论(0) 推荐(0)

Codeforces Round #258 (Div. 2) D. Count Good Substrings —— 组合数学
摘要:题目链接:http://codeforces.com/problemset/problem/451/DD. Count Good Substringstime limit per test2 secondsmemory limit per test256 megaby... 阅读全文

posted @ 2017-07-09 22:04 h_z_cong 阅读(363) 评论(0) 推荐(0)

Codeforces Round #394 (Div. 2) C. Dasha and Password —— 枚举
摘要:题目链接:http://codeforces.com/problemset/problem/761/C C. Dasha and Password time limit per test 2 seconds memory limit per test 256 megabytes input stan 阅读全文

posted @ 2017-07-08 21:51 h_z_cong 阅读(176) 评论(0) 推荐(0)

Codeforces Round #394 (Div. 2) B. Dasha and friends —— 暴力 or 最小表示法
摘要:题目链接:http://codeforces.com/contest/761/problem/B B. Dasha and friends time limit per test 2 seconds memory limit per test 256 megabytes input standard 阅读全文

posted @ 2017-07-08 21:41 h_z_cong 阅读(194) 评论(0) 推荐(0)

Codeforces Beta Round #7 D. Palindrome Degree —— 字符串哈希
摘要:题目链接:http://codeforces.com/contest/7/problem/D D. Palindrome Degree time limit per test 1 second memory limit per test 256 megabytes input standard in 阅读全文

posted @ 2017-07-04 11:23 h_z_cong 阅读(184) 评论(0) 推荐(0)

VK Cup 2012 Qualification Round 1 E. Phone Talks —— DP
摘要:题目链接:http://codeforces.com/contest/158/problem/EE. Phone Talkstime limit per test3 secondsmemory limit per test256 megabytesinputstand... 阅读全文

posted @ 2017-07-04 11:16 h_z_cong 阅读(176) 评论(0) 推荐(0)

Codeforces Beta Round #88 C. Cycle —— DFS(找环)
摘要:题目链接:http://codeforces.com/problemset/problem/117/C C. Cycle time limit per test 2.5 seconds memory limit per test 256 megabytes input standard input 阅读全文

posted @ 2017-07-03 14:35 h_z_cong 阅读(197) 评论(0) 推荐(0)

导航