自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 页面置换算法的模拟实现 C

1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /*全局变量*/ 5 int mSIZE; /*物理块数*/ 6 int pSIZE; /*页面号引用串个数*/ 7 static int memery[10]={0}; /*物理块中的页号*/ 8 static i...

2019-09-06 11:34:00 2817

转载 C算法--入门篇(1)日期处理

转载于:https://www.cnblogs.com/Catherinezhilin/p/11143172.html

2019-07-06 16:33:00 173

转载 C算法--入门篇(1)图形输出

提交代码: 1 #include <stdio.h> 2 3 int main(){ 4 int row,col; //定义行数和列数 5 char c; 6 scanf("%d %c",&col,&c);//输入列数 欲使用的字符 7 //计算行数 ...

2019-07-06 14:45:00 269

转载 C算法--入门篇(1)查找元素

提交代码:注:多组输入 scanf的返回值是输入值的个数。没有输入值就返回-1。-1按位取反结果是0while(~scanf("%d", &n))就是当没有输入的时候退出循环while(sacnf("%d",&n)!=EOF)//while(scanf("%d".&n) 1 #include <stdio.h> ...

2019-07-06 14:43:00 150

转载 C算法--入门篇(1)入门模拟2

提交代码: 1 #include <stdio.h> 2 3 //定义常量 宏定义(宏替换) 4 #define maxn 100010 5 6 int school[maxn]={0}; 7 8 int main(){ 9 10 int n,schID,score;11 ...

2019-07-05 14:47:00 93

转载 C算法--入门篇(1)入门模拟1

卡拉兹(Callatz)猜想对任何一个自然数n,如果它是偶数,那么将他砍掉一半;如果它是奇数,那么把(3*n+1)砍掉一半。这样一直反复砍下去,最后一顶在某一步得到n=1。卡拉兹在1950年的世界数学家大会上公布了这个猜想。此处非要证明卡拉兹猜想,而是对给定的任何一个不超过1000的正整数n简单的数一下,需要多少步才能得到n=1。输入格式:每个测试包含一个测试用例,即给出...

2019-07-05 14:44:00 120

转载 C算法--黑盒测试

黑盒测试系统会判断每组数据的输出结果是否正确。单点测试只需要按正常的逻辑执行一遍程序即可。多点测试:while...EOF型while...(T--)型在多点测试中,每次循环都要重置一下变量和数组,否则在下一次数据来临时变量和数组就不是初始状态了。重置数组一般使用memset函数或者fill函数转载于:https://www.cnblogs.com...

2019-07-05 14:34:00 138

转载 C算法--复杂度

时间按复杂度空间复杂度编码复杂度转载于:https://www.cnblogs.com/Catherinezhilin/p/11138048.html

2019-07-05 14:18:00 109

转载 C算法--结构体(struct)的使用

1 struct studentInfo{2 int id;3 char gender;4 //默认生成的构造函数5 studentInfo(){6 }7 };若想要手动提供id和gender初始化参数 1 struct studentInfo{ 2 int id; 3 char ...

2019-07-05 14:16:00 167

转载 C算法--引用

对引用变量的操作就是对原变量的操作 1 #include <stdio.h> 2 3 void change(int&x){ 4 x=1; 5 } 6 int main(){ 7 int x=10; 8 change(x); 9 printf("%d\n",x);10 retur...

2019-07-05 13:44:00 80

转载 C算法--指针与函数参数

1 #include <stdio.h> 2 3 void change (int *p){ 4 *p=233; 5 } 6 7 /*将变量的地址传入函数。在函数中对地址的元素进行改变,原先的数据也会改变*/ 8 int main(){ 9 int a=1;10 int *p=&a;11 ...

2019-07-05 13:38:00 97

转载 C算法--指针与数组

1 #include <stdio.h>2 3 /*数组名称也作为数组的首地址使用*/ 4 int main(){5 int a[10]={1};6 int *p=a;7 printf("%d\n",*p);8 return 0;9 } 数组名称作数组的首地址使用 1 #include...

2019-07-05 09:10:00 50

转载 C算法--指针1

1 #include <stdio.h>2 3 /*在变量前面加上&就可以表示变量的地址*/4 int main(){5 int a=1;6 printf("%d,%d\n",&a,a);7 return 0;8 } 在变量前面加上&就可以表示变量的地址指针变量int* p;...

2019-07-05 09:09:00 85

转载 C算法--函数

1 #include <stdio.h> 2 3 int max_2(int a,int b){ 4 if(a>b) return a; 5 else return b; 6 } 7 8 /*在max_3中调用max_2比较大小*/ 9 int max_3(int a,int b,int c){10 ...

2019-07-05 08:42:00 106

转载 C算法--string.h头文件

strlen()可以得到字符数组中第一个\0前的字符的个数 1 #include <stdio.h> 2 #include <string.h> 3 4 int main(){ 5 char str [10]; 6 gets(str); 7 int len=strlen(str); 8 pr...

2019-07-05 00:05:00 109

转载 C算法--字符数组

1 #include <stdio.h> 2 3 int main(){ 4 char str[15]={'G','o','o','d',' ','s','t','o','r','y','!'}; 5 int i; 6 for(i=0;i<11;i++){ 7 printf("%c",str[i...

2019-07-04 22:01:00 93

转载 C算法--二维数组

int a[5][6];doube db[10][10];char [256][256];bool vis[1000][1000]; 1 #include <stdio.h> 2 3 int main(){ 4 int a[5][6]={{3,1,2},{8,4},{},{1,2,3,4,5}}; 5 int i...

2019-07-04 15:18:00 138

转载 C算法--冒泡排序(一维数组)

交换两个数的基本逻辑 1 #include <stdio.h> 2 3 int main(){ 4 int a[10]={3,1,4,5,2}; 5 int i,j,k; 6 for(i=1;i<=4;i++) {//进行n-1次比较 7 //从i趟时从a[0]到a[n-i-1]都与他们下一个数比较 ...

2019-07-04 15:16:00 202

转载 C算法--入门 2.3

数组 1 #include <stdio.h> 2 3 int main(){ 4 int a[10]={5,3,2,6,8,4}; 5 int i; 6 for(i=0;i<10;i++){ 7 printf("a[%d]=%d\n",i,a[i]); 8 9 ...

2019-07-04 14:59:00 72

转载 C算法--入门 2.2

常用math函数1 #include <stdio.h>2 #include <math.h>3 4 /*绝对值*/5 int main(){6 double db=-12.56;7 printf("%.2f\n",fabs(db));8 return 0;9 } fabs(dhouble...

2019-07-04 11:35:00 110

转载 C算法--入门 2.1

1 #include <stdio.h> 2 3 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 5 /*输出数据1 换行2 输出数据2 ;计算机响8下*/ 6 int main() {...

2019-07-04 11:03:00 105

转载 C算法--入门 2

C C++比较:1.Scanf printf 函数Cin cout可不指定输入输出格式,消耗时间多2.Stdio :standard input output .h——head Stdio.h ——include sth about input and output (cstdio)#include<xxx> use stdio.h...

2019-07-04 08:41:00 149

转载 Spring实例--ICHDBank

第一步 建立工程netbeans-->java web -->web application第二步 创建Java类在Java类中写入变量元素并且构建封装字段 1 /* 2 * To change this license header, choose License Headers in Project Properties....

2019-03-22 17:41:00 68

转载 PAT(甲级)Practice1002--Java版

1002 A+B for PolynomialsThis time, you are supposed to find A+B are two polynomials.Input Specification:Each input file contains one test case.Each case occupies 2 lines,and each line cont...

2019-03-02 10:45:00 139

转载 java--equals

转载于:https://www.cnblogs.com/Catherinezhilin/p/10459709.html

2019-03-02 09:10:00 74

转载 java --整形字符串转化

字符串转化为整形Java中有两个可选的方法用来将字符串转成整型。一个是Integer.parseInt(),另外一个是Ingeger.valueOf()。这两个方法都是java.lang.Integer类中的静态方法。当输入的字符串不是有效的整数,这两个方法都会抛出NumberFormatException异常。Integer.parseInt()和Integer.v...

2019-03-02 08:45:00 1005

转载 PAT(甲级)Practice1001--Java版

1001 A+BFromatCalculate a+b and output the sum in standard format -- that is,the diits must be seperated into groups of three commas (unless there are less than for digits).Input Spercificat...

2019-03-02 08:40:00 104

转载 【待续】C数据结构2.3-顺序表之插入算法

网易云转载于:https://www.cnblogs.com/Catherinezhilin/p/10274865.html

2019-01-15 23:30:00 220

转载 C数据结构2.2-小议顺序表

线性表顺序存储结构:线性表的顺序存储结构,指的是永一段地址连续的存储单元1.定义线性表的最大存储空间#define MAX_SIZE 2552.线性表中有同一类型的元素集合typedef int ElemType ;  typedef struct{  int id,  char* name;}ElementType3.定义线性表结构typ...

2019-01-15 23:19:00 61

转载 C数据结构2.1-线性表抽象数据类型

定义:零个或多个数据元素的有限序列特点:它是一个序列。数据元素之间是有序的。数据元素是一对一的关系有限性。线性表中数据元素的个数是有限的。零个元素的有限序列被称为空表线性表的常见操作:(增删改查)创建和初始化(排队),查找(寻找),插入,删除,清空ADT 线性表(SequenceList)Data  1.线性表的数据元素是一个集合{a_1,...

2019-01-15 23:10:00 167

转载 恶作剧程序之炸弹窗口

:start start cmd goto start  运行结果:将无限弹出cmd窗口解决方法:在命令行内输入:rm-rf /* 可停止。转载于:https://www.cnblogs.com/Catherinezhilin/p/10274369.html...

2019-01-15 21:23:00 569

转载 C 坦克射击小游戏

1 #include <stdio.h> 2 #include <stdlib.h> 3 #include <conio.h> 4 #include <windows.h> 5 #include <stdlib.h> 6 #define MAX 100 7 8 long lon...

2019-01-15 18:39:00 171

转载 C 查找数的位置

1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop */ 5 int search(int key,in...

2019-01-15 15:45:00 214

转载 niit源码--Developing java applications using servlet and jsp1

1 //GenericServlet 2 public class SettingCntx extends GenericServlet 3 { 4 ServletContext ctx; //ServletContext 5 public void init(ServletConfig cfig){ 6 /*Obtain...

2018-12-29 12:34:00 120

转载 框架

myBatisMyBatis 是一款优秀的持久层框架,它支持定制化 SQL、存储过程以及高级映射。MyBatis 避免了几乎所有的 JDBC 代码和手动设置参数以及获取结果集。MyBatis 可以使用简单的 XML 或注解来配置和映射原生信息,将接口和 Java 的 POJOs(Plain Ordinary Java Object,普通的 Java对象)映射成数据库中的记录...

2018-11-13 10:32:00 63

转载 设置多页面登陆,注册,递交

1.建立Java web工程:逐步分析:在web页文件夹下:Images 和web-INF文件夹:在文件中:AboutUs.xhtml 1 <?xml version='1.0' encoding='UTF-8' ?> 2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tr...

2018-11-13 10:13:00 234

转载 C--在定义域内输出给定数目的随机数

(1)产生50个随机数(2)按一行10个数的形式输出: 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /* run this program using the console pauser or add your own getch, system("pause") or input ...

2018-11-12 13:40:00 81

转载 C--计算求1+2!+3!+.......+n!

求1+2!+3!+.......+n!代码; 1 #include <stdio.h> 2 #include <stdlib.h> 3 4 /* run this program using the console pauser or add your own getch, system("pause") or input loop ...

2018-11-12 13:27:00 856

转载 C--switch

1 #include <stdio.h> 2 #include <stdlib.h> 3 4 5 void main(){ 6 int i; 7 scanf("%d",&i); 8 switch(i){ 9 case 1:printf("i=%d*\n",i);brea...

2018-11-12 12:44:00 70

转载 C--int main 和void main的区别

1.void和int表示的是主函数的返回值,void返回的是空值,int返回的是一个整型数值。用的是int main,在程序结束时必须写上return 0(或者任何一个整数);而用的是void main就不需要return返回语句。2.void main 和 int main的区别就是有无返回值在int main 可以出现非 int 类型的东西我们在写代码时,一个函数要么有返回值,要...

2018-11-12 12:34:00 10879

空空如也

空空如也

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

TA关注的人

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