原创 HDU 6047 Maximum Sequence【貪心】

題目來戳呀 Problem Description Steph is extremely obsessed with “sequence problems” that are usually seen on magazines:

原创 山東省第八屆acm省賽C題 fireworks

題目來戳呀 Problem Description Hmz likes to play fireworks, especially when they are put regularly. Now he puts some fi

原创 哼哼唧唧學博弈

一、巴什博奕(同餘理論) 一堆物品 n個 每人能取出1~m個 甲先拿 乙後拿 若n=m+1 乙勝 若n=k*(m+1) 乙勝 若n=k*(m+1)+r 甲勝 1.#include<iostream> 2.using

原创 HDU 1087 Super Jumping! Jumping! Jumping!【最長上升子序列元素總和】

Problem Description Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU

原创 山東省第八屆acm省賽K題 CF

題目來戳呀 Problem Description LYD loves codeforces since there are many Russian contests. In an contest lasting for T m

原创 HDU 6052 To my boyfriend【思維】

題目來戳呀 Problem Description Dear Liao I never forget the moment I met with you. You carefully asked me: “I have a ver

原创 動態規劃之最長子序列問題

一個數的序列bi,當b1 < b2 < … < bS的時候,我們稱這個序列是上升的。 對於給定的一個序列(a1, a2, …, aN),我們可以得到一些上升的子序列(ai1, ai2, …, aiK),這裏1 <= i1 < i

原创 2017 Multi-University Training Contest - Team 1 HDU 6035 Colorful Tree

題目來戳呀 Problem Description There is a tree with n nodes, each of which has a type of color represented by an integer

原创 hdu 4521 小明序列

怒 馬 一 發! 看了好久,師哥說超!綱!了! 等到會了再回來補坑○| ̄|_ 點贊 收藏 分享 文章舉報 皮科克 發佈了87 篇原創文章 · 獲贊 8 · 訪問量

原创 山東省第八屆acm省賽D題 HEX

題目來戳呀 Problem Description On a plain of hexagonal grid, we define a step as one move from the current grid to the l

原创 數據結構之線段樹

一、引例 有M個數排成一列,做N次操作,每次操作包括: (1)詢問指定區間的最大值、最小值 (2)將指定區間的每個數加上一個值 如果按照最樸素的做法,一個個的遍歷,時間複雜度:O(MN)。 那麼如何解決一個區間求和(最大值

原创 數論之乘法逆元

一、定義 指數學領域羣G中任意一個元素a,都在G中有唯一的逆元a‘,具有性質a×a’=a’×a=e,其中e爲該羣的單位元。(可以理解爲倒數,因爲積是單位e) 二、作用 在求組合數取模的時候,當Cmn =n!m!∗(n−m)! 中的

原创 2017 Multi-University Training Contest - Team 1 HDU 6033 Add More Zero【對數】

題目來戳呀 Problem Description There is a youngster known for amateur propositions concerning several mathematical hard

原创 HDU 6034 Balala Power!【貪心】

Problem Description Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge t

原创 HDU 6038 Function【思維】

題目來戳呀 Problem Description You are given a permutation a from 0 to n−1 and a permutation b from 0 to m−1. Define tha