- 博客(20)
- 资源 (6)
- 收藏
- 关注
原创 问题 A: 组合数
唯一分解定理在此问题 A: 组合数时间限制: 1 Sec内存限制: 128 MB提交: 1938解决: 147[提交] [状态] [命题人:jsu_admin]题目描述求组合数C(N,M),以及C(N,M)因子个数。输入N和M,其中0<=M<=N<=50,以EOF结束。输出该组合数结果样例输入 Copy3 24 2...
2018-12-27 21:30:17 392
原创 map用法(常用)
三、map的基本操作函数: begin() 返回指向map头部的迭代器 clear() 删除所有元素 count() 返回指定元素出现的次数 empty() 如果map为空则返回true end() 返回指向map末尾的迭代器 equal_range...
2018-12-27 21:17:47 269
原创 C. Prefixes and Suffixes
C. Prefixes and Suffixestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIvan wants to play a game with you. He picked some string...
2018-12-27 20:59:14 636 1
原创 小乐乐下象棋(记忆化搜索)
链接:https://ac.nowcoder.com/acm/contest/301/F来源:牛客网 小乐乐一天天就知道玩,这一天又想玩象棋。我们都知道马走日。现在给定一个棋盘,大小是n*m,把棋盘放在第一象限,棋盘的左下角是(0,0),右上角是(n - 1, m - 1);小乐乐想知道,一个马从左下角(0, 0)开始,走了k步之后,刚好走到右上角(n - 1, m - 1)的方案数...
2018-12-27 19:48:49 356 2
原创 dp求最长上升子序列
二分法:#include<cstdio>#include<algorithm>using namespace std;const int maxn=2e5+10;int a[maxn];int dp[maxn]; int main(){ int n; while(~scanf("%d",&n)) { for(i...
2018-12-26 19:26:39 358
原创 16-矩形嵌套(有向无环图上的DP)(建图做法和直接DP做法)
16-矩形嵌套 内存限制:64MB 时间限制:3000ms 特判: No 通过数:53 提交数:136 难度:4 题目描述:有n个矩形,每个矩形可以用a,b来描述,表示长和宽。矩形X(a,b)可以嵌套在矩形Y(c,d)中当且仅当a<c,b<d或者b<c,a<d(相当于旋转X90度)。例如(1,5)可以嵌套在(6,2)内,但不能嵌套在(3,4)中。你...
2018-12-17 08:48:13 411
原创 1091-还是01背包(较为复杂的01背包变形)
1091-还是01背包 内存限制:223MB 时间限制:10000ms 特判: No 通过数:1 提交数:1 难度:5 题目描述:有n个重量和价值分别为 wi 和 vi 的物品,从这些物品中挑选总重量不超过W的物品,求所有挑选方案中价值总和的最大值。输入描述:多组测试数据。每组测试数据第一行输入n 和 W ,接下来有n行,每行输入两个数,代表第i个物品的wi ...
2018-12-16 19:56:34 337
原创 J - Count the string
It is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write down all the non-empty prefixes of this string. For example: s: "abab...
2018-12-16 11:35:54 418
原创 I - Simpsons’ Hidden Talents
Homer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had. Marge: Yeah, what is it? Homer: Take me for example. I want to find out if I have a talent in politics...
2018-12-16 11:32:52 353
原创 G - Seek the Name, Seek the Fame
The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the same time seek th...
2018-12-16 11:27:47 364
原创 F - Power Strings
Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponentiation by a non-...
2018-12-16 11:16:34 351
原创 E - Period (找循环串以及输出循环串个数)
For each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for each i (2 ...
2018-12-16 11:13:21 331
原创 D - Cyclic Nacklace
CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thinking about how to...
2018-12-16 11:05:16 717
原创 C - 剪花布条
一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 Output...
2018-12-16 10:53:02 524
原创 B - Oulipo(kmp入门,找连续子串数量)
The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’...
2018-12-16 10:49:55 381
原创 A - Number Sequence (kmp)
A - Number Sequence Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K whic...
2018-12-16 10:47:55 418
原创 小乐乐匹配字符串(最长公共子序列)
链接:https://ac.nowcoder.com/acm/contest/301/E来源:牛客网小乐乐匹配字符串时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 32768K,其他语言65536K64bit IO Format: %lld题目描述小乐乐有字符串str1,str2。小乐乐想要给他们找朋友。小乐乐想知道在这两个字符串中最多能匹配出多长的...
2018-12-03 17:31:22 474
原创 背包问题1--简单01背包
#1038 : 01背包时间限制:20000ms单点时限:1000ms内存限制:256MB描述且说上一周的故事里,小Hi和小Ho费劲心思终于拿到了茫茫多的奖券!而现在,终于到了小Ho领取奖励的时刻了!小Ho现在手上有M张奖券,而奖品区有N件奖品,分别标号为1到N,其中第i件奖品需要need(i)张奖券进行兑换,同时也只能兑换一次,为了使得辛苦得到的奖券不白白浪费,小Ho给每...
2018-12-03 17:21:08 404
原创 最少硬币问题(动态规划递推式)
最少硬币问题时间限制(普通/Java) : 1000 MS/ 3000 MS 运行内存限制 : 65536 KByte总提交 : 247 测试通过 : 73 比赛描述设有n种不同面值的硬币,各硬币的面值存于数组T[1:n]中。现要用这些面值的硬币来找钱。可以使用的各种面值的硬币个数存于数组Coins[1:n]中。对任意钱数0≤m≤20001,设计...
2018-12-03 17:09:38 2192
原创 数字三角形问题(动态规划入门)
最近在刷动态规划类的题,刷紫书的259页题题目来源:http://acm.sdut.edu.cn/onlinejudge2/index.php/Home/Index/problemdetail/pid/1730.html数字三角形问题Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit Statistic DiscussProble...
2018-12-03 16:59:40 441
ChineseFonts.rar
2020-08-23
3d立方体旋转相册 抖音热门
2020-06-15
OpenGL部分开发库gl.h,gluax.h,glu.hglut.h
2019-05-01
大学课程设计基于java的社团管理系统
2019-01-04
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人