上一页 1 2 3 4 5 6 7 ··· 11 下一页

2016年12月23日

nwu 新生题解【第一套】

摘要: A:【读题+细节】 【排序+贪心】 题意: 有n张牌,分给n/2个人,每人两张,要求每个人牌上的数值之和相等,输入保证有解。 题解: 先将所有牌面排序,那么依次给每个人分配【最小,最大】【次小,次大】。。。。。。即可【学习按关键字排序】 B:【读题+细节】 题意: 给你t,s,x。且有一个序列是这样 阅读全文

posted @ 2016-12-23 13:47 Jstyle 阅读(191) 评论(0) 推荐(0) 编辑

2016年9月14日

codeforces #371div2 (ABC)

摘要: A. Meeting of Old Friends time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Today an outsta 阅读全文

posted @ 2016-09-14 20:06 Jstyle 阅读(189) 评论(0) 推荐(0) 编辑

2016年7月30日

HDU - 5775 Bubble Sort(树状数组)

摘要: Bubble Sort Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 659 Accepted Submission(s): 393 Prob 阅读全文

posted @ 2016-07-30 09:07 Jstyle 阅读(152) 评论(0) 推荐(0) 编辑

HDU - 1556 Color the ball(树状数组 or 线段树)

摘要: Color the ball Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 16484 Accepted Submission(s): 820 阅读全文

posted @ 2016-07-30 08:53 Jstyle 阅读(201) 评论(0) 推荐(0) 编辑

树状数组

摘要: 对于普通数组,其修改的时间复杂度位O(1),而求数组中某一段的数值和的时间复杂度为O(n),因此对于n的值过大的情况,普通数组的时间复杂度我们是接受不了的。 在此,我们引入了树状数组的数据结构,它能在O(logn)内对数组的值进行修改和查询某一段数值的和。 树状数组是一个查询和修改复杂度都为log( 阅读全文

posted @ 2016-07-30 08:41 Jstyle 阅读(170) 评论(0) 推荐(0) 编辑

HDU - 1541 Stars(树状数组)

摘要: 同学们~ Stars Problem Description Astronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordi 阅读全文

posted @ 2016-07-30 08:35 Jstyle 阅读(171) 评论(0) 推荐(0) 编辑

2016年7月28日

cf - 140 C. New Year Snowmen(贪心+优先队列)

摘要: C. New Year Snowmen time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output As meticulous Gerald 阅读全文

posted @ 2016-07-28 10:30 Jstyle 阅读(362) 评论(0) 推荐(0) 编辑

cf - 140 A. New Year Table(模拟)

摘要: A. New Year Table time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. New Year Table time 阅读全文

posted @ 2016-07-28 10:14 Jstyle 阅读(244) 评论(0) 推荐(0) 编辑

51nod - 1136 欧拉函数(欧拉函数)

摘要: 题目链接:https://www.51nod.com/onlineJudge/questionCode.html#!problemId=1136 思路:欧拉函数求小于或等于n且与n互质的数字的个数 题目链接:https://www.51nod.com/onlineJudge/questionCode 阅读全文

posted @ 2016-07-28 10:03 Jstyle 阅读(219) 评论(0) 推荐(0) 编辑

51nod - 1019 逆序数(归并排序or线段树)

摘要: 思路:利用归并排序,先分解区间。最后合并区间的时候找到逆序的个数。(可以画图来理解归并排序) 代码: 1 #include <iostream> 2 #include <cstring> 3 using namespace std; 4 5 int a[50005]; 6 int res[50005 阅读全文

posted @ 2016-07-28 09:52 Jstyle 阅读(212) 评论(0) 推荐(0) 编辑

2016年7月24日

POJ 2376 - Cleaning Shifts(最小区间覆盖)

摘要: Cleaning Shifts Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 17736 Accepted: 4516 Description Farmer John is assigning some of his N (1 阅读全文

posted @ 2016-07-24 16:17 Jstyle 阅读(215) 评论(0) 推荐(0) 编辑

2016年7月15日

cf - 629D Babaei and Birthday Cake(DP+线段树维护)

摘要: D - Babaei and Birthday Cake Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 629D D - Babaei a 阅读全文

posted @ 2016-07-15 15:10 Jstyle 阅读(238) 评论(0) 推荐(0) 编辑

POJ 3468 - A Simple Problem with Integers(线段树,区间更新)

摘要: C - A Simple Problem with Integers Time Limit:5000MS Memory Limit:131072KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 3468 C - A Simple 阅读全文

posted @ 2016-07-15 15:02 Jstyle 阅读(240) 评论(0) 推荐(0) 编辑

HDU 1166 - 敌兵布阵(线段树,单点更新)

摘要: A - 敌兵布阵 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1166 A - 敌兵布阵 Submit Status Practice HDU 1166 阅读全文

posted @ 2016-07-15 14:53 Jstyle 阅读(170) 评论(0) 推荐(0) 编辑

2016年7月11日

暑期第一弹<搜索> E - Find The Multiple(DFS)

摘要: E - Find The Multiple Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status E - Find The Multiple Submit Status Descripti 阅读全文

posted @ 2016-07-11 17:55 Jstyle 阅读(811) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 11 下一页

导航