原创 Codeforces 581C - Developing Skills(貪心)

Description Petya loves computer games. Finally a game that he’s been waiting for so long came out! The main charac

原创 HDU 1016 - Prime Ring Problem (DFS)

Description A ring is compose of n circles as shown in diagram. Put natural number 1, 2, …, n into each circle sepa

原创 HDU 1010 - Tempter of the Bone(DFS 奇偶剪枝)

Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up,

原创 HDU 1009 - FatMouse' Trade(貪心)

Description FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing

原创 POJ 2431 - Expedition (貪心 優先隊列)

Description A group of cows grabbed a truck and ventured on an expedition deep into the jungle. Being rather poor d

原创 MacOS Catalina 10.15.4 alias添加自定義命令

MacOS Catalina 10.15.4 alias添加自定義命令 例如:簡化命令’clear’爲’c’ 在之前的版本中,bash_profile和bashrc 首先打開終端: vim ~/.bash_profile 然後

原创 HDU 3714 - Error Curves (三分查找)

Description Josephina is a clever girl and addicted to Machine Learning recently. She pays much attention to a me

原创 POJ 2456 - Aggressive cows(二分)

Description Farmer John has built a new long barn, with N (2 <= N <= 100,000) stalls. The stalls are located along

原创 HDU 1242 - Rescue(BFS 優先隊列)

Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N

原创 POJ 3233 - Matrix Power Series(矩陣快速冪)

Description Given a n × n matrix A and a positive integer k, find the sum S=A+A2+A3+…+Ak. Input The input contains

原创 Code Forces 588A - Duff and Meat(貪心)

Description Duff is addicted to meat! Malek wants to keep her happy for n days. In order to be happy in i-th day, s

原创 UVA 10006 - Carmichael Numbers(卡邁克爾數 快速冪算法)

Description An important topic nowadays in computer science is cryptography. Some people even think that cryptogra

原创 Code Forces 587A - Duff and Weight Lifting(貪心)

Description Recently, Duff has been practicing weight lifting. As a hard practice, Malek gave her a task. He gave h

原创 POJ 3069 - Saruman's Army(貪心)

Description Saruman the White must lead his army along a straight path from Isengard to Helm’s Deep. To keep track

原创 POJ 3070 - Fibonacci (矩陣快速冪)

Description In the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn − 1 + Fn − 2 for n ≥ 2. For example, the