Great Graphs 題意 給你一個數組\(d\),\(d[i]\)表示從節點\(1\)到其他各個節點的最短路的長度,然后你可以對這個圖進行加邊(可以是負邊),但不允許存在一個權值和為負數的回 ...
Codeforces Round Div. C. Mikasa ps:代碼最后調出來來不及交了,沒有AC,純屬口嗨 qwq 本質是找個最小的k使得n k gt m n gt m 則答案為 下面描述的n的變化量即為要找的k。 找到n最高的值為 且不與m相同的一個二進制位,假設為第x位,代表的值為 x 若能找到這樣的二進制位,因為要使n k gt m,那么n高於該位的值為 的位都應該向m補齊 補齊,即 ...
2021-07-30 01:15 0 173 推薦指數:
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 ...
C. Neko does Maths time limit per test 1 second memory limit per test 256 megabytes input standard ...
鏈接: 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. ...
鏈接: https://codeforces.com/contest/1182/problem/C 題意: You are given n words, each of which consists of lowercase alphabet letters. Each word ...
題意: \(f(i)=x\),\(x\)為最小的不能整除\(i\)的數.求\(\sum^{n}_{i=1}f(i)\ mod\ 10^9+7\). 題解:首先,\(1,2,..., ...
鏈接: https://codeforces.com/contest/1241/problem/C 題意: You are an environmental activist at heart but the reality is harsh and you are just ...
B. Rebranding The name of one small b ...