自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(16)
  • 资源 (2)
  • 收藏
  • 关注

原创 matlab代码到C++代码转化及使用全攻略

1.在matlab中输入命令: mbuild -setup 安装编译器。(注意点:选择计算机上已有的VC/VS编译器,并输入相应的路径) 2.在matlab中输入命令: deploytool   进入该模式 3.按新建按钮,选择C++ Shared Library,进行工程的命名,并选择路径。然后Add Files,将要转换的M文件选择好。最后,build the project,编译该M

2015-06-15 10:24:13 15142 3

原创 ZOJ 2724Windows Message Queue

#include #include #include #include using namespace std; struct Message { char Name[100]; int Date; int Priority; bool operator <(const Message &a)const { return a.Priority<Priority; } }; prio

2012-07-15 13:31:05 1066

原创 ZOJ2722Head-to-Head Match

#include #include #include using namespace std; int main() { //ifstream cin("acmilan.txt"); double i,n,count; while(cin>>n) { if(n==0) break; count=0; for(i=0;i<32;i++) { if(pow(2,i)

2012-07-14 14:22:22 994

原创 ZOJ 2727List the Books

#include #include #include #include #include using namespace std; struct Book { string Name; int Year; int Price; }; bool CompName(const Book &b1,const Book &b2) { if(b1.Name!=b2.Name) return b

2012-07-14 14:13:21 620

原创 ZOJ 2109 FatMouse' Trade

#include #include #include #include using namespace std; struct Mouse { double J; double F; double a; }; bool Comp(const Mouse &d1,const Mouse &d2) { if(d1.a!=d2.a) return d1.a>d2.a; else ret

2012-07-14 13:55:48 683

原创 ZOJ 1205 Martian Addition

#include #include #include #include #include using namespace std; int main() { //ifstream cin("acmilan.txt"); string sa,sb,t; vectorv; int i; int a,b,sum; int flag; while(cin>>sa>>sb) { flag

2012-07-14 13:28:17 665

原创 .net 使用打印

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using System.Drawing;

2012-07-13 16:33:28 461

原创 Hdoj 1379 DNA Sorting

#include #include #include #include #include using namespace std; bool comp(const string &s1,const string &s2) { int i,j,k,m,n; int c1=0,c2=0; for(i=0;i<s1.size();i++) { for(j

2012-07-13 15:08:36 554

原创 ZOJ Problem Set - 1949 Error Correction

#include #include using namespace std; int matrix[100][100]; int SL[100]; int SC[100]; int main() { //ifstream cin("acmilan.txt"); int i,j,PL,PC,CountL,CountC; int n; while(cin>>n) { if(n==0)

2012-07-13 15:06:48 458

原创 .net 操作键盘和鼠标

1.首先在Form1的构造函数中加入如下事件             this.MouseClick += new System.Windows.Forms.MouseEventHandler(this.Form1_MouseClick);             this.MouseMove +=new System.Windows.Forms.MouseEventHandler(F

2012-07-12 17:38:02 1175

转载 对KMP算法的理解

KMP算法是一种高效的模式匹配算法,复杂度可以达到O(m+n),而普通模式匹配算法的复杂度为O(m*n)。 普通模式匹配算法   从主串的第一个字符(或者给定的第pos个字符)开始和子串的第一个字符开始比较,若相等,则继续比较后面的字符。若不相等,则从主串本次开始比较的字符的下一个字符开始,与子串的第一个字符进行比较(即主串需要回退到本次比较开始字符的下一字符,模式串回退到首字符,主串

2012-05-20 00:38:07 431

原创 hdoj1710Binary Tree Traversals

Binary Tree Traversals Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1406    Accepted Submission(s): 655 Problem Description A bina

2012-05-19 20:58:07 1953

原创 hdoj2540

遮挡判断 Time Limit: 10000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 556    Accepted Submission(s): 160 Problem Description 在一个广场上有一排沿着东西方向排列的石柱子,阳光

2012-05-19 13:40:57 766

原创 最小生成树(克鲁斯卡尔方法)

#include #include #define M 20 #define MAX 20 typedef struct {      int begin;      int end;      int weight; }edge; typedef struct {      int adj;      int weight; }AdjMat

2012-05-12 18:44:59 1290

原创 数据结构运算符作业

#include #include #include #define NULL 0 #define OK 1 #define ERROR -1 #define STACK_SIZE 100 #define STACKsize 20 /*定义字符类型栈*/ typedef struct{  int stacksize;  char *base;  char *top; }S

2012-05-12 18:43:19 2111

原创 二叉树的遍历(递归方法)

#include #include using namespace std; typedef struct np{  int date;  struct np *left,*right; } node; node *create(void) {  return ((node*)malloc(sizeof(node))); } node *t(node *a,int d)/

2012-05-12 17:33:55 501

ACM算法模版

一. 常用函数与STL 二. 重要公式与定理 三. 大数模板 四. 数论算法 五. 图论算法 1. 最小生成树(Kruscal算法) 2. 最小生成树(Prim算法) 3. 单源最短路径(Bellman-ford算法) 4. 单源最短路径(Dijkstra算法) 5. 全源最短路径(Folyd算法) 6. 拓扑排序 7. 网络预流和最大流

2013-03-09

hduacm2539代码

acm代码,关键使用了strcmp函数以及结构体

2012-02-23

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除