
▲—ACM—▲
文章平均质量分 79
MinecodeAir
这个作者很懒,什么都没留下…
展开
-
结构体的自引用及相互引用
在用C来实现数据结构以及部分算法时,经常用到结构体,比如实现树以及树的子节点时,就需要该结构体包含自身类型的成员变量。而最近在研究OC的匿名函数实现时,也涉及到了类似需求。同时,两个结构体之间相互引用也经常遇到问题。故简单总结一下C语言结构体的自引用语法。原创 2017-12-04 17:25:25 · 4717 阅读 · 0 评论 -
Uva820 Internet Bandwidth(网络流、双向EdmondsKarp)
Uva820 Internet Bandwidth(网络流、双向EdmondsKarp)原创 2016-08-17 23:27:58 · 522 阅读 · 0 评论 -
HDU1532 Drainage Ditches(网络流、EdmondsKarp)
HDU3549 Flow Problem(网络流、EdmondsKarp)原创 2016-08-17 23:21:08 · 329 阅读 · 0 评论 -
HDU1532 Drainage Ditches(网络流EdmondsKarp)
HDU1532 Drainage Ditches(网络流EdmondsKarp)原创 2016-08-17 14:58:58 · 338 阅读 · 0 评论 -
HDU5835 Danganronpa(简单推理)
HDU5833 Danganronpa(简单推理)原创 2016-08-14 22:03:02 · 955 阅读 · 0 评论 -
HDU5806 NanoApe Loves Sequence Ⅱ(尺取法\two pointers)
HDU5806 NanoApe Loves Sequence Ⅱ(尺取法\two pointers)原创 2016-08-14 21:34:40 · 518 阅读 · 0 评论 -
HDU5783 Divide the Sequence(贪心)
HDU5783 Divide the Sequence(贪心)原创 2016-08-13 22:53:13 · 347 阅读 · 0 评论 -
HDU5744 Keep On Movin(贪心)
HDU5744 Keep On Movin(贪心)原创 2016-08-13 22:18:02 · 344 阅读 · 0 评论 -
HDU5742 It's All In The Mind(贪心)
HDU5742 It’s All In The Mind(贪心)原创 2016-08-13 22:00:55 · 355 阅读 · 0 评论 -
【数据结构】——树状数组的几种模型
树状数组是利用二分的思想使得查询和修改的复杂度都为log(n)的数据结构,主要用于查询数组前缀和、区间和并且经常更改数据。原创 2016-08-13 11:54:50 · 2452 阅读 · 1 评论 -
HDU1166 敌兵布阵 (树状数组->改点求段)
HDU1166 敌兵布阵 (树状数组)链接:http://acm.hdu.edu.cn/showproblem.php?pid=1166题目Time Limit:1000MS Memory Limit:32768KB Description C国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek原创 2016-08-13 11:42:31 · 424 阅读 · 0 评论 -
Aizu 0005 GCD and LCM(欧几里得)
Aizu 0005 GCD and LCM(欧几里得)原创 2016-08-13 11:03:01 · 349 阅读 · 0 评论 -
Uva 11971 Polygon(数论、概率)
Uva 11971 Polygon(数论、概率)原创 2016-08-13 10:56:42 · 388 阅读 · 0 评论 -
Uva 10820 Send a Table(数论、欧拉筛法)
Uva 10820 Send a Table(数论、欧拉筛法)原创 2016-08-13 10:45:09 · 310 阅读 · 0 评论 -
Uva 10006 Carmichael Numbers(数论、快速幂、素数筛法)
Uva 10006 Carmichael Numbers(数论、快速幂、素数筛法)原创 2016-08-13 10:36:57 · 396 阅读 · 0 评论 -
Uva10791 Minimum Sum LCM(数论、唯一分解定理)
Uva10791 Minimum Sum LCM(数论、唯一分解定理)原创 2016-08-13 10:27:14 · 379 阅读 · 0 评论 -
Uva10375 Choose and divide(数论、唯一分解定理、快速幂)
Uva10375 Choose and divide(数论、唯一分界定理、快速幂)原创 2016-08-13 10:11:45 · 386 阅读 · 0 评论 -
Uva11582 Colossal Fibonacci Numbers! (数论、斐波那契循环节)
Uva11582 Colossal Fibonacci Numbers! (斐波那契循环节)链接: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2629题目Time Limit:1000MS Memory Limit:0KB Descri原创 2016-08-13 10:00:46 · 435 阅读 · 0 评论 -
Codeforces 69D Dot(DFS)
Codeforces 69D Dot原创 2016-07-31 16:45:40 · 506 阅读 · 0 评论 -
Codeforces 67A Partial Teacher(模拟)
Codeforces 67A Partial Teacher(模拟)原创 2016-07-31 14:47:48 · 397 阅读 · 0 评论 -
Codeforces 66 D Petya and His Friends(找规律)
Codeforces 66 D Petya and His Friends原创 2016-07-27 22:09:47 · 491 阅读 · 0 评论 -
Codeforces 66C Petya and File System(STL--map)
Codeforces 66C Petya and File System链接:http://codeforces.com/problemset/problem/66/C 题目Time Limit:3000MS Memory Limit:262144KB Description Recently, on a programming lesson little Petya showed how原创 2016-07-27 21:53:31 · 691 阅读 · 0 评论 -
HDU1003 Max Sum(最大连续子序和、贪心、DP)
HDU1003 Max Sum(最大连续子序和、DP)链接:http://acm.hdu.edu.cn/showproblem.php?pid=1003题目Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Description Given a sequence a[1],a[原创 2016-05-24 20:10:52 · 478 阅读 · 0 评论 -
LOJ1282 Leading and Trailing(数论)
LOJ1282 Leading and Trailing(数论)链接:http://www.lightoj.com/volume_showproblem.php?problem=1282题目Time Limit: 2000ms Memory Limit: 32768KB Description You are given two integers: n and k, your task i原创 2016-05-24 00:07:12 · 439 阅读 · 0 评论 -
NEFU115 斐波那契的整除(数论水题)
NEFU115 斐波那契的整除(数论水题)链接:http://acm.nefu.edu.cn/JudgeOnline/problemShow.php?problem_id=115题目Time Limit:1000ms Memory Limit:65536K Description 已知斐波那契数列有如下递归定义,f(1)=1,f(2)=1, 且n>=3,f(n)=f(n-1)+f(n-2)原创 2016-05-23 23:22:35 · 1179 阅读 · 0 评论 -
PKU1003 Hangover(水题)
PKU1003 Hangover(水题)题目Time Limit: 1000ms Memory Limit: 10000KB How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length.原创 2016-05-22 11:46:24 · 440 阅读 · 0 评论 -
cin、cin.get()、cin.getline()、getline()、gets()等函数的用法
cin、cin.get()、cin.getline()、getline()、gets()等函数的用法1、cin>>用法1:最基本,也是最常用的用法,输入一个数字:#include <iostream> using namespace std; main () { int a,b; cin>>a>>b; cout<<a+b<<endl; }输入:2[回车]3[回车] 输出:5注意:原创 2016-05-21 22:56:50 · 410 阅读 · 0 评论