
数位统计DP
文章平均质量分 94
nike0good
这个作者很懒,什么都没留下…
展开
-
Meta Hacker Cup 2024 Round 2 题解
Cottontail Climb (Part 1)暴力枚举Cottontail Climb (Part 2)暴力枚举Problem B: Four in a Burrow记忆化搜索Problem C: Bunny Hopscotch统计todo原创 2024-10-22 08:57:19 · 1137 阅读 · 0 评论 -
BZOJ 3209(花神的数论题-数位统计+1,被数据范围坑了)
3209: 花神的数论题Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 33 Solved: 18[Submit][Status][Discuss]Description背景众所周知,花神多年来凭借无边的神力狂虐各大 OJ、OI、CF、TC …… 当然也包括 CH 啦。描述话说花神这天又来讲课了。课后照例有超级难原创 2013-05-27 15:11:37 · 1794 阅读 · 0 评论 -
Ural 1057(Amount of Degrees-数位统计入门)
1057. Amount of DegreesTime limit: 1.0 secondMemory limit: 64 MBCreate a code to determine the amount of integers, lying in the set [X;Y] and being a sum of exactlyK different integer de原创 2013-05-27 12:52:52 · 1529 阅读 · 0 评论 -
BZOJ 1026([SCOI2009]windy数-数位DPlevel up)
1026: [SCOI2009]windy数Time Limit: 1 Sec Memory Limit: 162 MBSubmit: 1280 Solved: 558[Submit][Status][Discuss]Descriptionwindy定义了一种windy数。 不含前导零且相邻两个数字之差至少为2的正整数被称为windy数。 windy想知道,在A和B之间原创 2013-06-02 16:45:42 · 1450 阅读 · 0 评论 -
SPOJ IGAME(Interesting Game-博弈+数位dp)
IGAME - Interesting Game no tags Alice and Bob play an interesting game and the game is played on a number.So a player, on his chance, can choose any non zero digit of the number and decrease the di原创 2017-02-01 11:15:59 · 341 阅读 · 0 评论 -
2017 计蒜之道 复赛 题解
A. 阿里云秘钥池反演+数位dp#include<cstdio>#include<cstring>#include<cstdlib>#include<algorithm>#include<functional>#include<iostream>#include<cmath>#include<cctype>#include<ctime>#include<iomanip> #inc原创 2017-06-12 09:32:37 · 604 阅读 · 0 评论 -
HDU 6156(Palindrome Function-数位dp)
令fi,j=(i在j进制下回文)?j:1f_{i,j}=(i在j进制下回文)?j:1 求∑Ri=L∑rj=lf(i,j)\sum_{i=L}^{R}\sum_{j=l}^{r}f(i,j) 1<=L,R<=1e18,2<=j<=361<=L,R<=1e18,2<=j<=36 数位dp, 由于j进制的长度为l的回文串长度能直接算出来(j−1)j⌊l+12⌋(j-1)j^{\lfloor \f原创 2017-08-22 17:10:16 · 293 阅读 · 0 评论 -
CCPC-Wannafly Winter Camp Day2 (Div1, onsite)(Power of Function-数位)
f(n,k)=k进制下n的数位和+位数-2分别考虑几种情况并check#include<bits/stdc++.h> using namespace std;#define For(i,n) for(int i=1;i<=n;i++)#define Fork(i,k,n) for(int i=k;i<=n;i++)#define ForkD(i,k,n) fo...原创 2019-01-25 17:21:13 · 384 阅读 · 0 评论 -
CCPC-Wannafly Winter Camp Day7
A.迷宫有一个 nnn 个点 n−1n-1n−1 条边的无向连通图迷宫,其中有些点上面有人.现在所有人的目标都是逃离这个迷宫,而迷宫的出口是 1 号点,每一时刻,会依次发生以下的事情:1.在点 x 上的人选择一个点 f(x)f(x)f(x) 作为目标,要求 f(x)f(x)f(x) 必须是 xxx,或者与 xxx 有边相连的点,且对于 x≠yx\neq yx̸=y,有 f(x)≠f(y)f...原创 2019-01-27 13:24:29 · 699 阅读 · 1 评论