- 博客(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
15384
1
原创 ZOJ 2724Windows Message Queue
#include#include#include#includeusing 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
1089
原创 ZOJ2722Head-to-Head Match
#include#include#includeusing 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
1007
原创 ZOJ 2727List the Books
#include#include#include#include#includeusing 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
637
原创 ZOJ 2109 FatMouse' Trade
#include#include#include#includeusing 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
700
原创 ZOJ 1205 Martian Addition
#include#include#include#include#includeusing 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
677
原创 .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
478
原创 Hdoj 1379 DNA Sorting
#include#include#include#include#includeusing 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
576
原创 ZOJ Problem Set - 1949 Error Correction
#include#includeusing 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
477
原创 .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
1203
转载 对KMP算法的理解
KMP算法是一种高效的模式匹配算法,复杂度可以达到O(m+n),而普通模式匹配算法的复杂度为O(m*n)。普通模式匹配算法 从主串的第一个字符(或者给定的第pos个字符)开始和子串的第一个字符开始比较,若相等,则继续比较后面的字符。若不相等,则从主串本次开始比较的字符的下一个字符开始,与子串的第一个字符进行比较(即主串需要回退到本次比较开始字符的下一字符,模式串回退到首字符,主串
2012-05-20 00:38:07
447
原创 hdoj1710Binary Tree Traversals
Binary Tree TraversalsTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1406 Accepted Submission(s): 655Problem DescriptionA bina
2012-05-19 20:58:07
1971
原创 hdoj2540
遮挡判断Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 556 Accepted Submission(s): 160Problem Description在一个广场上有一排沿着东西方向排列的石柱子,阳光
2012-05-19 13:40:57
777
原创 最小生成树(克鲁斯卡尔方法)
#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
1307
原创 数据结构运算符作业
#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
2137
原创 二叉树的遍历(递归方法)
#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
517
ACM算法模版
2013-03-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人