Select Of Chocolate Poles 题意:有一个竖直放置的高度为l cm的盒子,现在有三种方块分别为1cm的白块,1cm的黑块,k cm的黑块,要求第一块放进去的必须是黑色的,盒子最上边的必须也是黑色的,盒子不必放满,问一共有多少种放法. 思路:知道要用DP确实死活推不出状态转移公式来,这就很窒息了.到网上搜了一下题解,,,,,,还是自己太low了. 二维DP,第一维表示盒子的高度,第二维表示当前是放白块还是黑块.0表示白块,1表示黑块即:(白块是不会影响放的种类的数目的) 当高…
你有三种盘子,黑薄,白薄,黑厚. 薄的盘子占1,厚的盘子占k. 有一个高度为L的桶,盘子总高度不能超出桶的总高度(可以小于等于).相同颜色的盘子不能挨着放. 问桶内装盘子的方案数. 如 L = 5,k = 3时的方案数为6(下图) Sample Input1 5 3 Sample Output 1 6 Sample Input 2 9 10 Sample Output 2 5 Sample Input 3 10 10 Sample Output 3 6 Sample Input 4 20 5 S…
Secret of Chocolate Poles Time Limit : 1 sec, Memory Limit : 262144 KB Problem A Secret of Chocolate Poles Wendy, the master of a chocolate shop, is thinking of displaying poles of chocolate disks in the showcase. She can use three kinds of chocolate…
transaction transaction transaction Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 132768/132768 K (Java/Others)Total Submission(s): 1496    Accepted Submission(s): 723 Problem Description Kelukin is a businessman. Every day, he travels arou…
2017 ACM ICPC Asia Regional - Daejeon Problem A Broadcast Stations 题目描述:给出一棵树,每一个点有一个辐射距离\(p_i\)(待确定),但\(p_i==0\)的点不能辐射自己,只能由别的点辐射覆盖.求\(p_i\)的和的最小值. Problem B Connect3 题目描述:有一个\(4 \times 4\)的网格,两个人玩游戏,第一个人用黑棋,第二人用白棋.每次选择一列,将棋子扔下去,直到最下一个空的格子.现在给出第一个人下…
2017 ACM - ICPC Asia Ho Chi Minh City Regional Contest A - Arranging Wine 题目描述:有\(R\)个红箱和\(W\)个白箱,将这些箱子分成若干堆,使得每一堆只有一种颜色,然后将这些堆排成一排,使得相邻的堆的颜色不一样,并且每堆红箱的个数不能超过\(d\),问有多少种方案. solution 不会. B - Barcode 题目描述:有一排\(n\)个球,现在要给这\(n\)个球涂成红色或蓝色,使得红色球的个数等于蓝色球的个数…
Apple Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 982    Accepted Submission(s): 323 Problem Description Apple is Taotao's favourite fruit. In his backyard, there are three apple trees with…
题目链接:Rake It In 比赛链接:ICPC Asia Nanning 2017 Description The designers have come up with a new simple game called "Rake It In". Two players, Alice and Bob, initially select an integer k and initialize a score indicator. An \(4 \times 4\) board is…
题目链接:Twice Equation 比赛链接:ICPC Asia Nanning 2017 Description For given \(L\), find the smallest \(n\) no smaller than \(L\) for which there exists an positive integer \(m\) for which \(2m(m + 1) = n(n + 1)\). Input This problem contains multiple test…
题目链接:The Chosen One 比赛链接:ICPC Asia Nanning 2017 题意 \(t\) 组样例,每组给出一个整数 \(n(2\le n\le 10^{50})\),求不大于 \(n\) 的最大的 \(2\) 的整数次幂. 题解 高精度运算 Java BigInteger 中的 bitLength() 方法可以直接计算某个大数二进制表示下的位数. 更多关于 Java BigInteger 的操作参见我的另一篇文章 大数运算之 Java BigInteger 的基本用法 i…