上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页
摘要: 熟练使用map即可,不然用vector会超时 阅读全文
posted @ 2018-03-31 21:22 ouyang_wsgwz 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 //两遍迪杰斯特拉 5 #define INF 0xfffffff 6 using namespace std; 7 const int maxn = 400 + 5; 8 int rail[maxn][maxn]; 9 int dis[maxn]; 10 int vis[maxn]; 11 12 v... 阅读全文
posted @ 2018-03-31 20:13 ouyang_wsgwz 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 5 int n, m, c1, c2; 6 int dis[510], weight[510], e[510][510], num[510], w[510]; 7 bool visit[510]; 8 const int inf = 99999999; 9 10 int mai... 阅读全文
posted @ 2018-03-31 09:46 ouyang_wsgwz 阅读(103) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 const int maxn = 10005; 7 double a[maxn]; 8 int b[maxn]; 9 double c[maxn]; 10 11 int main(){ 12 ios::sync_with_stdio(fals... 阅读全文
posted @ 2018-03-31 08:40 ouyang_wsgwz 阅读(97) 评论(0) 推荐(0) 编辑
摘要: turtle(海龟)库是turtle绘图体系的Python实现 ——turtle 绘图体系:1969年诞生,主要用于程序设计入门 ——Python 语言的标准库之一 (标准库:随解释器直接安装到操作系统中的功能模块) ——入门级的图形绘制函数库 Python 计算生态 = 标准库 + 第三方库 (第 阅读全文
posted @ 2018-03-30 23:13 ouyang_wsgwz 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 1 //克鲁斯卡尔 2 #include 3 #include 4 5 using namespace std; 6 const int maxn = 50000 + 5; 7 8 struct node{ 9 int x, y; 10 int len; 11 }g[maxn]; 12 13 bool cmp(node x, node y){ 14 ... 阅读全文
posted @ 2018-03-29 20:08 ouyang_wsgwz 阅读(146) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 const int maxn = 10000 + 5; 7 int a[maxn]; 8 int f[maxn][15]; 9 10 void rmq(int cnt){ 11 memset(f, 0, sizeof(f)); 12 ... 阅读全文
posted @ 2018-03-28 21:52 ouyang_wsgwz 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 5 using namespace std; 6 const int maxn = 500 + 10; 7 const int INF = 0x3f3f3f3f; 8 int pic[maxn][maxn]; //用来存图 9 int dis[maxn]; 10 int val[maxn], a... 阅读全文
posted @ 2018-03-28 21:10 ouyang_wsgwz 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 const int maxn = 1000000 + 5; 7 int v[maxn]; 8 int c[maxn]; 9 int dp[maxn]; 10 11 int main(){ 12 ios::sync_with_stdio(fal... 阅读全文
posted @ 2018-03-26 21:58 ouyang_wsgwz 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 4 using namespace std; 5 const int maxn = 50005; 6 int a[maxn]; 7 int res[maxn]; 8 int ans; 9 10 //归并排序 11 void merge(int l, int r){ 12 //cout> 1; 14 int ... 阅读全文
posted @ 2018-03-26 20:54 ouyang_wsgwz 阅读(145) 评论(0) 推荐(0) 编辑
上一页 1 ··· 13 14 15 16 17 18 19 20 21 ··· 33 下一页