07 2016 档案

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 阅读(168) 评论(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 阅读(220) 评论(0) 推荐(0)

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

posted @ 2016-07-30 08:41 Jstyle 阅读(198) 评论(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 阅读(183) 评论(0) 推荐(0)

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 阅读(388) 评论(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 阅读(256) 评论(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 阅读(229) 评论(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 阅读(227) 评论(0) 推荐(0)

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 阅读(222) 评论(0) 推荐(0)

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 阅读(260) 评论(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 阅读(253) 评论(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 阅读(179) 评论(0) 推荐(0)

暑期第一弹<搜索> 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 阅读(838) 评论(0) 推荐(0)

暑期第一弹<搜索> D - Fliptile(黑白棋翻转经典题型 DFS)
摘要:D - Fliptile Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status D - Fliptile Submit Status Description Farmer John kno 阅读全文

posted @ 2016-07-11 17:44 Jstyle 阅读(445) 评论(0) 推荐(0)

暑期第一弹<搜索> C - Catch That Cow(BFS)
摘要:C - Catch That Cow Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status C - Catch That Cow Submit Status Description Far 阅读全文

posted @ 2016-07-11 17:31 Jstyle 阅读(244) 评论(0) 推荐(0)

暑期第一弹<搜索> B - Dungeon Master(三维BFS,6个状态)
摘要:B - Dungeon Master Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description You are trapped i... 阅读全文

posted @ 2016-07-11 17:24 Jstyle 阅读(218) 评论(0) 推荐(0)

暑期第一弹<搜索> A - 棋盘问题(简单dfs)
摘要:A - 棋盘问题 Time Limit:1000MS Memory Limit:10000KB 64bit IO Format:%I64d & %I64u Submit Status A - 棋盘问题 Submit Status Description 在一个给定形状的棋盘(形状可能是不规则的)上面 阅读全文

posted @ 2016-07-11 17:08 Jstyle 阅读(244) 评论(0) 推荐(0)

NWU CCCC 1017(HDU 1272改编 并查集判断图是否存在环)
摘要:Evio与观察小白鼠 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description Evio非常喜欢生物,Evio现在想观察小白鼠的记忆能力。Evio想设计一个任意两个房间只有一条路径的地图。这个地图有m条双 阅读全文

posted @ 2016-07-09 16:57 Jstyle 阅读(215) 评论(0) 推荐(0)

NWU CCCC 1014(又是二叉树分冶)
摘要:题目描述很简单 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description 输入一棵树的中序遍历和先序遍历,输出后序遍历。 Input 输入多组数据。 每组数据的第一行: 树的中序遍历。 每组数据的第二行: 阅读全文

posted @ 2016-07-07 22:01 Jstyle 阅读(184) 评论(0) 推荐(0)

NWU CCCC选拔赛 1014阶乘问题(思维题)
摘要:阶乘问题 Font: Times New Roman | Verdana | Georgia Font Size: ← → Problem Description N的阶乘写作N!,表示小于等于N的所有正整数的乘积。 阶乘会变大得很快,如13!就必须用32位整数类型来存储,到了70!即使用浮点数也存 阅读全文

posted @ 2016-07-07 21:58 Jstyle 阅读(448) 评论(0) 推荐(0)

hdu - 1556 (Color the ball 线段树)
摘要:题目链接:点击打开链接 思路:简单的线段树模板,理解了好久。创建+更新+查询。更新只涉及到区间更新次数(+1)即可。查询可以递归查询,累加包含查询结点的树结点(即离散化的区间[l,r])的次数即可。简单的说就是,查询结点所在的区间更新次数的总和。 eg:离散化到树结点,若共有4个结点,更新区间[1, 阅读全文

posted @ 2016-07-02 23:31 Jstyle 阅读(146) 评论(0) 推荐(0)

cf #360 div2 D-Remainders Game(中国剩余定理)
摘要:D. Remainders Game time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output D. Remainders Game tim 阅读全文

posted @ 2016-07-01 00:59 Jstyle 阅读(206) 评论(0) 推荐(0)

导航