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 ...