自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(32)
  • 收藏
  • 关注

原创 C#小练习

将百分制转化为五分制,若输入的百分制成绩超出0-100,程序抛出异常需要用户自定义异常类OverflowRange,通过Throw new OverflowRange来实现结果如图示:代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;name

2016-04-27 20:46:12 1912

原创 C#

字符串的操作:结果如图示:代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _3._4字符串操作{ class Program { static void Main(string[] args)

2016-04-27 11:23:25 344

原创 fzu 2111 Min Number 搜索

J - Min NumberTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice FZU 2111DescriptionNow you are given one non-negative

2016-04-26 16:37:15 357

原创 fzu 2110 star 结构体

DescriptionOverpower often go to the playground with classmates. They play and chat on the playground. One day, there are a lot of stars in the sky. Suddenly, one of Overpower’s clas

2016-04-26 14:13:20 423

原创 YT 督促训练 fzoj 2012Solve equation 各种进制转换为10进制

A - Solve equationTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice FZU 2102DescriptionYou are given two positive int

2016-04-25 17:42:29 277

原创 C#字符串单词个数某个字符的个数反序大写

要求如图:代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace _3._4字符串操作{ class Program { static void Main(string[] args)

2016-04-22 20:22:12 631

原创 c#创建静态类,定义泛型方法,实现元素查找

如图示:代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Collections;namespace 六4{ class Program { static void Main(

2016-04-22 17:00:33 666

原创 二叉树的各种基本操作运算多文件组织

如图测试用例:  代码:#include #include #includeusing namespace std;typedef char ElemType;#define MaxSize 100typedef struct node{ ElemType data; struct node *lchild; str

2016-04-22 11:57:13 690

原创 数据结构以孩子兄弟链存储的树的高度

运行结果:代码:#include #include typedef char ElemType;typedef struct tnode{ ElemType data; //节点的值 struct tnode *hp; //指向兄弟 struct tnode *vp; //指向孩子节点} TSBNode;int Tre

2016-04-22 10:13:18 3371

原创 数据结构求一个矩阵的马鞍点

马鞍点就是本行中最小的但是本列中最大的数如图:代码:#include #include#includeusing namespace std;#define M 4#define N 4int minn[M],maxx[N];void MinMax(int A[M][N])///M行中最小,N列中最大{ int i,j; bool have=fals

2016-04-21 20:31:45 15158 1

原创 稀疏矩阵的各种基本运算并加法乘法

代码:#include #include#includeusing namespace std;#define M 4#define N 4#define MaxSize 100typedef int ElemType;typedef struct{ int r; int c; ElemType d;///元素值} TupNode; ///三元组定义

2016-04-21 19:41:52 7730 2

原创 sdut 2886 Weighted Median 结构体

Weighted MedianTime Limit: 2000MS Memory limit: 65536K 题目描述For n elements x1, x2, ..., xn with positive integer weights w1, w2, ..., wn. The weighted median is the element xk satisfyin

2016-04-20 12:43:35 464

原创 sdut 2883 Hearthstone II (第二类Stiring数)

Hearthstone IITime Limit: 2000MS Memory limit: 65536K 题目描述The new season has begun, you have n competitions and m well prepared decks during the new season. Each competition you coul

2016-04-20 11:44:36 460

原创 sdut 2882 完全二叉树两结点之间的最小距离

Full Binary TreeTime Limit: 2000MS Memory limit: 65536K 题目描述In computer science, a binary tree is a tree data structure in which each node has at most two children. Consider an infin

2016-04-19 17:39:02 1190 2

原创 省赛五1愤怒的小鸟积分求面积

angry_birds_again_and_againTime Limit: 2000MS Memory limit: 65536K 题目描述The problems called "Angry Birds" and "Angry Birds Again and Again" has been solved by many teams in the series

2016-04-19 16:11:54 379

原创 rescue the princess 省赛四1

Rescue The PrincessTime Limit: 1000MS Memory limit: 65536K 题目描述    Several days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the princess, a

2016-04-19 16:04:15 342

原创 HDOJ 2192多重背包 01背包模板

Input输入数据首先包含一个正整数C,表示有C组测试用例,每组测试用例的第一行是两个整数n和m(1<=n<=100, 1<=m<=100),分别表示经费的金额和大米的种类,然后是m行数据,每行包含3个数p,h和c(1<=p<=20,1<=h<=200,1<=c<=20),分别表示每袋的价格、每袋的重量以及对应种类大米的袋数。Output对于每组测试数据,请输出能够购买大米

2016-04-15 11:36:37 346

原创 字符串KMP小结

一:返回模式串在主串的下标BF与KMP与KMP1#include #include#includeusing namespace std;#define MaxSize 100int next[MaxSize];int nextval[MaxSize];typedef struct{ char data[MaxSize]; int length;} SqS

2016-04-13 11:06:00 282

原创 输出顺序串中最长的重复子串

结果如图:代码:#include#include#include#include"list.h"using namespace std;SqString *MaxSubStr(SqString s){ int index=0,length=0,length1,i=0,j,k; while(i<s.length) { j=i+1;

2016-04-12 17:25:08 420

原创 数据结构之我的算法库---多文件组织

看了贺老的博客,重新拾起了多文件组织

2016-04-12 15:50:57 385

原创 数据结构上机4.4字符串映射加密解密

代码:#include #include#include#includeusing namespace std;#define MaxSize 100typedef struct{ char data[MaxSize]; int length;} SqString;SqString A,B;void StrAssign(SqString &s,char cs

2016-04-12 15:14:29 1183

原创 sdut 2409 dp 打表 结构体

The Best Seat in ACM ContestTime Limit: 1000MS Memory limit: 65536K 题目描述Cainiao is a university student who loves ACM contest very much. It is a festival for him once when he att

2016-04-08 19:19:53 343

原创 sdut 2413 字符加密

n a^o7 !Time Limit: 1000MS Memory limit: 65536K 题目描述 All brave and intelligent fighters, next you will step into a distinctive battleground which is full of sweet and happiness. If

2016-04-08 10:02:40 436

原创 山东省赛Identifiers 之getchar()的使用

IdentifiersTime Limit: 1000MS Memory limit: 65536K 题目描述 Identifier is an important concept in the C programming language. Identifiers provide names for several language elements, such

2016-04-06 13:32:52 330

原创 山东省赛二组合数dp

Binomial CoeffcientsTime Limit: 1000MS Memory limit: 65536K 题目描述 输入 输出 示例输入31 110 2954 723示例输出1453557658C语言中int类型上线跟机器位数有关16位机器准确说是16位编译器是:-32768~3276732

2016-04-06 11:15:55 238

原创 N皇后问题递归回溯

N皇后问题Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 32768/32768K (Java/Other)Total Submission(s) : 20   Accepted Submission(s) : 9Font: Times New Roman | Verdana | GeorgiaFont Si

2016-04-05 14:56:49 601

原创 YD 督促训练 判断这年五一几天假期

May Day HolidayTime Limit: 2 Seconds      Memory Limit: 65536 KBAs a university advocating self-learning and work-rest balance, Marjar University has so many days of rest, including holidays a

2016-04-03 16:24:22 495

原创 YD 督促训练 lunch time(结构体)

Lunch TimeTime Limit: 2 Seconds      Memory Limit: 65536 KBThe 999th Zhejiang Provincial Collegiate Programming Contest will be held in Marjar University. The canteen of Marjar University is m

2016-04-03 15:42:59 470

原创 第5周YD督促训练 Ace of Aces

DescriptionThere is a mysterious organization called Time-Space Administrative Bureau (TSAB) in the deep universe that we humans have not discovered yet. This year, the TSAB decided to elect an ou

2016-04-03 15:00:43 598

原创 省赛一Ballons dfs

Balloons Time Limit: 1000MS Memory limit: 65536K 题目描述Both Saya and Kudo like balloons. One day, they heard that in the central park, there will be thousands of people fly balloons to p

2016-04-01 20:39:14 353

原创 数据结构 顺序串的各种模式匹配算法

如图效果:#include #include#includeusing namespace std;#define MaxSize 100int next[MaxSize],nextval[MaxSize];typedef struct{ char data[MaxSize]; int length;} SqString;void StrAssign(Sq

2016-04-01 13:07:04 4892

原创 数据结构 顺序串的各种基本运算

#include #include#includeusing namespace std;#define MaxSize 100typedef struct{ char data[MaxSize]; int length;}SqString;void StrAssign(SqString &s,char cstr[]){ int i; for(i=

2016-04-01 10:32:57 4743

空空如也

空空如也

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

TA关注的人

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