原创 ACM訓練日記7.7

一、訓練賽情況 A. Heating(AC) 題意: 給你a和b,讓你把b拆成a個數,這a個數之和要等於b,且這a個數的每個平方加起來的和必須是最小。 思路: 貪心思想,通過對樣例的分析,又自己造了幾組數據測試,發現平均放就可

原创 ACM訓練日記7.6

一、各題題意 A. Three Friends 在x軸上有三個點,對每個點只能操作一次,可執行操作:左移一個單位,右移一個單位,或者不動。求操作之後,兩兩之間距離的最小距離和。 B.Snow Walking Robot 四

原创 Educational Codeforces Round 85 (Rated for Div. 2)B. Middle Class

Many years ago Berland was a small country where only n people lived. Each person had some savings: the i-th one ha

原创 ACM程序設計課程總結

文章目錄知識總結一、遞歸算法二、貪心算法三、動態規劃四、分治算法五、數論六、STL的簡單應用學習這門課後的感想 知識總結 一、遞歸算法 【算法描述】 程序直接或間接調用自身的編程技巧稱爲遞歸算法。 【主要思想】把大型複雜的問題一步

原创 Codeforces Round #647 (Div. 2) - Thanks, Algo Muse!C. Johnny and Another Rating Drop(找規律)---題解

來源:http://codeforces.com/contest/1362/problem/C The last contest held on Johnny’s favorite competitive programming

原创 Codeforces Round #647 (Div. 2) - Thanks, Algo Muse!A. Johnny and Ancient Computer(數學)---題解

來源:http://codeforces.com/contest/1362/problem/A Johnny has recently found an ancient, broken computer. The machine

原创 Codeforces Round #647 (Div. 2) - Thanks, Algo Muse!B. Johnny and His Hobbies(異或)---題解

來源:http://codeforces.com/contest/1362/problem/B Among Johnny’s numerous hobbies, there are two seemingly harmless o

原创 廈門大學“網宿杯“17屆程序設計競賽決賽(同步賽) #題解 #題目都超有趣呀

文章目錄A.這波啊,這波是.....B.李在贛神魔C.電競希金斯D.財富密碼E.蕪湖起飛F.這題多撈啊G.正方形打野H.時間管理 A.這波啊,這波是… 鏈接:https://ac.nowcoder.com/acm/contest/

原创 Educational Codeforces Round 88 (Rated for Div. 2)C. Mixing Water(數學+二分法)---題解

C. Mixing Water 來源:http://codeforces.com/contest/1359/problem/C There are two infinite sources of water: hot water

原创 Educational Codeforces Round 88 (Rated for Div. 2)B. New Theatre Square-------題目+題解

B. New Theatre Square 來源:http://codeforces.com/contest/1359/problem/B You might have remembered Theatre square from

原创 “科林明倫杯”哈爾濱理工大學第十屆程序設計競賽(同步賽)---全題目+題解

文章目錄A.點對最大值B.減成一C.面積D.扔硬幣E.賽馬F.三角形G.養花H.直線I.字典序J.最大值 A.點對最大值 鏈接:https://ac.nowcoder.com/acm/contest/5758/A 來源:牛客網 題

原创 Codeforces Round #646 (Div. 2)A. Odd Selection---題目+題解

來源:http://codeforces.com/contest/1363/problem/A Shubham has an array a of size n, and wants to select exactly x ele

原创 Codeforces Round #645 (Div. 2)題目+詳解+代碼(A、B、C、D)

文章目錄A. Park LightingB. Maria Breaks the Self-isolationC. Celex UpdateD. The Best Vacation A. Park Lighting 來源:http:

原创 Educational Codeforces Round 88 (Rated for Div. 2)A. Berland Poker------題目+題解

A. Berland Poker 來源:http://codeforces.com/contest/1359/problem/A The game of Berland poker is played with a deck of

原创 Codeforces Round #646 (Div. 2)B.Subsequence Hate(貪心)---題目+題解

來源:http://codeforces.com/contest/1363/problem/B Shubham has a binary string s. A binary string is a string containi