`
hellojyj
  • 浏览: 59068 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论
文章列表
Android开发---xml布局文件中的常见属性总结 android:id="@+id/aa"意思就是设置这个控件的id为aa,“+”表示把这个id注册到gen/.../R.java中,方便到代码中用R.id.aa进行调用。 android:text="@string/aa"意思是将控件的文本信息设 ...
/** ########################## 0/1 背包问题 ####################################### <=动态规划方程===========================================================> f[i][V] 表示当背包总共容量为V的情况下,放i件物品所能获得的最大价值 f[i][V] = max { f[i-1][V], f[i-1][V-w[i]]+p[i] } <======== ...
/** 棋盘覆盖问题 伪代码: chessBoard(int tr,int tc,int dr, int dc,int size) { if(size == 1) return; int s = size/2; int t = tile++; if (dr,dc) in top left then chessBoard(tr,tc,dr,dc,s) else board[tr+s-1][tc+s-1 ...
/** 二路归并排序 */ #include<cstdio> //待排序测试的数组 int arry[] = {7,11,9,15,18,22,0,1,102,18,19}; void mergeSort(int arr[],int s,int t); void myMerge(int arr[],int s,int m,int t); void printArr(int arr[],int s, int t); int main() { printf("Before merge-sorting the array ...
/** 将数组分成1/3和2/3大小不等的两部分的二分检索算法 <==算法复杂度分析===== 最坏情况(可以利用判定树来求):(2/3)^time = n , time = O(log2/3 n); 最好情况:O(1); ======================> */ #include<cstdio> #define NOTFOUND 555555555 //二分检索都需要排好序的数组 int sortedArr[] = {5,7,9,10,11,12,18,22,28}; ...
  Ubuntu14.04解决ab devices ???????????? no permissions   使用adb devices 出现如下: List of devices attached ???????????? no permissions 同时在DDMS中显示设备名也显示????????????,也无法显示进程名,无法查看log。 解决方法: 1、设置usb权限 因为ubuntu这样的系统都是默认以非root身份在运行的,要使用usb调试,需要sudo支持。
Linux下Android开发真机调试   04 December 2011   Linux 环境是这样的 android sdk r15 sun-java-sdk ubuntu 11.10 eclipse 3.6(感觉3.7的eclipse很不靠谱,建议大家暂时不要升级,我adt都安装不上去,dependency有问题,后来用的3.6的软件源。。,我的笔记本上是3.7的eclipse,今晚去试试3.7的真机调试。) Moto defy 2.3.4 miui(临时借过来的) 手机上已经设置好了,允许未知来源、USB调试等,这里moto的usb连接方式选择的 ...
1.首先用命令free查看系统内 Swap 分区大小。free -mtotal used free shared buffers cachedMem: 1002 964 38 0 21 410-/+ buffers/cache: 532 470Swap: 951 32 929可以看到 Swap 只有951M,不符合 Oracle-xe-client 的安装要求。2.创建一个 Swap 文件。mkdir swapcd swapsudo dd if=/dev/zero of=swapfile bs=1024 count=100000出现下列提示,上面命令中的 count 即代表swap文件大小。记 ...
1.首先打开终端 ctrl +alt +t; 2.然后cd 待安装run文件的目录 3.chomd +x ./文件名.run 4.sudo ./文件名.run    
1.首先打开终端 ctrl +alt +t; 2.然后cd 待安装run文件的目录 3.chomd +x ./文件名.run 4.sudo ./文件名.run     这里我以Ubuntu14.04为例安装 myeclipse-2015-2014-07-11-offline-installer-linux.run   步骤一:   步骤二:       步骤三:   步骤四:(这里要你输入密码,你输入密码的时候是不会显示出来的,输去就是了,输完Enter就行)   步骤五,运行完成
原题传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1698   Just a Hook Time Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17134    Accepted Submission(s): 8555 Problem Description In the game of DotA, Pudge’s meat hook is actually the most horrib ...
void build(int r,int L,int R) { if(L==R) sum[1] = 1; else{ int M = (L+R)/2; build(r*2,L,M); build(r*2+1,M+1,R); sum[r] = sum[r*2] + sum[r*2+1]; } } void push_up(int r,int L,int R) { if(lazy[r]>0) { sum[r] = lazy[r]*(R-L+1 ...
原题传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1754   I Hate It Time Limit: 9000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 38000    Accepted Submission(s): 15035 Problem Description 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少。这让很多学生很反感。不管你喜不喜欢,现在需要你做的 ...

线段树模板

int Max[MAXN]; //子区间中的最大值 int ql,qr,p,v; //ql:查询左边界,qr:查询右边界,p:更新点 v:更新值 //建立线段树 void build(int r,int L,int R) { //如果到了叶节点(区间长度为1),最大值当然是叶节点值; if(L==R) scanf("%d",Max+r); else { int M = (L+R)/2; build(r*2,L,M); //递归建立左子树 ...

COJ 1004 Xi and Bo

    博客分类:
  • ACM
原题传送门:http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1004 1004: Xi and Bo Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 275  Solved: 95[Submit][Status][Web Board] Description Bo has been in Changsha for four years. However he spends most of his time staying his small dormitory. One day he ...
Global site tag (gtag.js) - Google Analytics