- 博客(27)
- 资源 (6)
- 收藏
- 关注
原创 C++ 模拟栈 stacks (数据结构实验)
非常不喜欢链表操作, 又因为 c++ STL 库里 自带 stack 函数, 但是 实验课 需要自己写, 好吧模仿STL stack 写到一个结构体中, 这让我习惯了stack 函数的人很舒服。(1)输入一个十进制数,利用栈操作,将该数转换成n进制数。(2)输入一个表达式,表达式中包括三种括号“()”、“[]”和“{}”,判断该表达式的括号是否匹配。s
2017-09-28 17:33:39 474
原创 BZOJ 1012[JSOI2008]最大数maxnumber (线段树解法)
1012: [JSOI2008]最大数maxnumberTime Limit: 3 Sec Memory Limit: 162 MBSubmit: 11164 Solved: 4883[Submit][Status][Discuss]Description 现在请求你维护一个数列,要求提供以下两种操作:1、 查询操作。语法:Q L 功能:查询当前数列中末尾L个
2017-09-26 22:19:22 527
原创 用线段树求解坐标矩阵中的交并集面积思路及其模板代码
请客官老爷移步:http://www.cnblogs.com/scau20110726/archive/2013/04/12/3016765.htmlhttp://blog.csdn.net/qq_18661257/article/details/47658191嘻嘻, 大奔 的思路 ;代码简洁 用的是 区间更新; 而且可以一起求 矩阵的并 与交
2017-09-25 20:46:06 816
原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 F题 Overlapping Rectangles(线段树)
求矩阵 并集的面积; 用线段树来解决推荐一个 线段树求 矩阵交并集的 思路:http://www.cnblogs.com/scau20110726/archive/2013/04/12/3016765.html客官老爷请移步:线段树矩阵交并集 模板代码:http://blog.csdn.net/sizaif/article/details/78089278
2017-09-25 20:43:03 837
原创 2017 ACM-ICPC 亚洲区(南宁赛区)网络赛 L题 非递减权值最大
Let SS be a sequence of integers s_{1}s1, s_{2}s2, ......, s_{n}sn Each integer is is associated with a weight by the following rules:(1) If is is negative, then its weight is 00.(2)
2017-09-24 17:43:43 776
原创 ACM-ICPC国际大学生程序设计竞赛北京赛区(2017)网络赛 G题Bounce
时间限制:1000ms单点时限:1000ms内存限制:256MB描述For Argo, it is very interesting watching a circle bouncing in a rectangle.As shown in the figure below, the rectangle is divided into N×M grids
2017-09-24 11:40:27 913 1
原创 ACM-ICPC国际大学生程序设计竞赛北京赛区(2017)网络赛 A题
题目1 : Visiting Peking University时间限制:1000ms单点时限:1000ms内存限制:256MB描述Ming is going to travel for n days and the date of these days can be represented by n integers: 0, 1, 2,
2017-09-24 11:11:25 970
原创 石油大学OJ组队赛11 C 三元排序
问题 C: 三元排序时间限制: 1 Sec 内存限制: 128 MB提交: 101 解决: 23[提交][状态][讨论版]题目描述 一次交换操作是指将数列中的两个数位置对调。给出一个只有1、2、3三个元素的数列,你需要通过有限次交换使数列中的数从小到大排列。请求出最少需要的交换次数。输入第一行读入一个数N(N 以下N行每行一个数。每个数都只可能是
2017-09-24 11:07:11 1040
原创 HDU 5726 GCD (ST 表 +查询)
传送门: http://acm.hdu.edu.cn/showproblem.php?pid=5726GCDTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 4341 Accepted Submission(s):
2017-09-20 12:12:58 715
原创 算法之QMR--ST算法
RMQ (RangeMinimum/Maximum Query)问题是指:对于长度为n的数列A,回答若干询问RMQ(A,i,j)(i,j,返回数列A中下标在i,j里的最小(大)值,也就是说,RMQ问题是指求区间最值的问题。解决的方法有: 1、朴素(即搜索),O(n)-O(qn) online。2、线段树,O(n)-O(qlogn)online。3、ST(实质是动态规划
2017-09-19 15:37:34 960
原创 UVa 1149 Bin Packing (二分 + 贪心)
UVA 第一次用 不会用, 输出错误 竟然 发邮箱 , 好贴心的操作贪心, 按照从小 到大排序, 然后 二分背包数目, 因为 背包 最大就是 n 所以 #include #include #include #include #include #include #include #include #include #inclu
2017-09-19 13:27:32 541
原创 2017 青岛网络赛 Smallest Minimum Cut 最大流最小割问题, (加深理解最大流问题)
定理1: 最大流最小割定量: 在任何的网络中,最大流的值等于最小割的容量定理2:在任何网络中,如果f是一个流,CUT(S,T)是一个割,且f的值等于割CUT(S,T)的容量,那么f是一个最大流结论1:最大流时,最小割cut(S,T)中,正向割边的流量=容量,逆向割边的流量为0。否则还可以增广。推论1:如果f是网络中的一个流,CUT(S,T)是一个割,那么f的值不
2017-09-17 21:15:18 967
原创 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 F. Trig Function(切比雪夫多项式)
f(cos(x))=cos(n∗x) holds for all xx.Given two integers nn and mm, you need to calculate the coefficient of x^mxm in f(x)f(x), modulo 998244353998244353.Input FormatMultiple test case
2017-09-17 19:40:50 1631
原创 2017 ACM-ICPC 亚洲区(西安赛区)网络赛 B Coin (概率计算)
传送门: https://nanti.jisuanke.com/t/17115Bob has a not even coin, every time he tosses the coin, the probability that the coin's front face up is \frac{q}{p}(\frac{q}{p} \le \frac{1}{2})p
2017-09-16 19:00:20 1574
原创 Contest1255 - 2017区域赛组队训练赛10 K: keks
问题 K: keks时间限制: 1 Sec 内存限制: 128 MB提交: 24 解决: 5[提交][状态][讨论版]题目描述给出一个n位数,要求删掉其中k位数字,使得剩下的数字组成的数尽量大。输入第1行:两个正整数n, k(1 第2行:一个n位正整数(无前导0)。输出输出一行,一个正整数,表示剩下的数的最大值。样例输
2017-09-15 21:55:05 556
原创 POJ 2516 Minimum Cost (最小费用流 SPFA)
Minimum CostTime Limit: 4000MS Memory Limit: 65536KTotal Submissions: 17336 Accepted: 6095DescriptionDearboy, a goods victualer, now comes to a big problem, a
2017-09-14 20:28:15 581
原创 POJ 2195 Going Home (网络流之最小费用流)
Going HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 23603 Accepted: 11885DescriptionOn a grid map there are n little men and n houses. In each
2017-09-11 21:45:56 1686
原创 BZOJ 1001[BeiJing2006]狼抓兔子 (网络流 Dinic)
1001: [BeiJing2006]狼抓兔子Time Limit: 15 Sec Memory Limit: 162 MBSubmit: 24061 Solved: 6086[Submit][Status][Discuss]Description现在小朋友们最喜欢的"喜羊羊与灰太狼",话说灰太狼抓羊不到,但抓兔子还是比较在行的,而且现在的兔子还比较笨,它们只有
2017-09-09 17:22:07 652
原创 POJ 1087 A Plug for UNIX (网络流, Dinic 建图)
A Plug for UNIXTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 17529 Accepted: 6055DescriptionYou are in charge of setting up the press room for the
2017-09-09 10:33:35 574
原创 POJ 3281 Dining (拆点+ 网络流)
DiningTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 19307 Accepted: 8607DescriptionCows are such finicky eaters. Each cow has a preference for cer
2017-09-07 23:53:23 683
原创 Codeforeces Round #226 (Div. 2) E---Bear in the Field(矩阵快速幂)
Our bear's forest has a checkered field. The checkered field is an n × n table, the rows are numbered from 1 to n from top to bottom, the columns are numbered from 1 ton from left to right. Let's de
2017-09-06 16:38:38 361
原创 RMRC2016 G:Flow Shop (DP)
Flow Shop时间限制: 6 Sec 内存限制: 128 MB提交: 16 解决: 15[提交][状态][讨论版]题目描述harvest grain). All swathers go through the same basic stages in their construction: for example they all need to have a
2017-09-04 21:30:52 832
原创 RMRC2016: B Election 组合数学
B: Election时间限制: 1 Sec 内存限制: 128 MB提交: 122 解决: 21[提交][状态][讨论版]题目描述After all the fundraising, campaigning and debating, the election day has finally arrived. Only two candidates remain
2017-09-04 21:04:47 631
原创 SER2016 DIV1 B, K 题解
B: Base Sums时间限制: 1 Sec 内存限制: 128 MB提交: 17 解决: 0[提交][状态][讨论版]题目描述Given three values n, a, and b, find the smallest m>n such that the sum of the digits of m in base a is the same as the
2017-09-03 20:44:55 670
原创 广西2017邀请赛 E: CS Course &,|,^ 运算
E: CS Course时间限制: 2 Sec 内存限制: 512 MB提交: 79 解决: 21[提交][状态][讨论版]题目描述Little A has come to college and majored in Computer and Science.Today he has learned bit-operations in Algorithm Le
2017-09-03 11:09:32 905
原创 湖南省第十一届大学生计算机程序设计竞赛 A,B,C,D,F,H,J 题解
先贴上,代码吃完饭回来补, 吃饭为大.A: Aerial Tramway时间限制: 1 Sec 内存限制: 128 MB提交: 0 解决: 0[提交][状态][讨论版]题目描述An aerial tramway, cable car, ropeway or aerial tram is a type of aerial lift which uses one
2017-09-01 17:40:07 1240
原创 河南省第十届大学生程序设计竞赛 A,B,C,D,F,G,H 题解
H: Intelligent Parking Building时间限制: 1 Sec 内存限制: 128 MB提交: 22 解决: 20[提交][状态][讨论版]题目描述There is a new revolution in the parking lot business: the parking building. The concept is simple
2017-09-01 17:29:01 2083
操作系统实验之请求分页系统页面淘汰算法
2018-05-24
计算机网络实验
2017-11-29
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人