Great Graphs 题意 给你一个数组\(d\),\(d[i]\)表示从节点\(1\)到其他各个节点的最短路的长度,然后你可以对这个图进行加边(可以是负边),但不允许存在一个权值和为负数的回 ...
题意: f i x , x 为最小的不能整除 i 的数.求 sum n i f i mod . 题解:首先, , ,...,x i ,即 i 一定是 lcm , ,...,x 的倍数,我们现在来看 f i 的值,当 f i 时, i 的最小值是 , f i 时, i 的最小值是 , f i 时, i 的最小值是 ,因为 lcm , , .以此类推,最后发现 f i 时, i ge .因为 f i ...
2021-07-04 19:28 0 163 推荐指数:
Great Graphs 题意 给你一个数组\(d\),\(d[i]\)表示从节点\(1\)到其他各个节点的最短路的长度,然后你可以对这个图进行加边(可以是负边),但不允许存在一个权值和为负数的回 ...
There is a river of width n">nn. The left bank of the river is cell 0">00 and the right bank is c ...
链接: https://codeforces.com/contest/1182/problem/C 题意: You are given n words, each of which consists of lowercase alphabet letters. Each word ...
C. Neko does Maths time limit per test 1 second memory limit per test 256 megabytes input standard ...
Codeforces Round #735 (Div. 2) C. Mikasa ps:代码最后调出来来不及交了,没有AC,纯属口嗨 qwq 本质是找个最小的k使得n^k>m \(n > m\) 则答案为0 下面描述的n的变化量即为要找的k。 1、找到n最高的值为1且不与m ...
链接: https://codeforces.com/contest/1234/problem/C 题意: You are given a system of pipes. It consists of two rows, each row consists of n pipes. ...
B. Strange List 题目分析 题意:给你一个长度为n的数组和一个数字x,从第一个元素开始,如果改元素q能被x整除,那么将就在数组后面新增x个(q / x),直到遇到的元素不能被x整除,求最后数组的元素之和 让我们从样例开始入手分析:样例中的第一个情况数组a为[12],x为2,数组 ...
链接: https://codeforces.com/contest/1241/problem/C 题意: You are an environmental activist at heart but the reality is harsh and you are just ...