`
kenby
  • 浏览: 717263 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
  #include <stdio.h> #include <string.h> #define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define MAX 101 #define MAX_INT 200000 int graph[MAX][MAX]; /* graph[0][i]表示物品i的原始价格,graph[v][w]表示优 ...
  #include <stdio.h> #include <string.h> //#define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define MAX 256 typedef struct { int weight; int parent, lchild, rchild; } huffman_node; typedef struct { char key; ...
  #include <stdio.h> #include <string.h> #define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define N 102 #define MAX_INT 2000000 #define min(a, b) ((a) < (b) ? (a) : (b)) int graph[N][N]; int h[N]; int e[N]; ...
  #include <iostream> #include <stdio.h> #include <string.h> #include <stdlib.h> #define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define N 27 #define MAX_INT 20000000 using namespace std; struct eg{ ...
  #include <stdio.h> #include <string.h> //#define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define N 201 #define MAXQSIZE 1000 #define MAX_INT 2000000 #define min(a, b) (a) < (b) ? (a) : (b) int graph[N][N]; i ...
  #include <stdio.h> #include <string.h> #define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define N 100 #define MAX_INT 20000000 int graph[N][N]; int dist[N]; /* dist[i]表示顶点i距离已加入集合的最小距离, 如果dist[i]变为-1, 表示顶点i已加入集合 */ ...
  #include <stdio.h> #include <string.h> #define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define N 20010 #define M 1800000 #define MAX_INT 0x3fffffff #define min(a, b) (a) < (b) ? (a) : (b) /* 图的邻接表+ ...
  #include <iostream> #include <stdio.h> #include <string.h> #include <stdlib.h> //#define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define N 101 #define MAX_INT 2000000 #define min(a, b) (a) < (b) ? (a ...
#include <stdio.h> #include <string.h> #define DEBUG #ifdef DEBUG #define debug(...) printf( __VA_ARGS__) #else #define debug(...) #endif #define N 301 char weight[101][N]; /* weight[x][y] = 1 表示学生x可以做课程y的助教 */ char mat[N]; /* mat[y] = x,表示定点y和x匹配 */ char visit[N]; i ...
 数据结构(1)串 (poj1035,poj3080,poj1936)(2)排序(快排、归并排(与逆序数有关)、堆排) (poj2388,poj2299)(3)简单并查集的应用.  (4)哈希表和二分查找等高效查找法(数的Hash,串的Hash)(poj3349,poj3274,POJ2151,poj1840,poj2002,poj2503)(5)哈夫曼树(poj3253)(6)堆  (7)trie树(静态建树、动态建树) (poj2513)(1)线段树. (poj2528,poj2828,poj2777,poj2886,poj2750)(2)静态二叉检索树. (poj2482,poj2352) ...
1. 设置CDM生成PDM时的错误检查 Tools --> Check Model   2. 如何防止一对一的关系生成两个引用(外键)要定义关系的支配方向,占支配地位的实体(有D标志)变为父表。在cdm中双击一对一关系->Detail->Dominant role选择支配关系   3. PowerDesigner8中的CDM设计的外键作主键的问题两个实体之间是一对一的关系。两个实体的标识符是“一样的”--但是好像CDM中不允许相同。这样的情况怎么处理?CDM里好像没有外键,我是说转换成PDM之后,外键又要做表的主键,在对应的CDM里是怎么设置的?双击关系,在弹出的Re ...
# 设置控件在QGridLayout的位置 以QGridLayout的左上角为原点,第一个参数表示距原点的高度为0,第二个参数表示距原点的水平距离为5 bottomLayout->addWidget(upButton, 0, 5);   # 设置窗口启动时最大化 MainWindow *m=new MainWindow; m->showMaximized();   # 使用代理model,让QTableView实现行列互换 rotatedproxymodel.h #include <QAbstractProxyModel> class Rotate ...
一,问题: QDockWidget不能使用resize方法来确定初始大小,如果用setMaximumSize和setFixedSize,的确可以设置初始大小,但也限制了QDockWidget的最大尺寸,不能用鼠标拖动来改变QDockWidget的大小。 二, 目的: 如何不通过setMaximumSize和setFixedSize 设置QDockWidget的初始大小 三, 解决方案: 派生一个QWidget的新类,设置其sizeHint的返回值   #include <QtGui> class MyWidget : public QWi ...
1. 安装mysql的时候一定要安装"Libs & Include Files"的开发者模块 2. 设置环境变量 PATH %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\Qt\4.5.0\bin;C:\Program Files\Microsoft Visual Studio 8\VC\bin;C:\Program Files\Microsoft Visual Studio ...
1. 到http://www.xmission.com/~nate/glut.html 下载 glut-3.7.6-bin.zip,按如下方式安装解压出来的文件 glut32.dll -> C:\Windows\System or C:\WinNT\Systemglut32.lib -> C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\libglut.h -> C:\Program Files\Microsoft Visual Studio 8\VC\PlatformSDK\include\gl ...
Global site tag (gtag.js) - Google Analytics