Codeforces
蒟蒻的ACMer
2014界大学新生
展开
-
CodeForces 55D Beautiful numbers 数位dp 离散化
A - Beautiful numbersTime Limit:4000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 55DAppoint description: System Crawler (2016-05-08)原创 2016-05-11 23:22:39 · 466 阅读 · 0 评论 -
Codeforces Round #157 (Div. 1) B. Little Elephant and Elections 数位dp
题意: 规定一个数的幸运度为这位数含有多少4和7现在在值为1~m的m个数中任意选7个问第7个数的幸运度比前6个数幸运度总和还要多的情况有多少种m分析:因为幸运度最大为9所以可以先跑一发数位dp预处理出1~m中不同幸运度的个数然后再跑一发dfs枚举第七位的幸运度求符合条件的个数ACcode:#include #include #include #define原创 2016-05-14 10:42:01 · 443 阅读 · 0 评论 -
CodeForces 450B Jzzhu and Sequences 矩阵快速幂
注意取mod的细节ACcode:#include #define mod 1000000007#define ll long longusing namespace std;struct Matrix{ ll mat[2][2];};Matrix mul(Matrix a,Matrix b){ Matrix ret; for(int i=0;i<2;++原创 2016-09-22 21:47:26 · 725 阅读 · 0 评论