You have n gifts and you want to give all of them to children. Of course, you don't want to offend a ...
B. Strange List 题目分析 题意:给你一个长度为n的数组和一个数字x,从第一个元素开始,如果改元素q能被x整除,那么将就在数组后面新增x个 q x ,直到遇到的元素不能被x整除,求最后数组的元素之和 让我们从样例开始入手分析:样例中的第一个情况数组a为 ,x为 ,数组最终变成了 , , , , , , 。我们可以发现其中的 , 的和为 , , , , 的和也为 。 之后再看一下第二个 ...
2021-01-06 08:04 2 354 推荐指数:
You have n gifts and you want to give all of them to children. Of course, you don't want to offend a ...
D. 0-1 MST Ujan has a lot of useless stuff in his drawers, a considerable part of which are his mat ...
Young wilderness explorers set off to their first expedition led by senior explorer Russell. Explore ...
题目连接:https://codeforces.com/contest/1323/problem/B 题意:给一个大小为n的a数组,一个大小为m的b数组,c数组是二维数组c[i][j]=a[i]*b[j],问面积为k的矩形有几个。 题解:先把k的所有因子存入一个数组里,然后遍历因子,表示 ...
B. Lipshitz Sequence Time Limit: 20 Sec Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/601/problem/B Description A function is called ...
B. PIN Codes A PIN code is a string that consists of exactly 4 digits. Examples of possible PIN codes: 7013, 0000 and 0990. Please note that the PIN ...
B. Rebranding The name of one small but proud corporation consists of n lowercase ...
题意: \(f(i)=x\),\(x\)为最小的不能整除\(i\)的数.求\(\sum^{n}_{i=1}f(i)\ mod\ 10^9+7\). 题解:首先,\(1,2,..., ...