原文:Codeforces 959 E Mahmoud and Ehab and the xor-MST

Discription Ehab is interested in the bitwise xor operation and the special graphs. Mahmoud gave him a problem that combines both. He has a complete graph consisting ofnvertices numbered from ton . Fo ...

2018-04-14 20:20 4 583 推薦指數:

查看詳情

Codeforces.888G.Xor-MST(Borůvka算法求MST 貪心 Trie)

題目鏈接 \(Description\) 有一張\(n\)個點的完全圖,每個點的權值為\(a_i\),兩個點之間的邊權為\(a_i\ xor\ a_j\)。求該圖的最小生成樹。 \(n\leq2*10^5,0\leq ai<2^{30}\)。 \(Solution\) 代碼好神 ...

Wed Oct 10 04:31:00 CST 2018 0 1845
D. Ehab and the Expected XOR Problem

鏈接 [https://codeforces.com/contest/1174/problem/D] 題意 讓你構造一個數組,使得任意子段異或和不為0也不為x,而且每個數字大於等於1小於(1<<n) 分析 比賽做不出來,還是太垃圾了,這只能說水平不夠。而且我對位運算的題真的 ...

Tue Jun 04 21:53:00 CST 2019 1 448
[Codeforces 1242B]0-1 MST

Description 題庫鏈接 給你一張 \(n\) 個點的完全圖,其中有 \(m\) 條邊長度為 \(1\),其余全為 \(0\)。問你這張圖的最小生成樹為多少。 \(1\leq n\leq ...

Sat Nov 09 06:10:00 CST 2019 0 273
codeforces 983B XOR-pyramid

題意: 定義一個函數f(a): 給出一個數組a,有q個詢問,每次詢問回答在l到r的區間內,連續子串的f函數的最大值。 思路: 畫圖,來自codeforces SheepRanger 由此圖可知,f(l,r) = f(l,r-1) ^ f(l+1,r),多畫圖哇! 所以就變成 ...

Thu May 17 07:41:00 CST 2018 8 249
codeforces 877e

E. Danil and a Part-time Job time limit per test 2 seconds memory limit per test 256 megabytes input ...

Mon Nov 06 01:31:00 CST 2017 0 1356
Codeforces 1270E

我們把所有點分成四類 $A_{0,0},A_{0,1},A_{1,0},A_{1,1}$ 發現如果$A_{0,0}+A_{1,1} > 0$並且$A_{0,1}+A_{1,0} > 0 ...

Mon Dec 30 23:40:00 CST 2019 4 143
Codeforces 1220E. Tourism

傳送門 這是一道英語題,首先要讀懂題目: $\text{Alex believes that his trip will be interesting only if he will not us ...

Fri Sep 20 20:42:00 CST 2019 2 263
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM