开一个数组做成队列来搜索就好了。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 8 const int MAXN=100010; 9 10 typedef struct po...
分类:
其他好文 时间:
2014-07-26 01:28:36
阅读次数:
260
非常简陋的一段小程序,演示怎样显示点阵字库。有时间的时候再详解。#include #include struct HzkInfoStruct{ int HzkSelect; int HzkSquare; char * fileName; FILE * file; int martixBytesCou...
分类:
其他好文 时间:
2014-07-26 00:46:46
阅读次数:
327
分析: 基础的欧拉路算法,变化在于要求每条边正向和反向各走一遍。 链式前向星构图,只要标记走过的单向边,边找边输出即可。code#include #include using namespace std;struct node { int v, ne;} edge[100009];int h...
分类:
其他好文 时间:
2014-07-26 00:22:06
阅读次数:
221
优先队列用法在优先队列中,优先级高的元素先出队列。标准库默认使用元素类型的 qi;通过, greater >qi2;其中第二个参数为容器类型。第二个参数为比较函数。故示例2中输出结果为:2 3 5 6 9第三种方法:自定义优先级。struct node{ friend bool operato...
分类:
其他好文 时间:
2014-07-26 00:19:06
阅读次数:
306
Heap sort is common in written exams.First of all, what is heap? Heap is a kind of data struct that can be seen as a complete binary tree. The objectt...
分类:
其他好文 时间:
2014-07-26 00:13:06
阅读次数:
343
#include #include #include #include using namespace std;const int Max=1050;struct e{ int x1,x2;}edge[Max];struct c{ int x,y;}cal[4];int n,m;int X1,Y1,...
分类:
其他好文 时间:
2014-07-26 00:07:26
阅读次数:
260
http://acm.hdu.edu.cn/showproblem.php?pid=1355 1 #include 2 #include 3 #include 4 #include 5 #define maxn 10000 6 using namespace std; 7 8 struct...
分类:
其他好文 时间:
2014-07-25 18:52:42
阅读次数:
190
开始变量竟然输反了#include
#include
int dp[1002];
struct none
{
int vo;
int value;
}a[1002];
int max(int a,int b)
{return a>b?a:b;}
int main()
{
int N,V,T,i,j;
scanf("%d",&T);
while(T--)
{
sc...
分类:
其他好文 时间:
2014-07-25 11:28:01
阅读次数:
203
// thin device数据结构
type DevInfo struct {
Hash string `json:"-"`
DeviceId int `json:"device_id"`
Size uint64 `json:"size"`
TransactionId uint64 `json:"tran...
分类:
移动开发 时间:
2014-07-25 11:02:35
阅读次数:
549
1 首先://注意在C和C++里不同
在C中定义一个结构体类型要用typedef:
typedef struct Student
{
int a;
}Stu;
于是在声明变量的时候就可:Stu stu1;(如果没有typedef就必须用struct Student stu1;来声明)
这里的Stu实际上就是struct Stud...
分类:
其他好文 时间:
2014-07-25 10:58:51
阅读次数:
197