自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

转载 八皇后问题-回溯法

void EightQueen(int *path,int k,int* count){ if (k==8) { for (int i=0;i<8;i++) { printf("(%d,%d) ",i,path[i]); } printf("\n"); (*count)++; return ; } for (int i =0 ;i<8...

2013-07-29 19:15:00 137

转载 2013.6.17大数计算之浮点数

#include <stdio.h>#include <string.h>void Swap(char &a,char &b){ char c =a; a =b; b = c;}void ReverseString(char *s){ int i=0; int j = strlen(s)-1; while (i<j)...

2013-06-17 23:27:00 183

转载 6.15判断数独

#include <stdio.h>#include <string.h>#define N 13int A[N][N];int tag[10];bool JudgeRow(){ for (int i=1;i<=9;++i) { memset(tag,0,sizeof(int)*10); for (int j=1;j<=9;...

2013-06-16 16:47:00 118

转载 6.15奇特大数加法

、代码如下:#include <stdio.h>#include <string.h>int buf[6]={0,2,3,5,7,11};void Swap(char &a,char &b){ char c=a; a=b; b=c;}void ReverseString(char *s){ int i=0; in...

2013-06-16 16:45:00 132

转载 6.15大数加法(十进制和十六进制)

#include <stdio.h>#include <string.h>void Swap(char &a,char &b){ char t = a; a =b; b = t;}void ReverseString(char *s){ int i=0; int j= strlen(s)-1; while (i<j...

2013-06-16 16:43:00 165

转载 2013.6.15 ISBN编号

#include <stdio.h>char str[20];int main(){ int sum; int end; while (scanf("%s",str)==1) { sum=0; sum+=((str[0]-'0')*1); sum+=((str[2]-'0')*2); sum+=((str[3]-'0')*3); sum+=...

2013-06-16 16:41:00 104

转载 2013.6.15吃果子问题

问题描述如下:代码 :#include <stdio.h>#define N 300int A[N];int main(){ int n,m; int step,pos; //记录第几步,当前位置 int count; //当前果子数目; int tag; //记录当前吃掉的果子 int lastPos; bool...

2013-06-16 16:40:00 108

转载 2013.06.14刘汝佳白书例题3-3-竖式计算

#include <stdio.h>#include <string.h>int main(){ char str[20]; char ss[100]; int count=0; scanf("%s",str); int abc,de,x,y,z; for (abc=111;abc<=999;abc++) { for (de = 11...

2013-06-16 16:37:00 139

转载 2013.6.14蛇形矩阵

#include <iostream>#include <string.h>using namespace std;#define MAX 100int A[MAX][MAX];void printMatrix(int n){ memset(A,0,sizeof(int)*MAX*MAX); int sum=0; A[0][0]=++sum...

2013-06-16 16:36:00 90

转载 日期之差

#include <iostream>#include <cstdio>using namespace std;int days[][2]={ 0,0, 31,31, 28,29, 31,31, 30,30, 31,31, 30,30, 31,31, 31,31, 30,30, 31,31, 30,30, 31,31};in...

2013-06-08 17:29:00 110

转载 字符串库函数

#include <iostream>using namespace std;int strlenn(const char* str){ int i=0; while (str[i]!=0) i++; return i;}int strcmp(const char* s1,const char* s2){ int len1=strlenn(s1); i...

2013-06-08 17:25:00 86

转载 排序算法

简单选择排序 #include <iostream>using namespace std;void swap(int &a,int &b){ int temp = a; a=b ; b=temp;}void choiceSort(int A[],int n){ for(int i=0;i<n-1;++i) { int...

2013-06-08 17:24:00 109

转载 数据结构实现

链表实现#include <iostream>#include <cstdlib>using namespace std;struct LNode{ int data; LNode* next;};typedef LNode* LinkedList;void creatLinkList(LinkedList &L){ L= ...

2013-06-08 17:16:00 134

转载 【数据结构C实现】1.顺序表实现

#include <stdio.h>#include<malloc.h>#define INIT_SIZE 100#define LIST_INCRE 10struct SqList{ int* pElem; int length; int listsize; };typedef struct SqList SqList;SqList L;i...

2013-04-24 21:45:00 165

空空如也

空空如也

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

TA关注的人

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