码迷,mamicode.com
首页 >  
搜索关键字:include    ( 84546个结果
pipioj 1175: 货运费用(最短路)
1 #define IO std::ios::sync_with_stdio(0) 2 #include <bits/stdc++.h> 3 using namespace std; 4 #define mk make_pair 5 #define pb push_back 6 const int ...
分类:其他好文   时间:2021-01-06 11:49:40    阅读次数:0
图的最短路径(Dijkstra)(Floyd),拓扑排序,生成树代码
使用邻接矩阵存储加权图,无穷大使用常数MAXLEN代表,然后使用Dijkstra方法求取最短路径 1 #include <stdio.h> 2 3 #define MAXLEN 1000 4 int cost[7][7]; 5 int dist[7]; 6 7 void creategraph(in ...
分类:编程语言   时间:2021-01-06 11:45:19    阅读次数:0
练习:已知后序遍历和中序遍历,求层次遍历--C++实现
#include<iostream> #include<vector> using namespace std; vector<char>post,in; vector<char>level(100000,-1); in N; void ergodic(int root,int start,int ...
分类:编程语言   时间:2021-01-05 11:40:19    阅读次数:0
城市旅游购物交通咨询模拟(最小环floyd法/dp)
题目摘要 城市旅游购物交通咨询模拟 【问题描述】 沈阳城内有若干旅游观光景点和商业区。游客主要以公交车为交通工具出游。假设往返于每个景点和商业区的公交线路不少于6路。旅客希望中转次数最少、时间最短、费用最省。 【设计要求】 设计城市交通咨询模拟程序。 (1)采用图结构、集合等数据结构。 (2)可以随 ...
分类:其他好文   时间:2021-01-05 11:38:07    阅读次数:0
snprintf c组织一个文件全路径
#include <string.h> #include <stdarg.h> #include <stdio.h> #include <limits.h> #include <stdio.h> #define CONFIG_DIR "/etc/usbs/" int main() { FILE *f ...
分类:其他好文   时间:2021-01-05 11:25:23    阅读次数:0
A-J
#include <iostream> #include <cstdio> #include <cmath> using namespace std; int b; double a,s; void fun(double x,int d)//引入递归深度 { if(d==b) return; s=s ...
分类:其他好文   时间:2021-01-05 10:58:51    阅读次数:0
题解 SP6286 【SUMMUL - Sum of products】
这题首先我们可以推出递推式: 我们先把加数个数大于等于 \(2\) 的限制去掉,最后再减回去即可。 \[ f_0=1 \] \[ f_n=\sum\limits_{i=1}^{n} j \cdot f_{i-j} \] 暴力代码: #include<bits/stdc++.h> using name ...
分类:其他好文   时间:2021-01-05 10:41:20    阅读次数:0
快速排序
#include<bits/stdc++.h> using namespace std; int n; void mysort(int a[],int l,int r)//自己写的快排 { int mid=a[(l+r)/2];//找中间的数进行2分 int i=l,j=r; do{ while(a ...
分类:编程语言   时间:2021-01-05 10:39:05    阅读次数:0
share memory demo
shm.h 1 #ifndef __SHM_H 2 #define __SHM_H 3 4 #include <stdio.h> 5 6 #include <sys/ipc.h> 7 #include <sys/shm.h> 8 9 #define SHM_KEY ((key_t)0x2020123 ...
分类:其他好文   时间:2021-01-05 10:37:14    阅读次数:0
队列数据结构代码
使用数组创建队列 1 #include <stdio.h> 2 #define MAXQUEUE 10 3 4 int queue[MAXQUEUE]; 5 int front = -1; 6 int rear = -1; 7 8 int enqueue(int value) 9 { 10 if(r ...
分类:其他好文   时间:2021-01-04 11:36:12    阅读次数:0
84546条   上一页 1 ... 88 89 90 91 92 ... 8455 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!