- 博客(5)
- 资源 (3)
- 收藏
- 关注
原创 poj2418
秒过!一是以前做过,二是这题用map又水了。。唉~ #include #include #include #include using namespace std; int main() { ios::sync_with_stdio(false); mapint> a; string name; int c
2013-12-13 16:33:45 1515 1
原创 poj1442
竟然卡输入??!!有意思么~用堆做不好玩,换了个multiset玩玩,最好还是优先队列哦~ PS,这种能用stl解决的数据结构题其实没大有意思。。 #include #include #include using namespace std; #define MAXN 30010 int num[MAXN]; multisetint>
2013-12-13 16:27:37 1415
原创 poj2442
基本的堆的应用,STL中heap即可搞定。最近手速快了好多啊~ #include #include using namespace std; #define MAXN 2008 int a[MAXN], b[MAXN], sum[MAXN]; int main() { int t; cin >> t; while (t--)
2013-12-13 16:02:37 1207
原创 poj2503
扫扫尾,今天把初级的数据结构都完成了它,进军中级图论,算法导论看得很爽! 这题没啥好说的,map搞定 #include #include #include #include using namespace std; int main() { string s, a, b; mapbool> apperance; m
2013-12-13 15:52:17 1658 6
原创 poj2299
求一下逆序数,因为冒泡交换的准则是大于或者小于,逆序数累加的准则同样也是。 #include using namespace std; long long cnt; void merge(int array[], int left, int mid, int right) { int* temp = new int[right - left
2013-12-01 00:43:42 1383
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人