原创 div2題目題解:J. Circular Dance

題目: J. Circular Dance time limit per test3 seconds memory limit per test256 megabytes inputstandard input outputsta

原创 2020牛客寒假算法基礎集訓營2題解 E題:做計數【數學題,時間複雜度:O( n )】

題目 鏈接:https://ac.nowcoder.com/acm/contest/3003/E 這一天,牛牛與 牛魔王相遇了――然而這並不在 牛牛期望之中。 牛魔王不出意料又給 牛牛一道看似很難的題目:求有多少個不同的正整數三

原创 GDUT_寒假訓練題解報告_圖論專題_個人題解報告——題目:L - Til the Cows Come Home

GDUT_寒假訓練題解報告_圖論專題_個人題解報告——題目:L - Til the Cows Come Home 題目: Bessie is out in the field and wants to get back to th

原创 GDUT_寒假訓練題解報告_專題I_A題 個人題解報告【尺取模板題目詳解】【poj題目Subsequence】

GDUT_寒假訓練題解報告_專題I_A題 個人題解報告:題目Subsequence 原題鏈接:http://poj.org/problem?id=3061 A題:尺取(模板題目 給出了一個N長度的正整數序列(10<N<1e5),

原创 GDUT_排位賽題解報告_第1場_E題 Milk Visits

題目: Farmer John is planning to build N (1≤N≤105) farms that will be connected by N−1 roads, forming a tree (i.e., a

原创 GDUT_排位賽題解報告_第5場_A. 唯一排列

題目 ChenJr給你一個長度爲n的排列p,你可以交換其中任意相鄰的兩個數。現在你需要用最小的交換次數使得這個排列變成升序的序列。現在ChenJr想知道,對於這個排列p,是否存在唯一的交換方式,使得這個排列變成升序的序列。 Inp

原创 GDUT_排位賽題解報告_第4場_C. Defining Labels

題目: Microsoft Excel is a spreadsheet developed by Microsoft. It features calculation, graphing tools, pivot tables,

原创 GDUT_排位賽題解報告_第3場_H. Photoshoot

題目: Farmer John is lining up his N cows (2≤N≤103), numbered 1…N, for a photoshoot. FJ initially planned for the i-t

原创 GDUT_排位賽題解報告_第2場_B. Snakes

題目: B. Snakes time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard out

原创 GDUT_排位賽題解報告_第2場_H. I Would Walk 500 Miles

題目: H. I Would Walk 500 Miles time limit per test1 second memory limit per test512 megabytes inputstandard input ou

原创 2019 ICPC Malaysia National J.Kitchen Plates

題目: https://codeforc.es/gym/102219/problem/J 題意:給ABCDE 5個盤子的5組比較大小,輸出完整大小。 這個題應該蠻經典的,題解清一色都是說拓撲排序,可憐我不知道拓撲排序是啥,於是就用

原创 GDUT_寒假訓練題解報告_數論專題_個人題解報告——題目:D - Beautiful Numbers (CodeForces - 300C)【逆元、組合數公式】

原題鏈接http://codeforces.com/problemset/problem/300/C 題目: Vitaly is a very weird man. He’s got two favorite digits a

原创 GDUT_排位賽題解報告_第4場_E. Binary Tree

題目: In computer science, a binary tree is a rooted tree in which each node has at most two children. In this proble

原创 Codeforces#642 (Div. 3) D. Constructing the Array

題目鏈接 題意: 給一個長度爲n的空序列,然後往裏面填1-n的數字; int cnt=1; 找序列中最長(如果多個最長則取最左邊的序列)的連續全空區間:並且賦值cnt++;循環這個操作n次: eg: Consider the ar

原创 東北林業大NEFU 五一歡樂水題 F&H題解

比賽鏈接 H卡迪亞的遊戲 這題一看,零一揹包的皮,然後無論是回溯做法的O(2^n)還是正常dp的O(VN)都滿足不了這些毒瘤數據,過於生草,然後神勇的隊友竟然設dp[i][j]爲前i個物品價值爲j的情況下的最小重量。時間複雜度一下