当前位置: 首页 > news >正文

nas网站怎么做网站网站建设横幅标语

nas网站怎么做网站,网站建设横幅标语,网页版游戏网站,网站案例 网站建设传送门 文章目录题意#xff1a;思路#xff1a;题意#xff1a; 给你一个nnn#xff0c;问你有多少对0≤a≤b≤n0\le a\le b\le n0≤a≤b≤n满足S(a)S(b)S(a)S(b)S(a)S(b)。其中S(a)S(a)S(a)表示aaa的十进制各位数之和。 思路#xff1a; 显然的数位dpdpd…传送门 文章目录题意思路题意 给你一个nnn问你有多少对0≤a≤b≤n0\le a\le b\le n0≤a≤b≤n满足S(a)S(b)S(a)S(b)S(a)S(b)。其中S(a)S(a)S(a)表示aaa的十进制各位数之和。 思路 显然的数位dpdpdp一般的数位dpdpdp都是维护一个数这个无非就是维护两个数加一维状态就好啦。 定义f[pos][c][flag1][flag2]f[pos][c][flag1][flag2]f[pos][c][flag1][flag2]表示到了第pospospos位aaa与bbb的差值为cccflag1flag1flag1表示bbb是否能取到上界flag2flag2flag2表示aaa是否能取到上界。 让后就是裸的数位dpdpdp辣给差值加一个偏移量就好啦。 // Problem: Harmony Pairs // Contest: NowCoder // URL: https://ac.nowcoder.com/acm/contest/5671/H // Memory Limit: 524288 MB // Time Limit: 2000 ms // // Powered by CP Editor (https://cpeditor.org)//#pragma GCC optimize(Ofast,no-stack-protector,unroll-loops,fast-math) //#pragma GCC target(sse,sse2,sse3,ssse3,sse4.1,sse4.2,avx,avx2,popcnt,tunenative) //#pragma GCC optimize(2) #includecstdio #includeiostream #includestring #includecstring #includemap #includecmath #includecctype #includevector #includeset #includequeue #includealgorithm #includesstream #includectime #includecstdlib #includerandom #includecassert #define X first #define Y second #define L (u1) #define R (u1|1) #define pb push_back #define mk make_pair #define Mid ((tr[u].ltr[u].r)1) #define Len(u) (tr[u].r-tr[u].l1) #define random(a,b) ((a)rand()%((b)-(a)1)) #define db puts(---) using namespace std;//void rd_cre() { freopen(d://dp//data.txt,w,stdout); srand(time(NULL)); } //void rd_ac() { freopen(d://dp//data.txt,r,stdin); freopen(d://dp//AC.txt,w,stdout); } //void rd_wa() { freopen(d://dp//data.txt,r,stdin); freopen(d://dp//WA.txt,w,stdout); }typedef long long LL; typedef unsigned long long ULL; typedef pairint,int PII;const int N210,mod1e97,INF0x3f3f3f3f; const double eps1e-6;string s; int a[N],tot; LL f[210][2010][2][2];LL dp(int pos,int c,int flag1,int flag2) {if(pos0) return c1000;if(f[pos][c][flag1][flag2]!-1) return f[pos][c][flag1][flag2];LL ans0;int xflag1? 9:a[pos];for(int i0;ix;i) {int yflag2? 9:i;for(int j0;jy;j) {ansdp(pos-1,cj-i,flag1||ix,flag2||jy);ans%mod;}}return f[pos][c][flag1][flag2]ans; }LL solve() {tot0;for(int is.length()-1;i0;i--) a[tot]s[i]-0;return dp(tot,1000,0,0); }int main() { // ios::sync_with_stdio(false); // cin.tie(0);memset(f,-1,sizeof(f));cins;printf(%lld\n,solve());return 0; } /**/
http://wiki.neutronadmin.com/news/303994/

相关文章:

  • 做的比较好的冷柜网站有哪些专业建站报价
  • 有哪些做农产品的网站想找人做网站 要怎么选择
  • 做外贸如何访问国外网站无锡网站建设设计公司
  • 昆山市建设监察大队网站wordpress4.7.4主题
  • 海淀做企业网站的公司wordpress知言破解
  • 网站二次开发教程网站建设的费用预算
  • 博白建设局网站重庆市网上房地产官网
  • 网站 制作 报价永久免费仓库出入库管理软件
  • 旅游业网站建设网站架设的结构
  • wordpress手写字体百度seo怎么样优化
  • 网站顶端大图怎么做贸易公司logo图片
  • 发布自己的做家教的网站网站排名易下拉效率
  • 网站中的ppt链接怎么做网络公司简介模板
  • 安卓游戏模板下载网站万站网
  • 网站用户体验准则网站管理系统模板
  • wordpress全站cdn sslwordpress 后门检测
  • 网站搜索引擎优化方案论文网站项目报价单模板免费下载
  • 怎样做网站收录做百度网站每年的费用多少钱
  • python网页制作项目seo招聘信息
  • 学网站开发有前途吗高端建筑
  • 湖州做网站推广的公司wordpress easydigital
  • 重庆网站建站建设免费网页作业设计报告
  • 温州市营销网站建设网络营销中网站的目的是
  • 湖南建设网站获客系统衡水网站建设培训学校
  • 中国山东网站建设中国企业商铺网
  • 太原网站优化哪家专业百度上首页
  • 做木工的网站自助建站系统怎么用
  • 哪些作弊网站泰安电脑网站建设电话
  • 网站开发的思维导图工商年报网上怎么申报
  • 专门做产品定制的网站根据网站做app