Xor sum 題目鏈接 http://acm.hdu.edu.cn/showproblem.php?pid=6955 題意 給定 \(n\) 個數,求異或和大於等於 \(k\) 的最短的區間左右端點,如果有多個答案,輸出左端點編號最小的那個。 思路 由於異或的自反性,我們做個前綴異 ...
Problem Description Given a sequence of integers of length n, find the shortest consecutive subsequence witch XOR sum not less than k. If there are multiple consecutive subsequences of the same length ...
2021-07-21 16:22 6 377 推薦指數:
Xor sum 題目鏈接 http://acm.hdu.edu.cn/showproblem.php?pid=6955 題意 給定 \(n\) 個數,求異或和大於等於 \(k\) 的最短的區間左右端點,如果有多個答案,輸出左端點編號最小的那個。 思路 由於異或的自反性,我們做個前綴異 ...
Problem Description One day, a zombie came to the Lawn of the Dead, which can be seen as an n×m gri ...
Problem Description Alice and Bob are playing a game. They take turns to operate. There are n numb ...
Banzhuan *Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total ...
2021“MINIEYE杯”中國大學生算法設計超級聯賽(10) 慶祝暑期訓練賽結束了 Pty loves lines 題意 \(n\)條直線,求直線相交的所有可能的交點數情況並輸出。 思路 首先,每條直線最極端情況(所有直線不平行),那么就有 ...
: 1006 代碼都給你了,直接模擬。 code: 1007 出題人的英語水平真的可以。 考慮最 ...
2021“MINIEYE杯”中國大學生算法設計超級聯賽(8) 1003. Ink on paper 題意 滴墨水在紙上,墨水以每秒\(0.5\)向四面八方感染, 求多久后所有的墨水都能連接起來。 思路 \(prim\)求一遍最小生成樹即可,套板子0.0 ...
2021“MINIEYE杯”中國大學生算法設計超級聯賽(5) 1003.VC Is All You Need 題意 給你一個k維平面,問你是不是隨意放n個點都能用k-1條線分隔開 思路 emmmm, 思考一下, n > k + 1都是不行 ...