上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 36 下一页
摘要: 1201 整数划分 基准时间限制:1 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注 将N分为若干个不同整数的和,有多少种不同的划分方式,例如:n = 6,{6} {1,5} {2,4} {1,2,3},共4种。由于数据较大,输出Mod 10^9 + 7的结果即可。 I 阅读全文
posted @ 2018-08-30 13:59 Draymonder 阅读(233) 评论(0) 推荐(0)
摘要: 1020 逆序排列 基准时间限制:2 秒 空间限制:131072 KB 分值: 80 难度:5级算法题 收藏 关注 在一个排列中,如果一对数的前后位置与大小顺序相反,即前面的数大于后面的数,那么它们就称为一个逆序。一个排列中逆序的总数就称为这个排列的逆序数。 如2 4 3 1中,2 1,4 3,4 阅读全文
posted @ 2018-08-29 19:14 Draymonder 阅读(297) 评论(0) 推荐(0)
摘要: #1636 : Pangu and Stones 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 In Chinese mythology, Pangu is the first living being and the creator of the sky and th 阅读全文
posted @ 2018-08-29 15:03 Draymonder 阅读(784) 评论(0) 推荐(1)
摘要: 1202 子序列个数 题目来源: 福州大学 OJ 基准时间限制:1 秒 空间限制:131072 KB 分值: 40 难度:4级算法题 收藏 关注 子序列的定义:对于一个序列a=a[1],a[2],......a[n]。则非空序列a'=a[p1],a[p2]......a[pm]为a的一个子序列,其中 阅读全文
posted @ 2018-08-27 17:19 Draymonder 阅读(258) 评论(0) 推荐(0)
摘要: 51nod 1134 最长递增子序列 #include<iostream> #include<cstdio> #include<cstring> #include<algorithm> #define rep(i,l,r) for (int i=l; i<=r; i++) typedef long 阅读全文
posted @ 2018-08-27 14:38 Draymonder 阅读(177) 评论(0) 推荐(0)
摘要: 1021 石子归并 基准时间限制:1 秒 空间限制:131072 KB 分值: 20 难度:3级算法题 收藏 取消关注 N堆石子摆成一条线。现要将石子有次序地合并成一堆。规定每次只能选相邻的2堆石子合并成新的一堆,并将新的一堆石子数记为该次合并的代价。计算将N堆石子合并成一堆的最小代价。 例如: 1 阅读全文
posted @ 2018-08-27 11:11 Draymonder 阅读(210) 评论(0) 推荐(0)
摘要: Neko's loop Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 356 Accepted Submission(s): 56 Proble 阅读全文
posted @ 2018-08-26 13:07 Draymonder 阅读(751) 评论(0) 推荐(1)
摘要: 题目链接: https://www.cnblogs.com/Draymonder/p/9536681.html 同上一篇文章,只是 需要记录最大值的开始和结束的位置 #include <iostream> #include <string.h> #include <cmath> using name 阅读全文
posted @ 2018-08-26 12:57 Draymonder 阅读(193) 评论(0) 推荐(0)
摘要: 题目链接: http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1050 这个呢,这个题之前 求一遍最大值 然后求一遍最小值 最后结果 res = max( MAX, SUM - MIN ); 但是 这种题如果 要求 变成 最长 阅读全文
posted @ 2018-08-26 11:28 Draymonder 阅读(311) 评论(0) 推荐(0)
摘要: Taotao Picks Apples Time Limit: 2000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 2506 Accepted Submission(s) 阅读全文
posted @ 2018-08-25 22:01 Draymonder 阅读(286) 评论(0) 推荐(1)
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 36 下一页