原创 CodeForces - 662C Binary Table (FWT)

題目鏈接:http://codeforces.com/problemset/problem/662/C 題目大意:給出一個n*m的01矩陣,你可以對矩陣一行或者一列進行變換,每次變換會使0變成1,1變成0。你可以進行無限次操作,現在問你怎

原创 牛客多校第九場 A Circulant Matrix(FWT)

鏈接:https://www.nowcoder.com/acm/contest/147/A 來源:牛客網   題目描述 Niuniu has recently learned how to use Gaussian elimination

原创 HDU - 4746 Mophues (莫比烏斯反演+分塊)

題目鏈接:http://acm.hdu.edu.cn/showproblem.php?pid=4746 題目大意:題目定義如果數C是數P的幸運數的話,當且僅當C的質因子數小於等於P。現在給出n,m和p,問你能選多少對組合(a,b)滿足1<

原创 HDU - 4609 3-idiots (FFT入門)

3-idiots Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 7656

原创 POJ-2114 Boatherds (樹分治)

Boatherds Time Limit: 2000MS   Memory Limit: 65536K Total Submissions: 3775   Accepted: 1233 Description Boatherds Inc.

原创 牛客多校第六場 G Pikachu(樹形dp)

鏈接:https://www.nowcoder.com/acm/contest/144/G 來源:牛客網   題目描述 In Viridian forest there is a tree T formed by N nodes, eac

原创 杭電多校第三場 1008 HDU-6326 Monster Hunter(貪心)

Problem H. Monster Hunter Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) Total S

原创 牛客多校第五場 F take(期望+線段樹)

鏈接:https://www.nowcoder.com/acm/contest/143/F 來源:牛客網   題目描述 Kanade has n boxes , the i-th box has p[i] probability to h

原创 牛客多校第六場 I Team Rocket(線段樹)

鏈接:https://www.nowcoder.com/acm/contest/144/I 來源:牛客網   題目描述 There are n trains running between Kanto and Johto region.

原创 牛客多校第五場 I vcd(樹狀數組)

鏈接:https://www.nowcoder.com/acm/contest/143/I 來源:牛客網   題目描述 Kanade has an infinity set H contain all of sets such as {(

原创 Codeforces Round #502 (in memory of Leopoldo Taravilse, Div. 1 + Div. 2) D. The Wu (思維 + 2進制預處理前綴和)

D. The Wu time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output

原创 杭電多校第四場 1002 HDU-6333(組合數+莫隊)

Problem B. Harvest of Apples Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Tota

原创 牛客多校第五場 E room (二分圖帶權匹配 + 費用流)

鏈接:https://www.nowcoder.com/acm/contest/143/E 來源:牛客網   題目描述 Nowcoder University has 4n students and n dormitories ( Fou

原创 牛客多校第五場 H subseq (線段樹)

鏈接:https://www.nowcoder.com/acm/contest/143/H 來源:牛客網   題目描述 Kanade has an array a[1..n] , she define that an array b[1.

原创 CodeChef - COUNTARI Arithmetic Progressions (FFT+分塊)

題目鏈接:https://www.codechef.com/problems/COUNTARI 題目大意:給出一個長度爲n的數組,要求從中選出三個數a[i],a[j],a[k],滿足i<j<k,且a[j]-a[i]=a[k]-a[j]。問