随笔分类 - ACM
摘要:刚才学弟问,不好意思说不知道康托逆展开是个什么东西= =。然后硬着头皮百度了一下,找到了思路,顺手就敲了一下,发上来吧:求n个数的第m大的全排列。思路链接:戳这里。。。代码贴出来 :简单的写下注释。。0.0 1 #include 2 using namespace std; 3 const int...
阅读全文
摘要:1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 using namespace std;11 const int MM=100...
阅读全文
摘要:DescriptionDZY loves chessboard, and he enjoys playing with it.He has a chessboard of n rows and m columns. Some cells of the chessboard are bad, othe...
阅读全文
摘要:题目大意:求一串数字中,几个连续数字加起来最大值,并确定起始和最末的位置。思路:这是一题DP题,但是可以用尺取法来做。我一开始不会,也是看了某大神的代码,然后有人告诉我这是尺取法,现在会了。 1 //尺取法 2 3 #include 4 #include 5 int que[100002]; 6...
阅读全文

浙公网安备 33010602011771号