上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页
摘要: 小乐乐吃糖豆​ 小乐乐是一个比较喜欢吃糖豆的小孩子,小乐乐的哥哥大乐乐也同样爱吃糖豆。作为一个小孩子,他们永远觉得谁吃掉了最后一个糖豆,谁吃的糖豆最多。为了公平起见小乐乐与大乐乐商量吃糖豆的规则如下:小乐乐与大乐乐轮流吃糖豆。 小乐乐作为弟弟,小乐乐... 阅读全文
posted @ 2018-12-07 18:00 _年少有为 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 排列组合根本思想还是组合数学的加法原则,将一个状态分成几个不相交的状态,然后用加法原则加起来即可1.球同,盒不同,无空箱如果:n>=m C(n−1,m−1)C(n-1,m-1)C(n−1,m−1)否则 n=0dp[k][0]=0,k>=10,n=0:dp... 阅读全文
posted @ 2018-12-06 11:13 _年少有为 阅读(429) 评论(0) 推荐(0) 编辑
摘要: G - Visible TreesThere are many trees forming a m * n grid, the grid starts from (1,1). Farmer Sherlock is standing at (0,0) poin... 阅读全文
posted @ 2018-12-05 18:49 _年少有为 阅读(188) 评论(0) 推荐(0) 编辑
摘要: F - Co-primeGiven a number N, you are asked to count the number of integers between A and B inclusive which are relatively prime ... 阅读全文
posted @ 2018-12-05 18:12 _年少有为 阅读(267) 评论(0) 推荐(0) 编辑
摘要: C - Glenbow MuseumUVALive - 4123 题意:​ 对于一个边平行于坐标轴的多边形,我们可以用一个由R或者O组成的序列来描述他,从一个顶点开始按照逆时针顺序走,碰到一个90°的内角记作R;碰到一个270°的内角记作O。这样的序列称为角... 阅读全文
posted @ 2018-12-02 14:55 _年少有为 阅读(180) 评论(0) 推荐(0) 编辑
摘要: D - Series-Parallel NetworksUVA - 10253 题意就不描述了输入格式:​ 输入包含多组式布局,每组数据仅包含一个整数,即边数n(1#include#include#include#include#include#includ... 阅读全文
posted @ 2018-12-02 14:22 _年少有为 阅读(325) 评论(0) 推荐(0) 编辑
摘要: B - Investigating Div-Sum PropertyUVA - 11361 题目描述:例题6 数字和与倍数​ 给定正整数a,b,k 你的任务是在所有满足a100的时候只有0符合条件#include#include#include#inclu... 阅读全文
posted @ 2018-11-29 22:08 _年少有为 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 带标号的连通图计数题目描述:带标号的连通图计数。统计有n ( n#include#include#include#include#include#include#include#define mset(a,b) memset(a,b,sizeof(a))... 阅读全文
posted @ 2018-11-28 21:00 _年少有为 阅读(253) 评论(0) 推荐(0) 编辑
摘要: F - Ingenuous CubrencyUVA - 11137 题目描述 :​ 立方数之和。输入正整数n( n=1)多段图:初始状态:dp (0,0)=1状态转移:对于每个dp(i,j) for k=0 to j+k*i*i*i#include#incl... 阅读全文
posted @ 2018-11-28 13:54 _年少有为 阅读(211) 评论(0) 推荐(0) 编辑
摘要: E - MatchesUVA - 11375 题目描述 :​ 火柴,用n (1=6 就加上0这个种类即可当然写状态转移的时候也需要注意几点 :1.初始状态 //dp[0]设为1,代表从0状态由一种方法到达,所以可以由0状态加数字到其他状态。2.状态的... 阅读全文
posted @ 2018-11-27 20:24 _年少有为 阅读(174) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页