CF 214B Hometask(想法题)】的更多相关文章

题目链接: 传送门 Hometask Time Limit: 2 seconds     Memory Limit: 256 megabytes Description Furik loves math lessons very much, so he doesn't attend them, unlike Rubik. But now Furik wants to get a good mark for math. For that Ms. Ivanova, his math teacher,…
Bisharp and Charizard Time Limit: 1 Sec  Memory Limit: 256 MB Description Dragon is watching NBA. He loves James and Miami Heat. Here's an introduction of basketball game:http://en.wikipedia.org/wiki/Basketball. However the game in Dragon's version i…
找每个数的约数(暴力就够了...1~x^0.5)....看这约数的倍数最后是哪个数...若距离大于了y..统计++...然后将这个约数的最后倍数赋值为当前位置...好叼的想法题.... Program: #include<iostream> #include<stack> #include<queue> #include<stdio.h> #include<algorithm> #include<string.h> #include&…
http://acm.hdu.edu.cn/showproblem.php?pid=5806 题意:给你一个n元素序列,求第k大的数大于等于m的子序列的个数. 题解:题目要求很奇怪,很多头绪但写不出,选择跳过的题,简称想法题. 首先考虑区间的更新方法:区间左端l不动,右端r滑动, 滑到有k个数>=m时,此区间符合条件,并且发现右端点再往右滑到底,此条件一直符合(因为若加入的数小于“第K大的数”,则毫无影响.若不然,加入该数会产生一个新的第k大数,保证>=“第K大的数”>=m) 所以一找…
题目链接: 传送门 Cells Not Under Attack time limit per test:2 second     memory limit per test:256 megabytes Description Vasya has the square chessboard of size n × n and m rooks. Initially the chessboard is empty. Vasya will consequently put the rooks on t…
题目链接: 传送门 Domino Effect time limit per test:1 second     memory limit per test:256 megabytes Description Little Chris is a huge fan of linear algebra. This time he has been given a homework about the unusual square of a square matrix. The dot product…
题目链接: 传送门 Domino Effect time limit per test:1 second     memory limit per test:256 megabytes Description Little Chris knows there's no fun in playing dominoes, he thinks it's too random and doesn't require skill. Instead, he decided to play with the…
http://acm.hdu.edu.cn/showproblem.php?pid=5969 (合肥)区域赛签到题...orz 题意:给你l,r,求x|y的max,x,y满足l<=x<=y<=r. 题解:初始想法是找到形如(111,1000).(11111,100000)····这样的进位点,一旦区间里有这种相邻两位进位的或一下就可以得到1111····,必然最大.(后面的是瞎搞)如果区间里没有,说明l,r二进制长度一样,于是从最高位往下找,一直找到不一样的一位,变成了前一种有进位的…
C. Vasya and String time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output ->  Link  <- 题目就不贴出来了,链接在上面: 题意:给定n,k,然后是一个长度为n的只含字母a.b的字符串,问至多改变k次使得一个子串字母都相同且长度最大,如所给样例: input 10 1 bbabbabbba output…
A. Jumping Ball time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output In a new version of the famous Pinball game, one of the most important parts of the game field is a sequence of n bumpers. T…