All submissions for this problem are available. Chef likes numbers and number theory, we all know that. There are N digit strings that he particularly likes. He likes them so much that he defines some numbers to be beautiful numbers based on these di…
SNIBB Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1485 Accepted Submission(s): 435 Problem Description As we know, some numbers have interesting property. For example, any even number h…
K-th Nya Number Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 125536/65536 K (Java/Others)Total Submission(s): 3155 Accepted Submission(s): 1021 Problem Description Arcueid likes nya number very much.A nya number is the number which has…
数位DP加二分 //数位dp,dfs记忆化搜索 #include<iostream> #include<cstdio> #include<cstring> using namespace std; typedef long long LL; #define N 20 LL dp[N][3];//dp[i][j]表示长度为i,前面有j个6时不含666的数的个数 int num[N]; //c6表示前面6的个数 LL dfs(int len, int c6, bool is…