There are N different kinds of transport ships on the port. The ith kind of ship can carry the weight of V[i]V[i] and the number of the ith kind of ship is 2c[i]-12^{C[i]} - 12. How many different schemes there are if you want to use these ships to t…
题目链接:https://nanti.jisuanke.com/t/31720 题意:有n种飞船,每种飞船有(1 << c)- 1 艘,容量为 k[i] ,q 次询问,每次询问选若干艘飞船使得容量为 s 的方案数. 题解:预处理出全部情况.dp[ i ][ j ]表示选前 i 个物品凑出容量为 k 的方案数,转移的时候可注意到dp[ i ][ j ] = sigma(dp[i - 1][j - x * v ]),然后减掉不合法的情况(x > ( (1 << c) - 1)…
A prince of the Science Continent was imprisoned in a castle because of his contempt for mathematics when he was young, and was entangled in some mathematical curses. He studied hard until he reached adulthood and decided to use his knowledge to esca…
Mathematical Curse 22.25% 1000ms 65536K A prince of the Science Continent was imprisoned in a castle because of his contempt for mathematics when he was young, and was entangled in some mathematical curses. He studied hard until he reached adulthoo…
题目顺序:A F G H I K L 做题链接 A. Magic Mirror 题意:判断 给出的 字符串 是否等于"jessie",需要判断大小写 题解:1.用stl库 tolower ... 2.用ascii码将大写转换为小写,例如: 'A' + 32 = 'a' *F. Modular Production Line 题解:网络流最长区间K覆盖问题, 洛谷P3358 参考题解 参考代码 G. Give Candies 题意:n个小朋友,n个糖,每个小朋友按顺序拿随机数量个糖,直到…
There are NN different kinds of transport ships on the port. The i^{th}ith kind of ship can carry the weight of V[i]V[i] and the number of the i^{th}ith kind of ship is 2^{C[i]} - 12C[i]−1. How many different schemes there are if you want to use thes…
Transport Ship 25.78% 1000ms 65536K There are NN different kinds of transport ships on the port. The i^{th}ith kind of ship can carry the weight of V[i]V[i] and the number of the i^{th}ith kind of ship is 2^{C[i]} - 12C[i]−1. How many different sch…