摘要: 数位DP 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define LL __int64 7 using namespace std; 8 9 LL dp[30][3];10 LL a[30];11 LL n;12 ... 阅读全文
posted @ 2015-02-06 22:27 chenjunjie1994 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 第一次做数位DP,有点摸不着头脑,嗯,参考了别人的之后隔了大半天自己再写的dp[i][0],表示不存在不吉利数字 dp[i][1],表示不存在不吉利数字,且最高位为2 dp[i][2],表示存在不吉利数字具体能自己理解代码的#include #include #include #include #i... 阅读全文
posted @ 2015-02-06 19:33 chenjunjie1994 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 只能说感觉是三分吧,因为两端值肯定是最大的,而中间肯定存在一点使之最小,呃,,,,猜 的。。。#include #include #include #include #include #define LL __int64using namespace std;const int N=50050;do... 阅读全文
posted @ 2015-02-06 10:53 chenjunjie1994 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 想了很久,发现其实就只需要三分枚举圆上的点,到矩形的最短很容易就可以求到了。开始时考虑要不要根据矩形相对圆的方位来划分枚举区间,后来发现一定不能这样做的。注意题目给的是矩形的对角形,但没说哪一条对角线哦,所以,注意。。。被这坑了好久。。#include #include #include #incl... 阅读全文
posted @ 2015-02-06 10:02 chenjunjie1994 阅读(212) 评论(0) 推荐(0) 编辑