ACME Training Six to Eight – SGU problems solving[long-term,individual]

本次训练为刷SGU前100题,我负责100-139,wdp负责140-169,whd负责170-199。 link: http://acm.hust.edu.cn/vjudge/contest/view.action?cid=18930#overview http://acm.hust.edu.cn/vjudge/contest/view.action?cid=18976#overview http://acm.hust.edu.cn/vjudge/contest/view.action?cid=19067#overview 100 A+B 101 Domino 欧拉回路 102 Coprimes 最大公约数 103 Traffic Lights 动态计算边权的最短路 104 Little Shop of Flowers 动态规划 105 Div 3 数学题 106 The Equation 扩展欧几里得算法解不定方程 107 987654321 problem 暴力打表 108 Self-numbers II 类似宽搜的算法 109 Magic of David Copperfield II 二分染色 构造 110 Dungeon 计算几何 111 Very simple problem 高精度开根号运算 牛顿迭代法 […]

[The 2009 ACM-ICPC Asia Harbin Regional Contest]G.Fuzzy Google Suggest

字典树。 CODE: #include <iostream> #include <algorithm> #include <string> #include <cstring> #include <cassert> #include <sstream> #include <map> #include <vector> #include <set> using namespace std;   struct Trie {     Trie* f;     Trie* c[26];     int d; }; Trie pool[4*1024*1024]; Trie* top=pool; Trie* root; #define f(x) ((x)-‘a’)   void calc(Trie* p,char* s,int d,set<Trie*>& get) {     […]

[The 2009 ACM-ICPC Asia Harbin Regional Contest]D.Gold Mines

最小费用流。 CODE: #include <iostream> #include <algorithm> #include <string> #include <cstring> #include <cassert> using namespace std;   #define oo 0x7f7f7f7f #define MAXEDGE 510000 #define MAXV 1002   typedef struct struct_edge* edge; struct struct_edge{int v,c,d;edge n,b;}; struct_edge pool[MAXEDGE]; edge top; int S,T,V; edge adj[MAXV]; int q[MAXV]; bool inq[MAXV]; int head,tail; edge p[MAXV]; int d[MAXV]; void add_edge(int u,int […]

The 2010 Asia Regional Contests

3660 Alice and Bob’s Trip 2010 Asia Regional Harbin (502/2007)25.01%   3661 Assignments 2010 Asia Regional Harbin (455/958)47.49%   3662 3D Convex Hull 2010 Asia Regional Harbin (252/491)51.32%   3663 Power Stations 2010 Asia Regional Harbin (306/1222)25.04%   3664 Permutation Counting 2010 Asia Regional Harbin (378/749)50.47%   3665 Seaside 2010 Asia Regional Harbin (435/647)67.23% 3666 […]