logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

[USACO07MAR] Monthly Expense S

Farmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount of money (1 ≤ moneyi ≤ 10,000) that h

#算法#c++
Codeforces 1385D - a-Good String

【代码】Codeforces 1385D - a-Good String。

#es13#java#服务器
codeforces 415B Mashmokh and Tokens

Bimokh is Mashmokh's boss. For the following n days he decided to pay to his workers in a new way. At the beginning of each day he will give each worker a certain amount of tokens. Then at the end of

#算法
Codeforces 2032C. Trinity

你需要把a变成好数组,即任意三个不同下标,对应的元素可以组成一个三角形(两边之和大于第三边)。

#c++#算法
CodeForces - 1107B Digital root

今天在数学课上,佩佳学习了数字根。数字根是一个非负整数的单数字值,通过迭代求和的过程获得,在每次迭代中使用上一次迭代的结果来计算数字和。过程一直持续到得到一个一位数为止。我们用S(x)来表示x的数字根。于是S(5)=5,S(38)=S(3+8=11)=S(1+1=2)=2,S(10)=S(1+0=1)=1。佩佳的家庭作业有n个任务:找到数字根为x的第k个正整数。佩佳已经解决了所有的问题,但他不知道

#算法
CodeForces - 1478B Nezzar and Lucky Number

思路:任何大于10 * d的数通过不断减去d ,都能得到d * 10 + x,是一个幸运数字;如果等于10 * d,那本身就是幸运数字;如果小于10 * d,那么看看这个数字能否表示为d的倍数,或者减去若干个d后是10的倍数。选择1~9作为最喜欢的数d,一个十进制数中若d至少出现了一次,则这个数是幸运数字。给q个整数a1,a2,…,aq,这些整数是否能表示为一个或一个以上的幸运数字之和?

#c++#算法
到底了