- 博客(195)
- 资源 (1)
- 收藏
- 关注
原创 HDU 1257 vector。。。
都说用dp和贪心的。。。不过我也用的贪心的思想。。。反正就是每次取和现在vector中存放的高度里面相差最近的那个高度,然后修改就好了,如果vector中没有符合的,那就把他放入vector中再sort一下就好了最后答案就是v.len
2016-06-29 18:46:51
562
原创 学校自己挂的题目。。。我也不知道是哪里的。。。
Broken lineTime Limit:250MS Memory Limit:4096KB 64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThere is a closed broken line on a plane with sides parallel to coord
2016-05-03 18:54:07
756
转载 点是否在多边形内部 别人的博客
模板题目,不过我的下一篇中也自己单纯的写了一下代码,和这位博客中的大牛方法不同。不过这位大牛的写法更优哦http://www.cnblogs.com/jackyang/然后判断点在多边形内部http://blog.youkuaiyun.com/hjh2005/article/details/9246967http://www.cnblogs.com/luxiaoxun/p/3722358.
2016-05-03 18:50:12
452
原创 CF 345 C 模拟
http://codeforces.com/contest/435/problem/CC. Cardiogramtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
2016-05-02 15:29:16
879
原创 POJ 2605 数学
http://poj.org/problem?id=2605Simple game on a gridTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 931 Accepted: 482DescriptionThere is an
2016-05-02 15:26:29
728
原创 回文串的组合 DP
D. Palindrome pairstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a non-empty string s cons
2016-05-01 22:26:42
627
原创 判断连通性 欧拉回路的性质 UVA10129
书的169页的例题,书上推荐了两种方法。然而我只是看了别人的代码敲了一下,TAT。(敲的是并查集的方法,以后要用dfs做一下看看)我们把每一个字符串看成有向图即可并查集:我们把第一个字符看成入度,最后一个字符看成出度。能够形成环有两种情况①有一个点入度-出度=1,另一个点出度-入度=1②所有的点入度都等于出度然后就没啥了dfs。。。以后再慢慢写吧
2016-04-30 13:53:56
502
原创 UVA 10305 拓扑排序(基础)
John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task isonly possible if other tasks have already been executed.InputThe input will consist of severa
2016-04-30 10:50:48
598
原创 题目来源于欧拉计划的数学OJ。。。
第一题给我的最大的感触就是,打代码太久了,解决问题都直接变成计算机的思维了。。。都忘了数学方法了。。。看来要好好的学习数学了。。。题目1:计算1000以内的所有的能被3和5整除的数字的和我的想法:暴力,时间为O(1000)#includeusing namespace std;typedef long long ll;const int maxn = 1000000
2016-04-29 21:25:24
938
原创 HDU 2680
Choose the best routeTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12308 Accepted Submission(s): 3999Problem DescriptionOne
2016-04-28 21:36:29
427
原创 HDU 1596
find the safest roadTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10606 Accepted Submission(s): 3766Problem DescriptionXX星
2016-04-28 20:10:44
351
原创 hdu 2544
最短路Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 50493 Accepted Submission(s): 22211Problem Description在每年的校赛里,所有进入决赛的同学都会获
2016-04-28 16:24:16
538
原创 HDU 1874
畅通工程续Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 42101 Accepted Submission(s): 15584Problem Description某省自从实行了很多年的畅通工
2016-04-28 15:33:36
501
原创 HDU 2112
HDU TodayTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 23058 Accepted Submission(s): 5517Problem Description经过锦囊相助,海东集团终于度
2016-04-27 21:43:21
519
原创 13th省赛K
Highway ProjectTime Limit: 2 Seconds Memory Limit: 65536 KBEdward, the emperor of the Marjar Empire, wants to build some bidirectional highways so that he can reach other cities from th
2016-04-27 20:23:50
433
原创 ZOJ 3939 The Lucky Week 2016省赛
The Lucky WeekTime Limit: 2 Seconds Memory Limit: 65536 KBEdward, the headmaster of the Marjar University, is very busy every day and always forgets the date.There was one day Edward
2016-04-24 20:47:59
1367
1
原创 CF 629 A组合 B暴力 Cdp D线段树优化DP
http://codeforces.com/contest/629/problem/AA. Far Relative’s Birthday Caketime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutput
2016-04-21 20:18:19
649
原创 简单的DP
The TriangleTime Limit: 1000MSMemory Limit: 10000KDescription73 88 1 02 7 4 44 5 2 6 5(Figure 1)Figure 1 shows a number triangle. Write a program that
2016-04-19 19:09:46
326
原创 CF 651 E 并查集(矩阵关系不变) 挺好的
E. Table Compressiontime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle Petya is now fond of data compr
2016-04-19 18:19:16
620
原创 CF 638 dfs
http://codeforces.com/contest/638/problem/CC. Road Improvementtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputo
2016-04-17 15:33:46
403
原创 CF652 树状数组,离散化,子区间问题
D. Nested Segmentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given n segments on a line. Ther
2016-04-16 17:22:13
487
原创 NJUST 挺好的bfs题
water3Time Limit: 1000msMemory Limit: 65536KBDescription听说全球气候变暖,冰川融化,海水淹大地。着实好奇要融化多少冰川会淹没我的宿舍,哦不,淹没南京,反正NJUST应该总会是第一批被淹的。现将整个NJUST简化成一个N×M的棋盘。每个小格子代表一个区域,并且拥有一个值表示海拔。一个6×5的棋盘像下面这样:4
2016-04-16 14:37:01
682
原创 POJ 1753 状压(开关问题)
Flip GameTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 38306 Accepted: 16664DescriptionFlip game is played on a rectangular 4x4 field with two-sided
2016-04-16 13:22:40
377
原创 CF 658 D 数学 方程解的个数
D. Bear and Polynomialstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLimak is a little polar bear. He do
2016-04-15 21:29:05
463
原创 CF 568 C 构造
C. Bear and Forgotten Tree 3time limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA tree is a connected undirect
2016-04-15 17:27:51
1015
原创 CF 659 A方向 B排序 C暴力 D方向 E并查集/无向环的dfs/无向环的染色bfs F并查集+dfs/bfs G:递推
http://codeforces.com/contest/659A. Round Housetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasy
2016-04-13 16:08:32
3712
原创 HDU 1272 并查集
小希的迷宫Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 40333 Accepted Submission(s): 12382Problem Description上次Gardon的迷宫城堡小希玩了很
2016-04-12 19:26:14
314
原创 CF 预处理
K. Profacttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice is bored out of her mind by her math classes. She craves for some
2016-04-11 22:05:30
681
原创 CF 二分
http://codeforces.com/gym/100796/problem/I二分 I. Shell Gametime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputBob has discovere
2016-04-11 22:03:32
480
原创 CF 广搜(基础)
http://codeforces.com/gym/100796/problem/DD. Journeytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard out
2016-04-09 17:02:40
578
原创 HDU1698 区间的修改(基础)
Just a HookTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 25630 Accepted Submission(s): 12798Problem DescriptionIn the game
2016-04-08 22:00:31
777
原创 POJ 2528 线段树的离散化 和坐标位置的判定
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 55154 Accepted: 15999DescriptionThe citizens of Bytetown, AB, could not stand that the
2016-04-07 22:12:34
577
原创 POJ 3468 线段树 区间修改 基础题
A Simple Problem with IntegersTime Limit: 5000MS Memory Limit: 131072KTotal Submissions: 87262 Accepted: 27084Case Time Limit: 2000MSDescriptionYou have N
2016-04-06 22:34:05
291
原创 HDU1754 线段树 单点修改 最大值(基础题)
I Hate ItTime Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 58708 Accepted Submission(s): 22869Problem Description很多学校流行一种比较的习惯。
2016-04-06 15:12:45
369
原创 HDU1166 敌兵布阵 线段树 点修改 求和
敌兵布阵Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 68905 Accepted Submission(s): 28982Problem DescriptionC国的死对头A国这段时间正在进行军事演
2016-04-06 14:40:35
326
原创 ZOJ 3870 2015省赛的B 技巧题
B - Team FormationTime Limit:3000MS Memory Limit:131072KB 64bit IO Format:%lld & %lluSubmit Status Practice ZOJ 3870DescriptionFor an upcoming programming contest, Edward
2016-04-04 14:09:05
348
原创 ZOJ 3872 2015省赛D 技巧题
D - Beauty of ArrayTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%lld & %lluSubmit Status Practice ZOJ 3872DescriptionEdward has an array A with N integers. He def
2016-04-04 13:59:04
325
原创 CF 658 set集合的自动从大到小排序
http://codeforces.com/contest/658/problem/BB. Bear and Displayed Friendstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputo
2016-03-31 20:40:56
1754
原创 UVALIVE 4329(树状数组)
https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2330N (3 ≤ N ≤ 20000) ping pong players live along a west-east street(consider the street
2016-03-30 20:48:38
653
浙江理工大学C++课程设计原码
2018-07-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人