原文:Vus the Cossack and Strings(Codeforces Round #571 (Div. 2))(大佬的位運算實在是太強了!)

C. Vus the Cossack and Strings Vus the Cossack has two binary strings, that is, strings that consist only of and . We call these stringsa aaandb bb. It is known that b amp x a b a b a , that is, the ...

2019-06-29 16:41 0 570 推薦指數:

查看詳情

Codeforces Round #613 (Div. 2) D - Dr. Evil Underscores(思維,運算

🥑 🥑 🥑 題意:對於一個數組,求一個數字與數組每個元素異或之后的最大值最小,求這個最大值 又是運算,,題目給出數組元素范圍在2^30以內,二進制最多30,從最高位開始貪心,如果此位置的數組元素有的是1有的是0,最后肯定取1,否則取0,還有就是分組討論,因為每個bit只能滿足原數組 ...

Sat Jan 11 22:08:00 CST 2020 0 293
Codeforces Round #630 (Div. 2)

傳送門 A. Exercising Walk 顯然橫縱坐標我們可以分開考慮。 假設只考慮橫坐標,若\(x_2\not ={x_1}\),那么向左/向右走可以互相抵消,然后只能往一個方向走;若\(x ...

Wed Apr 01 22:27:00 CST 2020 0 694
Codeforces Round #757 (Div. 2)

A. Divan and a Store 給你\(N\)個物品,每個物品有相應的價格\(a_i\),你有\(K\)元,問最多能買多少個價格在\([l,r]\)之間的物品 \(1 \leq N \le ...

Sat Nov 27 08:27:00 CST 2021 2 102
Codeforces Round #607 (Div. 2)

太久沒做題就會變得很菜。 題目鏈接:https://codeforces.com/contest/1281/ A: 白給。 View Code B: 顯然對於每一,只能跟后面的字符交換。如果只是O(n)掃,遇到第一個s[i]>c[i ...

Mon Dec 16 03:35:00 CST 2019 0 241
Codeforces Round #744 (Div. 3)

A. Casimir's String Solitaire 思路: 分別記錄字母A, B, C的數量,顯然要滿足B的數量等於A的數量和C的數量的和才行 B. Shifting So ...

Thu Sep 30 16:24:00 CST 2021 0 97
Codeforces Round #592 (Div. 2)

C題全員fst,不過幸好過了D、E,上了62分。現在Rating:1815,上紫指日可待。 先貼個代碼,心情好的時候回來補題解QwQ。 Codeforces1244A. Pens and Pencils(水題) View Code ...

Mon Oct 14 05:17:00 CST 2019 0 328
Codeforces Round #593 (Div. 2)

傳送門 A. Stones 簽到。 B. Alice and the List of Presents 單獨考慮每個數的貢獻即可。 答案為\((2^{m}-1)^n\)。 C. Labs ...

Fri Oct 18 23:56:00 CST 2019 2 308
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM