原创 ACM 352. 數字遊戲(單調隊列)

352. 數字遊戲 ★☆   輸入文件:ggame.in   輸出文件:ggame.out   簡單對比 時間限制:1 s   內存限制:128 MB 【背景】 不知不覺小白已經到家了。他打開自己的草稿本,開始了自己新的研究。   【

原创 ACM 262. [NOI1997] 競賽排名(讀題)

262. [NOI1997] 競賽排名 ★☆   輸入文件:competitionsort.in   輸出文件:competitionsort.out   簡單對比 時間限制:0.5 s   內存限制:4 MB 某市組織了一次中學生科

原创 ACM 294. [NOI2000] 青蛙過河(遞推)

#include <iostream> #include <cstdio> using namespace std; int main() { freopen("frog.in","r",stdin); freopen("fr

原创 ACM STL中的sort

STL中的sort 定義 template <class RandomAccessIterator> void sort ( RandomAccessIterator first, RandomAccessIterator last

原创 ACM Splay(模板)

Splay模板 #include <iostream> using namespace std; class SplayTree { public: struct Node { int key;

原创 ACM 698. 貨幣系統(揹包變形)

698. 貨幣系統 ★☆   輸入文件:moneysys.in   輸出文件:moneysys.out   簡單對比 時間限制:1 s   內存限制:128 MB 描述 USACO 2.3.4 母牛們不但創建了它們自己的政府而且選擇

原创 ACM Packets(挑戰程序設計競賽)

Packets Time Limit: 1000ms Memory Limit: 10000KB This problem will be judged on PKU. Original ID: 1017 64-bit inte

原创 ACM Cleaning Shifts(挑戰程序設計競賽)

Cleaning Shifts Time Limit: 1000ms Memory Limit: 65536KB This problem will be judged on PKU. Original ID: 2376 64-

原创 ACM Osenbei(挑戰程序設計競賽)

Osenbei Time Limit: 3000ms Memory Limit: 65536KB This problem will be judged on Aizu. Original ID: 0525 64-bit int

原创 ACM 375. 字符串的距離(dp)

375. 字符串的距離 ★☆   輸入文件:blast.in   輸出文件:blast.out   簡單對比 時間限制:1 s   內存限制:128 MB 設有字符串X,我們稱在X的頭尾及中間插入任意多個空格後構成的新字符串爲X的擴展

原创 ACM UVA 11292 - Dragon of Loowater

Problem C: The Dragon of Loowater Once upon a time, in the Kingdom of Loowater, a minor nuisance turned into a major pr

原创 ACM Property Distribution(挑戰程序設計競賽)

Property Distribution Time Limit: 1000ms Memory Limit: 65536KB This problem will be judged on Aizu. Original ID: 0

原创 ACM Hopscotch(挑戰程序設計競賽)

Hopscotch Time Limit: 1000ms Memory Limit: 65536KB This problem will be judged on PKU. Original ID: 3050 64-bit in

原创 ACM 377. 護衛隊(dp)

377. 護衛隊 ★☆   輸入文件:convoy.in   輸出文件:convoy.out   簡單對比 時間限制:1 s   內存限制:128 MB 護衛車隊在一條單行的街道前排成一隊,前面河上是一座單行的橋。因爲街道是一條單行道