Pick apples Time Limit: 1000MS Memory limit: 165536K 题目描述 Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a big bag comes into the yard. She is so surprised because she…
Pick apples Time Limit: 1000MS Memory limit: 165536K 题目描写叙述 Once ago, there is a mystery yard which only produces three kinds of apples. The number of each kind is infinite. A girl carrying a big bag comes into the yard. She is so surprised because s…
题意:给你n个数,在里面取4个数,可以重复取数,使和不超过M,求能得到的最大的数是多少: 思路:比赛时,和之前的一个题目很像,一直以为是体积为4(最多选择四次)的完全背包,结果并不是,两两求和,然后二分枚举; 完全背包是固定的体积,然后尽量使得装下的重量最大: 这个题目是固定的体积,但求在不超过该重量的情况下能得到的最大值. 至于为啥不是完全背包到现在还找到一个反例,以后再修改: 不过看到一共选择四次的时候,就应该想到是暴力... 比较相似的一个题目,12年的省赛题目:http://acm.sd…
Greatest Number Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描述 Saya likes math, because she think math can make her cleverer. One day, Kudo invited a very simple game: Given N integers, then the players choose no more than four integers f…
Greatest Number 题目描述Saya likes math, because she think math can make her cleverer.One day, Kudo invited a very simple game:Given N integers, then the players choose no more than four integers from them (can be repeated) and add them together. Finally…
2019浙师大校赛(浙大命题)(upc复现赛)总结 早上九点开始.起得迟了,吃了早饭慌慌张张跑过去,刚到比赛就开始了. 开始分别从前往后和从后往前看题,一开始A题,第一发WA,第二次读题发现漏看了还有空格,再交过.D题去重输出不同数字个数,J题忘了.B题和宝儿说完ta就有了思路,不过一开始看差了范围数组开小了,RE了几发. Ps: B题考虑一下就会发现,题目要求的是找三个数a.b.c,使a+ b- c> 0,即a+ b> c(找三边使之可以构成一个三角形).当a+ b= c时,a,b,c为斐波…
可以发现,答案O(根号)(因为链上答案最大,n/2,n/3...根号种) 每次求答案要二分 优秀的做法是: 对于小于根号n的暴力nlogn找,可能二分到同一个mid,记忆化一下最小的tot值 对于大于根号n的枚举答案(从min(n/sqrt(n),ans[]之前ans最小值),,开始枚举)计算最少需要的tot关键点数量,一个区间答案就确定出来了. 卡卡常可过.…
「状压DP」「暴力搜索」排列 题目描述: 题目描述 给一个数字串 s 和正整数 d, 统计 sss 有多少种不同的排列能被 d 整除(可以有前导 0).例如 123434 有 90 种排列能被 2 整除,其中末位为 2 的有 30 种,末位为 4 的有 60 种. 输入格式 输入第一行是一个整数 TTT,表示测试数据的个数,以下每行一组 s 和 d,中间用空格隔开.s 保证只包含数字 0,1,2,3,4,5,6,7,8,9 输出格式 每个数据仅一行,表示能被 d 整除的排列的个数. 输入输出样例…
问题 C: Repeat Number 时间限制: 1 Sec  内存限制: 128 MB [cid=1073&pid=2&langmask=0">提交][状态][论坛] 题目描写叙述 Definition: a+b = c, if all the digits of c are same ( c is more than ten).then we call a and b are Repeat Number. My question is How many Repeat …
题意:一个长为L的河,中间有n个石子,小青蛙需要跳少于m次过河,判断小青蛙每次跳跃最大距离的最小值 最大值最小,用二分 Sample Input 6 1 2 2 25 3 3 11 2 18 Sample Output 4 11   2015-07-27:备战区域赛专题 #include<cstdio> #include<iostream> #include<algorithm> #include<cstring> #include<cmath>…