#include #include using namespace std;namespace strtool{string trim(const string& str){ string::size_type pos = str.find_first_not_of(' '); if (...
分类:
编程语言 时间:
2015-04-29 19:18:09
阅读次数:
191
数据比较随机,直接bst可以过。 1 #include 2 #include 3 using namespace std; 4 5 const int N = 101; 6 int tot; 7 8 struct Node 9 {10 Node * ch[2];11 cha...
分类:
其他好文 时间:
2015-04-29 19:00:55
阅读次数:
118
using System;using System.Collections.Generic;using System.Text;using System.Text.RegularExpressions;namespace DotNet.Utilities{ /// /// 字符串操作类...
分类:
其他好文 时间:
2015-04-29 18:52:57
阅读次数:
220
1.首先介绍map具有与set集合同样的自动排序功能
插入方法之pair
#include
#include
#include
using namespace std;
int main()
{
map m; //必须有两个类型
m.insert(pair(2,"student_two"));
m.insert(pair(1,"student_one"));
...
分类:
其他好文 时间:
2015-04-29 17:23:01
阅读次数:
118
这一题,也是简单的字典树的应用,不过这里不是字母,而是数字。
题目的意思是判断输入的字符串会不会是其他字符串的前缀。就是这么的简单。
下面是AC的代码:
#include
#include
using namespace std;
class node //结点的结构体
{
public:
node* P[10];
};
node* root; ...
分类:
其他好文 时间:
2015-04-29 17:17:39
阅读次数:
128
简单的欧拉回路,如题。
欧拉回路的判断:
1.在有向图中:首先必要的条件是图连通,所以顶点的入度都等于出度。
2.在无向图中:首要条件还是图连通,其次就是所以顶点都是偶数度(该顶点的度为偶数)
这一题是无向图,所以根据判断方法来写,很简单,判定就不证明了。
我是用并查集来判断图是否连通的。
下面是AC的代码:
#include
#include
using nam...
分类:
其他好文 时间:
2015-04-29 17:14:38
阅读次数:
164
中序和一个别的序可以确定一颗bst,而先序和后序不能! 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int N = 11; 7 char str[N]; 8 int cnt; 9 int...
分类:
编程语言 时间:
2015-04-29 16:59:56
阅读次数:
137
using DataToDeal;using LumenWorks.Framework.IO.Csv;using Microsoft.Win32;using System;using System.Collections.Generic;using System.Data;using System....
分类:
数据库 时间:
2015-04-29 16:50:22
阅读次数:
133
using System;using System.Collections.Generic;using System.Data;using System.Data.SqlClient;using System.Linq;using System.Text;using System.Threading...
分类:
其他好文 时间:
2015-04-29 16:44:53
阅读次数:
103
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;u...