- 博客(7)
- 资源 (5)
- 收藏
- 关注
原创 链表的冒泡排序
#include #include #include #define LEN sizeof(struct list) struct list { int data; struct list *next; }; int n; struct list*creat(int n) { int i; struct list *head; struct list *p1,*p2; p1=p2=(s
2013-07-25 19:22:47
939
原创 next函数与kmp模板
#include #include using namespace std; int next[50005]; char s[50005],t[50005]; void getnext() { int i=0,j=-1; next[0]=-1; int len=strlen(s); while(i<len) { if(
2013-07-25 16:47:21
1158
原创 hdu2100
Problem Description XYZ-26进制数是一个每位都是大写字母的数字。 A、B、C、…、X、Y、Z 分别依次代表一个0 ~ 25 的数字,一个 n 位的26进制数转化成是10进制的规则如下 A0A1A2A3…An-1 的每一位代表的数字为a0a1a2a3…an-1 ,则该XYZ-26进制数的10进制值就为 m = a0 * 26^(n-1) + a1 * 26^(n-
2013-07-22 00:28:25
924
原创 大数相加模板
#define max 3000+3 char c[max],str1[max],str2[max]; void jia(char str1[],char str2[],char sum[]) { int i,j,k,z; z=0; k=0; for(i=strlen(str1)-1,j=strlen(str2)-1;i>=0||j>=0;i--,j-
2013-07-21 17:40:31
920
原创 hdu1002
Problem Description I have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B. Input The first line of the input contains an integer T(1<=T<
2013-07-20 22:00:17
1217
原创 hdu1097
Problem Description lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this BT problem,so lcy makes the problem easier than begin.
2013-07-20 11:43:52
1086
原创 hdu1108
Problem Description 给定两个正整数,计算这两个数的最小公倍数。 Input 输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数. Output 对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。 Sample Input 10 14 Sample Output 70
2013-07-20 11:11:38
957
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人