摘要:
Description Given a n × n matrix A and a positive integer k, find the sum S = A + A2 + A3 + … + Ak. <! more Analysis 一道矩阵背景下的简单sumdiv,同样是两种算法。 等比数列 an 阅读全文
摘要:
Description Facer's pet cat just gave birth to a brood of little cats. Having considered the health of those lovely cats, Facer decides to make the ca 阅读全文
摘要:
Description 一天,神犇和 LCR 在玩扑克牌。他们玩的是一种叫做“接竹竿”的游戏。 游戏规则是:一共有 n 张牌,每张牌上有一个花色 c 和一个点数 v,花色不超过 k 种。将这些牌依次放入一列牌的末端。若放入之前这列牌中已有与这张牌花色相同的牌,你可以选择将这张牌和任意一张花色相同的牌 阅读全文
摘要:
Description 平面上有n条直线,且无三线共点,问这些直线能有多少种不同的交点数。 <! more Analysis 判断各个交点数的存在性,需要采用存在性动规的状态转移。 i条直线的交点数要由j条直线转移(j int n,exist[21][401]; int main(){ freope 阅读全文