现在位置: 首页 > xixi9992006发表的所有文章
  • 04月
  • 12日
综合 ⁄ 共 4003字 评论关闭
Rabbit Kingdom Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 964    Accepted Submission(s): 315 Problem Description   Long long ago, there was an ancient rabbit kingdom in the forest. Every rabbit in this kingdom was not cute but totally pugnacious, so the kingdom was in chaos in season and out of season.   n rabbits were numbered form 1 to n. All rabbits' weight is an integer. For some unknown reason, two rabbits would fight ......
阅读全文
  • 02月
  • 28日
综合 ⁄ 共 1348字 评论关闭
题目传送门:http://acm.hdu.edu.cn/showproblem.php?pid=4604 思路:这里我是以第一个放入的数为切入点,你要想这个数是一个分水岭,在它之前数都不比它大,之后的数都不比它小。那么在原数列中,那些“之前”的数就应该是它后面的一个非递增序列,那些“之后”的数则是非递减序列。这样,很容易就想到了LIS。当然最朴素的算法是n^2的,想想都知道超时了,所以这里采用二分的方法做,复杂度只有logn。这里的每一个点都要假设一次它是第一个点,从前往后找是不可能的,这里应从后往前找,就只要整体做一遍就可以,这里我选择的是把数组......
阅读全文
  • 01月
  • 01日
综合 ⁄ 共 3084字 评论关闭
在内核窥视用户态首先,环境:VMware Server上运行的ubuntu10.4,arch为x86_64。先看下面这个程序: #include <stdio.h> #include <stdlib.h> #include <string.h> int dataA; char bufA[1000]; int main() {         int dataB;         int i_GetChar;         char * bufB = NULL;         bufB = malloc(1500);         if (NULL == bufB)         {                 printf("malloc failed\n");                 return 0;         }         dataA = 0X55aa;   ......
阅读全文
  • 04月
  • 21日
综合 ⁄ 共 6373字 评论关闭
去年八月份写的一篇文章一不小心让我稍微火了一把,短短时间内在微博达到了上千的转发量,甚至连像搜狗首席执行官王小川这样的业界大佬都转发了那条微博。微博上面的声音有两派,一派是支持者,认为「这个年轻人很有想法」,另一个声音则对我的想法、行为提出了质疑,认为我贬低学术、太过浮躁。我原来在微软亚洲研究院系统组的老板对我的想法尤其不满,甚至对我进行了半公开的点名批评,并告诫其他在微软亚洲研究院的实习生不得浪费机会。 后来我了解到,我写这篇文章的时候是八月份,正好是个大互联网公司校园招聘开始的前夕。......
阅读全文
  • 03月
  • 31日
综合 ⁄ 共 6245字 评论关闭
    在main.xml中:   <LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:background="#000000">   <Button       android:id="@+id/but"       android:layout_width="50dp"       android:layout_height="fill_parent"       android:background="#3399ff"       android:textColor="#ffffff"       android:text="照相"/>   <SurfaceView       android:id="@+id/surface"       an......
阅读全文
  • 02月
  • 17日
综合 ⁄ 共 203字 评论关闭
     从今天开始为每周制定一个合理的计划,旨在合理安排时间,提高学习效率,每周天晚上为这周完成情况写总结、反馈。     本周任务:          1、整理前一段时间文献论文,写出总结打印出来          2、利用现有的纹理分析算法处理相关的图片          3、练听力、做阅读,记单词          4、读《道德经》,写心得,应用到生活中去,做阳光的自己       严以律己 ,求真务实! just do it !
阅读全文
  • 02月
  • 10日
综合 ⁄ 共 559字 评论关闭
    public static void writeToSdCard(String s) {         try {             File dst = new File("/sdcard/test_sensor/" + mName + ".txt");             File parent = dst.getParentFile();             if(!parent.exists()) {                 parent.mkdirs();              }             FileOutputStream outStream = new FileOutputStream(dst, true);             OutputStreamWriter writer = new OutputStreamWriter(outStream, "gb2312");             writer.write(s);             writer.write("\n");       ......
阅读全文
  • 02月
  • 07日
综合 ⁄ 共 406字 评论关闭
    问:今年年初的一次交通事故造成我右腿粉碎性骨折,花去医疗费近万元。因我投保了人身意外伤害保险,事故发生后,保险公司按约定给付了保险金。经交管部门认定,肇事者刘某承担事故的主要责任,于是我就要求刘某进行赔偿,他却以获得了保险赔付为由不予赔偿。请问:给付保险金后被保险人还能再向加害人要求赔偿吗?   答:即使你已获得保险金赔付,也可以要求加害人赔偿损失。《中华人民共和国保险法》第六十八条规定:“人身保险的被保险人因第三者的行为而发生死亡、伤残或者疾病等保险事故的,保险人向被保险人或者受益人......
阅读全文
  • 01月
  • 26日
综合 ⁄ 共 627字 评论关闭
/*时间差比较 *interval :D表示查询精确到天数的之差 interval :H表示查询精确到小时之差 interval :M表示查询精确到分钟之差 interval :S表示查询精确到秒之差 interval :T表示查询精确到毫秒之差 */ function dateDiff(interval, date1, date2) { var objInterval = {'D':1000 * 60 * 60 * 24,'H':1000 * 60 * 60,'M':1000 * 60,'S':1000,'T':1}; interval = interval.toUpperCase(); var dt1 = new Date(Date.parse(date1.replace(/-......
阅读全文
  • 01月
  • 13日
综合 ⁄ 共 435字 评论关闭
Description N个矩形,排成一排. 现在希望用尽量少的矩形海报Cover住它们. Input 第一行给出数字N,代表有N个矩形.N在[1,250000] 下面N行,每行给出矩形的长与宽.其值在[1,1000000000]2 1/2 Postering Output 最少数量的海报数. Sample Input 5 1 2 1 3 2 2 2 5 1 4 Sample Output 4  用单调栈水过了……根本不知道第一维的x有什么用 #include<iostream> #include<cstdio> using namespace std; int zhan[250001]; int top,a,n,sum; int main() { scanf("%d",&n); for (int i=1;i<=n;i++) { scanf("%d%d",&am......
阅读全文
  • 01月
  • 10日
综合 ⁄ 共 879字 评论关闭
一、网络地址及根目录可以进入后台编辑。 二、投票地址不对,进行编辑后保存即可。 三、增加栏目后要更新网站才能生效【其他操作类似】。 四、登录后一片白: 解决方法是: 找到include文件夹中的userlogin.class.php文件中 @session_register下的所有语句屏蔽掉。  / * @session_register($this->keepUserIDTag);* / $_SESSION[$this->keepUserIDTag] = $this->userID; / * @session_register($this->keepUserTypeTag);* / $_SESSION[$this->keepUserTypeTag] = $......
阅读全文
  • 01月
  • 09日
综合 ⁄ 共 1521字 评论关闭
用法: <div id="test">   <span style="color:red">test1</span> test2</div> 在JS中可以使用: test.innerHTML:   也就是从对象的起始位置到终止位置的全部内容,包括Html标签。   上例中的test.innerHTML的值也就是“<span style="color:red">test1</span> test2 ”。 test.innerText:    从起始位置到终止位置的内容, 但它去除Html标签    上例中的text.innerTest的值也就是“test1 test2”, 其中span标签去除了。 test.outerHTML:   除了包含innerHTML的全部内容外, 还包含对象......
阅读全文