贪心算法-装载问题

#include<conio.h>#include<string>using namespace std;typedef struct goods /*物品结构信息*/{ int goodsNo; /*物品编号*/ struct goods *link; /*另一个物品的指针*/}GOODS;typedef struct box /*箱子结构信息*/{ int remain_space; /*箱子的剩余空间*/ GOODS * head; /*箱内物品链表的头指针*/ struct box *next; /*箱子链表的后继箱子指针*/}B...
默认分类 | 2011-12-17 22:18 | 阅读 986 次 | 评论 0 条

求最长公共子子序列

#include <iostream>#include <string>using namespace std;//主函数int main(){ int m,n; char *x,*y; int **b,**c; void LCSLength(int m,int n,char *y,char *x,int **c,int **b); void LCS(int i,int j,char *x,int**b); cout<<"请输入两个序列的长度:"<<endl; cin>>m>>n; x=new char[m]; y=new char[n]; cout<<"请输入两个序列:"<<endl;...
C/c++语言 | 2011-12-17 22:16 | 阅读 844 次 | 评论 0 条

二分搜索排序法

#include<iostream>using namespace std;int BinarySeach(int a[],int&amp; x,int n){int left=0;int right=n-1;while(left<=right){int middle=(left+right)/2;if(x==a[middle])return middle;if(x>a[middle])left=middle+1;else right=middle-1;}return -1;}int main(){cout<<"请输入数字个数,小于50个:"<<endl;int n; while(cin...
C/c++语言 | 2011-12-17 22:14 | 阅读 692 次 | 评论 0 条

用c语言编写的简单图形输出

1:#include<iostream> using namespace std; int main() { int i,j,k,n; cout<<"请输入n的值:"; cin>>n; for (i=1;i<=n;i++) { if (i<=n/2) { for (j=1;j<=n/2+1-i;j++) cout<<" "; for (k=1;k<=2*i-1;k++) cout<<"*"; cout<<endl; } else { for (j=1;j<=i-n/2-1;j++) cout<<" "; for (k=1;k<=(2*(n...
C/c++语言 | 2011-07-01 14:40 | 阅读 1347 次 | 评论 0 条

网页设计代码大全

1)贴图:<img src="图片地址"> 2)加入连接:<a href="所要连接的相关地址">写上你想写的字</a> 3)在新窗口打开连接:<a href="相关地址" target="_blank">写上要写的字</a> 消除连接的下划线在新窗口打开连接: <a href="相关地址" style="text-decoration:none" target="_blank">写上你想写的字</a> 4)移动字体(走马灯):<marquee>写上你想写的字</marquee> 5)字体加粗:<b>写上你想写的字</b> 6)字体斜...
网页设计 | 2011-07-01 14:35 | 阅读 812 次 | 评论 0 条

java

import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JButton;import javax.swing.JFrame;import javax.swing.JTextField;class Stack_Float { float nums[]; int top; Stack_Float() { nums = new float[50]; top = -1; } boolean IsEmpty() { if (top == -1) return t...
默认分类 | 2010-12-28 21:11 | 阅读 684 次 | 评论 0 条

java

//import java.awt.Button;import java.awt.Color;import java.awt.Rectangle;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.FocusEvent;import java.awt.event.FocusListener;import java.awt.event.KeyEvent;import java.awt.event.KeyListener;import java.awt.eve...
默认分类 | 2010-12-28 21:09 | 阅读 791 次 | 评论 0 条

2010年12月英语四级听力场景常见词汇

2010年12月英语四级听力学校场景常见词 课程分类 Optional course 选修课 2010年12月英语四级听力交通运输常见词汇 fare 车票 licence 驾照 rush hours 高峰时间 traffic jam 交通堵塞 overtake 超车 one way street 单行道 over speed 超速 police officer 交警 ticket 罚单 fine 罚金 fast way /express way/ high way 高速公路 motor way...
默认分类 | 2010-10-18 22:54 | 阅读 1060 次 | 评论 0 条

英语四级作文:青春寄语

Youth Youth is not a time of life; it is a state of mind; it is not a matter of pink cheeks, red lips and flexible knees; it is a matter of will, a quality of imagination, a vigor of the emotion;it is the freshness of the deep springs of life. Youth means a dispositional control ...
默认分类 | 2010-10-18 22:44 | 阅读 891 次 | 评论 3 条

英语四级作文:我的爱好

My Favorite Hobby 1.我有许多爱好,其中我最喜欢读书。 2.我喜欢读书有三个原因。 3.读书已经成为我生活的一部分。 I have many hobbies, such as reading, skating, and watching TV. But reading is my favorite hobby. I like reading for three reasons. First of all, books introduce me to a new world, which is colourful and withou...
默认分类 | 2010-10-18 22:42 | 阅读 941 次 | 评论 0 条

从跌倒的地方站起来《英文版》演讲稿

Let’s stand up from where we fall down All the celebrations welcoming the new century were hold in the year 2007, because life without a greeting is like the sky without the sun.Greetings are very important for the whole world,in my opinion. But I don't know whether greetings are enough fo...
默认分类 | 2010-10-18 22:40 | 阅读 797 次 | 评论 0 条

2010年12月六级经典句型分析与背诵

长难句练习: 1.They were fined a total of just over &pound;116 million as part of a leniency deal offered by the watchdog to companies that owned up quickly to anti-competitive behaviour. 2.The National Consumer Council gave warning that the admissions would dent consumer confidence in leading hi...
默认分类 | 2010-10-18 22:36 | 阅读 679 次 | 评论 0 条

英语四级训练808题

窗体顶端 窗体底端 模拟试卷 考试时间:120分钟 满分:710 分 2010英语四级新试题804 目 窗体顶端 Part I Writing 作文题 Directions: For this part, you are allowed 30 minutes to write a short essa...
默认分类 | 2010-10-18 22:29 | 阅读 1206 次 | 评论 1 条

大学英语四级真题《College English Mode》

l Test Two —Band Four— Part ⅠWriting(30 minutes) Directions: For this part, you are allowed thirty minutes to write a composition on the topic: Colleges Have Opened Their Doors Wider. You should write at least 120 words, and base your composition on the outline given in Chinese below: 1. ...
默认分类 | 2010-10-18 22:21 | 阅读 785 次 | 评论 0 条

用html写的自动跳转程序

<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>正在进入</title></head><body><form name=loading>  <p align=center> <font color="#0066ff" size="2">正在进入,请稍等</font><font color="#0066ff" size="2" face="Arial">...</font>  <input type=text name=chart size=46 style="...
默认分类 | 2010-06-23 17:53 | 阅读 718 次 | 评论 0 条

一个简单的登陆程序《htnl》

<html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><title>新用户注册</title><style>body,td{font-size:12px}.bk {color: #f78d00; border:1px #f78d00 solid;}.Tips_bo {FONT-FAMILY: "Arial", "宋体";BORDER: 0px #f78d00 solid; FONT-SIZE: 12px; COLOR: #f78d00; text-decoration: non...
默认分类 | 2010-06-23 17:44 | 阅读 785 次 | 评论 0 条

html搬的个人简历

<html> <head> <title>个人简历表</title> </head> <body> <table border="1" cellpadding="3" cellspacing="3" align="center" bgcolor="#548751"> <tr align="center" > <td align="center" colspan="5"> <font size="+3"><b>个人基本简历</b></font...
默认分类 | 2010-06-23 16:28 | 阅读 851 次 | 评论 0 条

超级网站大全(看了包你终身受用)!!没事多去看看

论 文 在线网[http://www.lwzx.net(论文下载,大量免费资源) 论 文 帝国[http://www.papersempire.com(论文资源) 论 文 资料网[http://www.51paper.net(各专业论文下载) 论 文 快车网[http://www.lun-wen.com(各专业论文下载) 毕 业 论文网[http://www.bylw.com(论文发表等,不错的地方) 专 业 论文网[http://www.dtzcb.net/lunwen(专业论文下载,职称考试) 大学生论文库[http://www.syiae.com/lunwen(看看吧挺好) 轻...
默认分类 | 2010-06-22 11:38 | 阅读 1034 次 | 评论 2 条

一次多项式的相加《c语言》

#include<stdio.h>#include<malloc.h>#include<stdlib.h>#define LEN sizeof(node) typedef struct polynode /*用单链表存储多项式的结点结构*/{ int coef; /*多项式的系数*/ int exp; /*指数*/ struct polynode *next; /*next是struct polynode类型中的一个成员,它又指向 struct polynode类型的数据,以此建立链表*/}n...
默认分类 | 2010-06-22 11:26 | 阅读 1030 次 | 评论 0 条

教职工工资管理系统

#include <iomanip>#include <iostream>#include <fstream>#include <malloc.h>#include <stdlib.h>#include <string.h>#define NULL 0int const N=20;#define LEN sizeof(struct student)using namespace std; void Menu(); void Pass();int n=0; //定义一个全局变量统计职工人数 //——--------->定义一个职工信息的结构体struct stude...
默认分类 | 2010-06-22 11:08 | 阅读 1068 次 | 评论 16 条