题目传送门Little Sub and Mr.Potato's Math Problem Time Limit: 2 Seconds      Memory Limit: 65536 KB Little Sub loves math very much. He enjoys counting numbers. One day, Mr.Potato gives him an interesting math problem. Please help Little Sub solve this pr…
题目链接:https://www.luogu.org/problemnew/show/P2022 题目大意:中文题目 具体思路: 第一步:我们可以先计算出当前的数前面按照字典序的话,前面有多少数(包括自己). (具体计算过程,456.首先是三位数的数在456前面的个数,就是(100->456),然后再就是两位数(10-45),然后再就是一位数1-4,严格遵守字典序). 第二步:如果说当前的数前面的数的个数大于m的话,这个时候肯定是不符合情况的,如果说刚好凑起来的话,这个时候输出k就可以了. 第三…
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5864 思路 : 判断小于它的合法的,再看大于它的合法的,特判10000.10.1000.... 这种情况 . #include<bits/stdc++.h> using namespace std; #define ll long long ll t,n,k,m,po[222]; ll getmin(ll x) { ll ret=0,data[55],id=0; po…
题意:有一个递推式f(x) 当 x < 10    f(x) = x.当 x >= 10  f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + -- + a9 * f(x-10) 同时ai(0<=i<=9) 不是 0 就是 1: 现在给你 ai 的数字,以及k和mod,请你算出 f(x)%mod 的结果是多少 思路:线性递推关系是组合计数中常用的一种递推关系,如果直接利用递推式,需要很长的时间才能计算得出,时间无法承受,但是现在我们已知…
A Simple Math Problem Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2441    Accepted Submission(s): 1415 Problem Description Lele now is thinking about a simple function f(x). If x < 10 f(x) =…
A Simple Math Problem Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4331    Accepted Submission(s): 2603 Problem Description Lele now is thinking about a simple function f(x).If x < 10 f(x) =…
Jam's math problem Problem Description Jam has a math problem. He just learned factorization.He is trying to factorize ax^2+bx+c into the form of pqx^2+(qk+mp)x+km=(px+k)(qx+m).He could only solve the problem in which p,q,m,k are positive numbers.Ple…
Bob and math problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 401    Accepted Submission(s): 149 Problem Description Recently, Bob has been thinking about a math problem.There are N Digit…
A Simple Math Problem Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2791    Accepted Submission(s): 1659 Problem Description Lele now is thinking about a simple function f(x). If x < 10 f(x) =…
Problem Description Jam has a math problem. He just learned factorization. He is trying to factorize ax^2+bx+cax​2​​+bx+c into the form of pqx^2+(qk+mp)x+km=(px+k)(qx+m)pqx​2​​+(qk+mp)x+km=(px+k)(qx+m). He could only solve the problem in which p,q,m,…