摘要: #if 1#include<iostream>#include<queue>#include<vector>using namespace std; class Travling { friend void TSP(int**,int);private: int n;//点个数 int** dis; 阅读全文
posted @ 2021-05-17 23:00 梦醒如赦 阅读(79) 评论(0) 推荐(0)
摘要: #if 1#include<iostream>using namespace std; class Color { friend int mColoring(int, int, int**);private: bool Ok(int k);//检查颜色可用性 void Backtrack(int t 阅读全文
posted @ 2021-05-09 10:41 梦醒如赦 阅读(187) 评论(0) 推荐(0)
摘要: #include<iostream>#include<algorithm>using namespace std;#define MAX 999; class Flowshop { friend int Flow(int** M, int n, int* bestx);private: void B 阅读全文
posted @ 2021-05-08 18:11 梦醒如赦 阅读(347) 评论(0) 推荐(0)
摘要: #if 0#include<iostream>using namespace std;struct EdgeType //关于图中边的信息的结构体{ int from, to; int Weight;};struct EdgeGraph //关于整个图中顶点、边的所有信息,需要将前面边的结构体内容导 阅读全文
posted @ 2021-05-08 18:09 梦醒如赦 阅读(77) 评论(0) 推荐(0)
摘要: #if 0#include<iostream>using namespace std;#define maxint 999 template<class Type> void Prim(int n, Type ** c) {//c[i][j]表示边(i,j)的权值,n是顶点个数 Type *lowc 阅读全文
posted @ 2021-05-08 18:08 梦醒如赦 阅读(153) 评论(0) 推荐(0)
摘要: #if 1#include<iostream>#include<algorithm>using namespace std;template<class Typew,class Typep>class Knap { friend Typep Knapsack(Typep*, Typew*, Type 阅读全文
posted @ 2021-05-07 22:01 梦醒如赦 阅读(258) 评论(0) 推荐(1)
摘要: #include<iostream>#include<cmath>using namespace std; class Queen { friend int nQueen(int);private: bool Place(int k); void Backtrack(int t); int n,// 阅读全文
posted @ 2021-05-07 21:26 梦醒如赦 阅读(165) 评论(0) 推荐(0)
摘要: 先画坐标轴 package start;import java.awt.Color;import java.awt.Graphics2D;import java.awt.Graphics;import java.awt.geom.GeneralPath; import javax.swing.*;p 阅读全文
posted @ 2021-05-05 12:55 梦醒如赦 阅读(593) 评论(0) 推荐(0)
摘要: package start;import java.awt.*;import java.awt.event.*;import javax.swing.*;import java.util.Arrays;import java.util.Set;import java.util.TreeMap; pu 阅读全文
posted @ 2021-05-05 10:25 梦醒如赦 阅读(1178) 评论(0) 推荐(0)
摘要: #include<iostream>using namespace std; class Loading { friend int MaxLoading(int* w, int c, int n, int* bestx);private: void Backtrack(int i); int n;/ 阅读全文
posted @ 2021-05-03 10:45 梦醒如赦 阅读(237) 评论(0) 推荐(0)