原创 字典樹

一、定義 字典樹(Trie)可以保存一些字符串->值的對應關係。基本上,它跟 Java 的 HashMap 功能相同,都是 key-value 映射,只不過 Trie 的 key 只能是字符串。   Trie 的強大之處就在於它的時間

原创 第十三週比賽

6822 Black and white stones Shagga and Dolf like to play a game with stones, each of which is either black or white.

原创 Boggle(DFS)

Boggle is a game in which 16 dice with letters on each side are placed into a 4 × 4 grid. Players then attempt to fin

原创 Dance Recital

The Production Manager of a dance company has been tasked with determining the cost for the seasonal dance recital. B

原创 H - Hotel Rewards(優先隊列)

You are planning to spend your holidays touring Europe, staying each night in a different city for N consecutive nigh

原创 第八週組隊賽

K Video Posts 此題鏈接 題意:就是看能否均分,是的話就Yes,然後輸出可以由幾個數組成,不是就No #include <iostream> #include <cstdio> #include <cstring> #in

原创 逆序對(歸併排序)

Description 在這個問題中,你需要分析一個對n個不同數排序的算法。該算法主要通過交換相鄰數直到序列有序(升序)。比如:對輸入序列 9 1 0 5 4 經過一系列交換後變成有序序列

原创 優先隊列——Priority_Queue 詳解

一、入門介紹 1、 優先隊列是一種特殊的隊列,這種隊列會自動的把隊列裏的數排序(默認從大到小,使用“<”判斷),而且還可以把數按照特定的方法排列!(包括結構體和重載"<") 2、 優先隊列的頭文件,需要包括: #include<que

原创 國慶第四場訓練賽

A - A Description Little C loves number «3» very much. He loves all things about it. Now he has a positive integer $n

原创 常見排序知識

轉載自:https://blog.csdn.net/jkdd123456/article/details/83096684 一:幾種排序方法 排序算法的複雜度: ACM常用算法排序 二、 1、冒泡排序: 冒泡排序是一種簡單的排序

原创 優先隊列(Fence Repair)

Description Farmer John wants to repair a small length of the fence around the pasture. He measures the fence and fin

原创 組隊賽(第七週)

ABDE爲水題,CF爲dp A - Nth Largest Value 4552 Nth Largest Value For this problem, you will write a program that prints the

原创 卡特蘭數(JAVA大數)Buy the Ticket

Description The “Harry Potter and the Goblet of Fire” will be on show in the next few days. As a crazy fan of Harry P

原创 國慶第二場訓練賽

A You are given a string s of length n, which consists only of the first k letters of the Latin alphabet. All letters

原创 國慶第六場訓練賽

A Description Today an outstanding event is going to happen in the forest — hedgehog Filya will come to his old fried