- 博客(13)
- 资源 (1)
- 收藏
- 关注

原创 疯狂Android讲义-----第一章 Android应用的基本组件介绍
1.1Activity和ViewActivity是Android应用中负责与用户交互的组件–大致可以把它想象成Swing编程中的JFrame控件。不过它与JFrame的区别在于:JFrame本身可以设置布局管理器,不断的向JFrame中添加组件,但Activity只能通过setContentView()方法显示指定组件。View组件式所有UI控件,容器控件的基类,View组件就是Android用户实
2016-08-17 17:48:08
735
原创 欧拉函数
#include #include #include #include using namespace std;int euler(int x){ int i, res=x; for (i = 2; i if(x%i==0) { res = res / i * (i
2015-05-17 12:51:51
285
原创 燕尾定理
燕尾定理:在三角形ABC中,AD,BE,CF相交于同一点O,有S△AOB∶S△AOC=BD∶CDS△AOB∶S△COB=AE∶CES△BOC∶S△AOC=BF∶AF因此图类似燕尾而得名。是五大模型之一,是一个关于平面三角形的定理,俗称燕尾定理。山东ACM省赛出现过一次燕尾定理的题
2015-05-15 12:31:35
2093
原创 博弈论-HDU-3951
DescriptionAfter hh has learned how to play Nim game, he begins to try another coin game which seems much easier. The game goes like this: Two players start the game with a circle of n coi
2015-05-11 16:38:23
507
原创 卡特兰数
题目1:矩阵的乘法添加括号我们知道,A*B可以,但是并不表示B*A也可以。假设有N+1个矩阵相乘,不能交换次序。只能用添加括号的方法来修改乘积的次序。那么有多少种添加括号的方法。H(n)种。 题目2:出栈次序问题,一个栈,其进栈的序列是从1~n,那么有多少种不同的出栈序列。解:n 个元素进栈和出栈,总共要经历 n 次进栈和 n 次出栈。这就相当于对这
2015-04-30 16:36:55
348
原创 划分树求一个数列任意区间的第k小值
#include #include #include using namespace std; #define N 100500 #define MID ((l+r)>>1) int a[N],s[N],t[20][N],num[20][N],n,m; void Build(int c,int l,int r) { int lm=MID-l+
2015-04-30 16:04:30
373
原创 结构体排序
#include#include#include#include#include#includeusing namespace std;struct node{ long int qian; long int zhong; long int hou;};int cmp(node x,node y){ return
2015-04-22 21:45:26
290
原创 Greatest Number
Problem G Greatest Number Saya likes math, because she think math can make her cleverer. One day, Kudo invited a very simple game: Given N integers, then the players choose no more than four
2015-04-21 17:18:23
519
原创 弗洛伊德算法求最短路径
#include#include#define max 1000000000int d[1000][1000];int main(){int i,j,k,m,n;int x,y,z;scanf("%d%d",&n,&m); for(i=1;ifor(j=1;jd[i][j]=max; f
2015-04-21 11:18:18
400
转载 大数除法
#include #include #define MAXSIZE 1025void Div(char *str1, char *str2, char *str3){ int i1, i2, i, j, jj, tag, carry, cf, c[MAXSIZE]; int len1 = strlen(str1), len2 = strlen(str2), lend; char d
2015-04-21 11:10:21
525
原创 大数加法和减法
加法:void Add(char a[],char b[],char d[]){ char c[10001]; int lena=strlen(a),lenb=strlen(b); int i,j,len; len=lena>lenb?lena:lenb; len++; c[0]='\0'; for(i=1;i<=len;i++)c[i]=
2015-04-21 11:01:36
345
原创 大数乘法
DescriptionBulls are so much better at math than the cows. They can multiply huge integers together and get perfectly precise answers ... or so they say. Farmer John wonders if their answers are
2015-04-21 10:46:02
290
原创 POJ 2386 ----- Lake Counting
这是一个DFS的水题 就是找到所有的W, 把它赋值成一个别的符号, 然后递归就可以了不过要注意 边界, 可能会有超出边界的可能。Sample Input10 12W........WW..WWW.....WWW....WW...WW..........WW..........W....W......W...W.W.....WW.W.W.W.....W..W
2015-04-21 10:32:30
299
coco_annotations_minival.tgz
2019-12-07
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人