摘要:
线性,计数,计算前后缀优化 阅读全文
摘要:
【动态规划专练-区间DP】CF149D(1900) 题目大意: 给出能够配对的括号序列,按以下要求给括号上色: 一对括号必有一个染色,一个无色 相邻的有色括号不能是相同的颜色 求上色方案数目,对1e9+7取模 思路: 由这一句 “ it is possible to obtain a correct 阅读全文
摘要:
ZumaB. Zuma time limit per test2 seconds memory limit per test512 megabytes inputstandard input outputstandard output Genos recently installed the gam 阅读全文
摘要:
位运算+组合数+快速幂+逆元+奇偶讨论 阅读全文
摘要:
特殊情况下的状压dp 阅读全文
摘要:
#Marvolo Gaunt's Ring Professor Dumbledore is helping Harry destroy the Horcruxes. He went to Gaunt Shack as he suspected a Horcrux to be present ther 阅读全文
摘要:
#Cut Ribbon time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Polycarpus has a ribbon, its leng 阅读全文
摘要:
#Multiplicity You are given an integer array a1,a2,…,an. The array b is called to be a subsequence of a if it is possible to remove some elements from 阅读全文
摘要:
题干: You are given an integer nn. In 11 move, you can do one of the following actions: erase any digit of the number (it's acceptable that the number b 阅读全文
摘要:
原题链接: Carrying Conundrum 思维写法 思路:因为题目定义的进位是往前两位进位,也就是奇数位进奇数位,偶数位进偶数位, 进而可以发现奇数位和偶数位互不影响。我们把目标数n的奇偶位分开组成新的数:比如 n=abcd ,n1=ac ,n2=bd。正常运算下凑一个数x的方式数是x+1, 阅读全文