原创 牛客練習賽59 石子搬運【優先隊列+思維】

石子搬運 Time Limit: 1000 MS Memory Limit: 262144K Problem Description 鏈接:https://ac.nowcoder.com/acm/contest/4743/E

原创 HDU 5909 Tree Cutting 【樹型DP】

Tree Cutting Time Limit: 4000/2000 MS(Java/Others)    Memory Limit: 262144/131072 K(Java/Others) Total Submission(s):

原创 Codeforces 961E - Tufurama 【樹狀數組】

E. Tufurama time limit per test   2 seconds memory limit per test      256 megabytes One day Polycarpdecided to rewa

原创 Codeforces 1324F - Maximum White Subtree 【樹形DP】

Maximum White Subtree Time Limit: 2000 MS Memory Limit: 256MB Problem Description You are given a tree consistin

原创 華爲機試在線訓練 購物單【分組01揹包】

購物單 Time Limit: 1000 MS Memory Limit: 32M Problem Description 王強今天很開心,公司發給N元的年終獎。王強決定把年終獎用於購物,他把想買的物品分爲兩類:主件與附件,

原创 2020字節跳動校園招聘算法方向第一場考試題解

第一題 【題意】 給出<a,b>,可以理解爲a的爸爸是b,現在你要依次輸出每個爸爸的所有兒子,兒子之間按照字典序排序 【思路】 思路不難,用map將爸爸的名字映射成數字,然後建一個二維vector,兒子push_back到對應爸爸

原创 BZOJ 1833: [ZJOI2010]count 數字計數 【數位DP】

1833: [ZJOI2010]count 數字計數 Time Limit: 3 Sec  Memory Limit: 64 MB Description 給定兩個正整數a和b,求在[a,b]中的所有整數中,每個數碼(di

原创 Codeforces 967E - Big Secret 【DFS序+線段樹】

E. Big Secret time limit per test   2 seconds memory limit per test      256 megabytes Vitya has learned that th

原创 BZOJ 4513 [SDOI2016]儲能表 【數位DP】

4513: [Sdoi2016]儲能表Time Limit: 10 Sec  Memory Limit: 128 MBDescription有一個 n 行 m 列的表格,行從 0 到 n−1 編號,列從 0 到 m−1 編號。每個格子都儲

原创 Codeforces 620E - New Year Tree 【DFS序+線段樹】

E. New Year Tree time limit per test   3seconds memory limit per test      256megabytes The New Year holidays are ov

原创 2019校招真題編程題彙總

牛牛找工作 https://paste.ubuntu.com/p/4vk5FSrYmZ/ 被3整除 https://paste.ubuntu.com/p/8rvd2rCrRn/ 安置路燈 https://paste.ubuntu.com/

原创 BZOJ 2120: 數顏色【帶修莫隊】

                                                        2120: 數顏色                                                      

原创 Codeforces 960C - Subsequence Counting 【思維+構造】

C. Subsequence Counting time limit per test  1second memory limit per test     256megabytes Pikachu had an array wit

原创 BZOJ 4129: Haruna’s Breakfast【樹上帶修莫隊】

                                           4129: Haruna’s Breakfast                                                    

原创 “今日頭條”杯2018年湖北省賽(網絡賽) H. GSS and OJ Submissions【分塊】

H. GSS and OJ Submissions time limit per test 6 seconds memory limit per test 512 megabytes GSS is holding alarg