
其他OJ
文章平均质量分 65
BRCOCOLI
初学者 记录成长 Fighting
展开
-
HYSBZ 1799 self 同类分布 数位DP -
题目地址:http://vjudge.net/problem/19309 很明显是数位DP的题目,因为时间很大,所以可以暴力 但是怎么判断能否被整除,这比较麻烦,因为枚举的时候,总数字num在变,每个数和mod也在变 但是由于时间宽裕,而且就一组数据,那么直接枚举mod就好了,mod 1~9+9+9+9+9+9+9... #include #include #include #inc原创 2016-10-09 20:05:49 · 341 阅读 · 0 评论 -
蓝桥杯/NYOJ 990 蚂蚁感冒 .
题目地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=990 以前写蓝桥杯的时候不会写,看了刘汝佳的UVA 10881后发现好简单 就是把蚂蚁当作不会回头,只是直接穿过 那么两个蚂蚁穿过后就会让另外一只也感冒 所以只需要判断一下能穿过的蚂蚁的数量 对于一开始感冒蚂蚁的位置p,假设p>0 p会碰到右边所有向左走的蚂蚁, 那些原创 2016-10-10 13:39:49 · 757 阅读 · 0 评论 -
NYOJ 12 喷水装置(二).
题目地址:http://acm.nyist.net/JudgeOnline/problem.php?pid=12 第二次写 #include using namespace std; #define REP(i,a,b) for(int i=a;i<=(b);++i) #define REPD(i,a,b) for(int i=a;i>=(b);--i) #define max(a,b) (原创 2016-10-21 19:26:01 · 317 阅读 · 0 评论 -
URAL 1057 Amount of Degrees 数位DP *
题目地址:http://acm.timus.ru/problem.aspx?space=1&num=1057 思路来源:浅谈数位类统计问题 现在才发现数位问题可以转化为一棵二叉搜索树的问题去理解 #include #include #include #include using namespace std; typedef long long LL; LL d[32][32]; LL原创 2016-10-06 21:05:51 · 305 阅读 · 0 评论 -
HRBUST 1600 线性代数中的矩阵问题 区间DP .
题目地址:http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1600 区间DP入门题 #include using namespace std; #define REP(i,a,b) for(int i=a;i<=(int)(b);++i) #define REPD(i,a,b) for(int原创 2016-11-20 11:35:08 · 322 阅读 · 0 评论