原创 SPOJ - QTREE Query on a tree樹鏈剖分

SPOJ - QTREE Query on a tree樹鏈剖分 You are given a tree (an acyclic undirected connected graph) with N nodes, and edges

原创 拓撲排序 POJ1128 Frame Stacking

拓撲排序 POJ1128 Frame Stacking 拓撲排序: 有向無環圖的拓撲排序 基本算法: 無前驅的定點優先Turpo排序算法是每一步總輸出當前無前驅(入度爲零)的定點。 (1)從有向圖中選擇一個沒有前驅的頂點並輸出它

原创 NOIPDay1T2時間複雜度

NOIPDay1T2時間複雜度 題目描述 小明正在學習一種新的編程語言 A++,剛學會循環語句的他激動地寫了好多程序並 給出了他自己算出的時間複雜度,可他的編程老師實在不想一個一個檢查小明的程序, 於是你的機會來啦!下面請你編寫程序來判斷

原创 Boxes of Chocolates Again UVA - 10590

Boxes of Chocolates Again UVA - 10590 題目:https://odzkskevi.qnssl.com/7ee6f54041617f8f28cf81ea4c0484ec?v=1508356293 數的劃分

原创 特殊圖poj2367-Genealogical tree poj-1776Task Sequences BZOJ1006: [HNOI2008]神奇的國度

特殊圖poj2367-Genealogical tree poj-1776Task Sequences BZOJ1006: [HNOI2008]神奇的國度 分類: 樹:無環聯通圖 平面圖:邊沒交點 平面圖的對偶圖:平面圖網絡流轉化爲

原创 poj3207-Ikki's Story IV - Panda's Trick

poj3207-Ikki’s Story IV - Panda’s Trick Ikki’s Story IV - Panda’s Trick Time Limit: 1000MS Memory Limit: 131072K

原创 SPOJ - QTREE2 Query on a tree II樹鏈剖分

SPOJ - QTREE2 Query on a tree II You are given a tree (an undirected acyclic connected graph) with N nodes, and edges n

原创 POJ2396 Budget

POJ2396 Budget Budget Time Limit: 3000MS Memory Limit: 65536K Special Judge Description We are supposed

原创 pojKMP專題:poj1961-Period poj2409-Power Strings poj2752-Seek the Name, Seek the Fame poj3461-Oulipo

pojKMP專題:poj1961-Period poj2409-Power Strings poj2752-Seek the Name, Seek the Fame poj3461-Oulipo poj3461-Oulipo Ouli

原创 POJ1204-Word Puzzles

POJ1204-Word Puzzles Word Puzzles Time Limit: 5000MS Memory Limit: 65536K Special Judge Description Wor

原创 poj2485-Highways

poj2485-Highways 求最小生成樹的最大邊。 Prim算法:每次將到已有的生成樹點集距離最小的點加入到生成樹點集中。時間複雜度:O(|E|log|V|) #include <iostream> #include <cstdi

原创 poj1041-John's trip

poj1041-John’s trip John’s trip Time Limit: 1000MS Memory Limit: 65536K Special Judge Description Littl

原创 poj1144-Network

poj1144-Network Network Time Limit: 1000MS Memory Limit: 10000K Description A Telephone Line Company (TLC)

原创 poj2186-Popular Cows

poj2186-Popular Cows Popular Cows Time Limit: 2000MS Memory Limit: 65536K Description Every cow’s dream is

原创 poj3487-The Stable Marriage Problem

poj3487-The Stable Marriage Problem The Stable Marriage Problem Time Limit: 1000MS Memory Limit: 65536K Total Submissi