摘要:
Graphs Two ingredients 1. vertices (nodes) v 2. edges(undirected or directed)Examples: road networks, the web, social networks The minimum Cut problem Input: undirected graph G = (V, E) (parallel edges allowed) Goal: compute a cut with fewest number of Crossing edges (a min cut) Sparse vs. Den...
阅读全文
posted @ 2013-08-02 23:10
you Richer
阅读(943)
推荐(0)
摘要:
了解更多:点击下载ROM和学习更多ROM版本HTC-one_OrDroid8.2.6ROM作者雪狼团队·大盛 http://weibo.com/DaShengdd Android版本 Android4.2.2 创建日期 2013.08.02 ROM大小 0.98G MD5验证码 17A0FBC1192137F98AC00F94E8926A0E 适用机型 HTC one国际版、港版、AT&T、美版T-Mobile QQ群 QQ: 177061373 ROM简介: 该版本ROM是基于国外目前最新OrDroid_8.2....
阅读全文
posted @ 2013-08-02 23:08
you Richer
阅读(317)
推荐(0)
摘要:
好长时间没有再接触Android了,以至于GenyMotion出现这么久了,我还没有试用过,记得当时发布Android Studio时,当天我就开始试用了,好吧,看到GenyMotion这个东西还要归功于这篇文章:http://blog.csdn.net/chichoxian/article/details/9224793,看了这篇文章之后,才知道这个东西,才开始试用这个东西。 首先,我们需要做的第一步是去这个网站下载软件安装包:https://cloud.genymotion.com/page/launchpad/download/,我是在Win7的环境下,所以,我下载的是这个版本...
阅读全文
posted @ 2013-08-02 23:07
you Richer
阅读(437)
推荐(1)
摘要:
这个题目的数据感觉不能更水了。从复杂度上计算,肯定有极限数据可以卡掉暴力方法的么。总之,暴力的做法就是树状数组了,对于区间更新,就挨个更新就是了。当然,判断是否是Lucky Number的话,可以用一个数组标记一下,因为题目中有说数据不会超过10000的。总之就是一个非常不靠谱的方法过了……话说用线段树的区间操作以及延迟标记的话,真心不知道怎么判断加上d之后的Lucky Number的个数,o(╯□╰)o #include #include #include using namespace std;#define N 101000int s[N], a[N], n, m, x, y, z;bo
阅读全文
posted @ 2013-08-02 23:05
you Richer
阅读(166)
推荐(0)
摘要:
这题是考权限的知识点,权限分为两大类,系统权限和对象权限,这题主要讲系统权限,我们先来了解什么是系统权,什么是对象权限吧。1、系统权限:允许用户在数据库中执行特定的操作A、SYSDBA/SYSOPER这两个权限比较特殊gyj@OCM> select * from dba_sys_privs where granteein('SYSDBA','SYSOPER'); no rows selected B、DBA的系统权限是可以查到的gyj@OCM> select * from dba_sys_privs where grantee='DBA
阅读全文
posted @ 2013-08-02 23:03
you Richer
阅读(226)
推荐(0)
摘要:
由于iPhone,iPad等苹果产品在全世界范围内的广泛流行,那么通过App Store下载应用程序的用户也将是来自世界范围的人们,所以开发者在开发过程中势必要考虑到不同语言环境下用户使用,好在iOS拥有健壮的本地化(localization)体系结构,使用它可以轻松的将应用程序翻译成多种语言。多语言在应用程序中一般有两种做法:一、程序中提供给用户自己选择语言的机会; 二、根据当前用户当前移动设备的语言自动将我们的app切换对应语言,这里在设置中需要设置的内容有两项:语言(Language)和区域格式(Region Format)。第一种做法比较简单完全靠自己的发挥了,这里主要讲第二种做法,主
阅读全文
posted @ 2013-08-02 23:01
you Richer
阅读(211)
推荐(0)
摘要:
题目:http://acm.hdu.edu.cn/showproblem.php?pid=4509 虽然制定了减肥食谱,但是湫湫显然克制不住吃货的本能,根本没有按照食谱行动! 于是,结果显而易见… 但是没有什么能难倒高智商美女湫湫的,她决定另寻对策——吃没关系,咱吃进去再运动运动消耗掉不就好了? 湫湫在内心咆哮:“我真是天才啊~\(≧▽≦)/~” 可是,大家要知道,过年回家多忙啊——帮忙家里做大扫除,看电影,看小说,高中同学聚餐,初中同学聚餐,小学同学聚餐,吃东西,睡觉,吃东西,睡觉,吃东西,睡觉……所以锻炼得抽着时间来。 但是,湫湫实在太忙了,所以没时间去算一天...
阅读全文
posted @ 2013-08-02 22:59
you Richer
阅读(265)
推荐(0)
摘要:
【1】如果是tabhost中的activity跳到其他的activity,用这篇blog的方法即可http://blog.sina.com.cn/s/blog_8db8914301010t31.html public class AnimCommon { public static int in = 0; public static int out = 0; public static void set(int a, int b){ in = a ; out = b; } public static void clear...
阅读全文
posted @ 2013-08-02 22:57
you Richer
阅读(252)
推荐(0)
摘要:
/* * queue_2.cpp * * Created on: 2013年8月2日 * Author: 黄东东 * 为了能有章泽天这样的女朋友而不断努力。。。。。 * fighting。。。。。。。 */#include typedef int T;using namespace std;class Queue { int a[5]; int b;//队首元素 int n;//有效元素个数public: Queue() : b(0), n(0) { } Queue& push(const T& d) { if (full()) { throw "满"...
阅读全文
posted @ 2013-08-02 22:55
you Richer
阅读(164)
推荐(0)
摘要:
素数求和问题,也是大一的一次实验。重新回顾,重新体会。 问题描述:从键盘输入任意一个整数n,编程计算并输出1~n之间所有素数之和。附加题(选做):针对实验的问题想出一种算法,能对任意一个5#include #include int is_prime( int n ){ int i, j, ret; int sum = 2; for ( j=2; jint main(){ int a[101], i, j; for( i=2; i#include #define SIZE 1000000000#define BITMAPSIZE 8unsigned char map...
阅读全文
posted @ 2013-08-02 22:53
you Richer
阅读(480)
推荐(0)
摘要:
通过前面几篇博客,不知道大家有没有发现这个问题,虽然现在可以灵活控制跳转了,但是Action的数量还是比较多,如何既能保证跳转灵活,还能减少Action的数量?这就是我们这篇博客所说的DispatchAction,如其名,可以理解为“分发式Action”,使用它可以避免为每个Action创建一个类。 我们先来看一下实例。UserAction DispatchAction继承的是Action,它的特点就是把以前的多个Action合并为一个,当多个Action关联较大时,可以像这样放在一起,减少Action类的同时,也降低了维护的难度。package com.tgb.drp.w...
阅读全文
posted @ 2013-08-02 22:51
you Richer
阅读(350)
推荐(0)
摘要:
常用shell变量$#,$@,$0,$1,$2的含义解释: $$ Shell本身的PID(ProcessID) $! Shell最后运行的后台Process的PID $? 最后运行的命令的结束代码(返回值) $- 使用Set命令设定的Flag一览 $* 所有参数列表。如"$*"用「"」括起来的情况、以"$1 $2 … $n"的形式输出所有参数$@ 所有参数列表。如"$@"用「"」括起来的情况、以"$1" "$2" … "$n" 的形式输出所有参数$# 添加
阅读全文
posted @ 2013-08-02 22:49
you Richer
阅读(169)
推荐(0)
摘要:
题意:n个点 m个询问,下面一行是n 个点的权值 再下面n-1行是双向的边然后m个询问:k u v 若k==0,则把u点的权值改为v,否则回答u->v之间最短路经过点的权值中 第k大的值是多少木有AC。。勿扔OJ可以拿来学习RMQ思路:跑个RMQ 求出LCA(u,v) 然后只要登山坡一遍就得到u->v的点,记下这些点的权值,再排个序就有第k大的数了下面附几个测试案例和答案#include #include #include using namespace std;#define N 80010 //最多有N个点struct node{ int from,to,nex;}edge[N
阅读全文
posted @ 2013-08-02 22:47
you Richer
阅读(195)
推荐(0)
摘要:
Integer InquiryOne of the first users of BIT's new supercomputer was Chip Diller. Heextended his explorationof powers of 3 to go from 0 to 333 and he explored taking various sumsof those numbers.``This supercomputer is great,'' remarked Chip. ``I only wish Timothy werehere to see thesere
阅读全文
posted @ 2013-08-02 22:45
you Richer
阅读(205)
推荐(0)
摘要:
先来看一下Struts1学习总结的思维导图,画的主要是Struts1中的重点和博客分布,如下所示: 系列博客的侧重点是:Struts1是什么?为什么要使用它?如何使用Struts1?Struts1源码分析?以下是Struts1下博客链接:《层层递进Struts1(一)之由Servlet引入Struts》《层层递进Struts1(二)之Struts1简介及登录实例》《层层递进Struts1(三)之Struts组成》《层层递进Struts1(四)之预加载ActionServlet》《层层递进Struts1(五)之处理流程》《层层递进Struts1(六)自定义转换器》《层层递进Struts1...
阅读全文
posted @ 2013-08-02 22:43
you Richer
阅读(276)
推荐(0)
摘要:
ProductThe ProblemThe problem is to multiply two integers X, Y. (0#includeint main() { char mul1[300], mul2[300]; char ch; int ans[600]; int len1, len2; int num1, num2; int k, Sum; while(gets(mul1) != NULL && gets(mul2) != NULL) { memset(ans, 0, sizeof(ans)); len1 = strlen(mul1); len2 = strl
阅读全文
posted @ 2013-08-02 22:42
you Richer
阅读(181)
推荐(0)
摘要:
最短路································· 类似的问题还有好多不会!慢慢学吧!!!!、进步,哪怕每天一点也行! (恋爱不是小事,确实小事的积累!(听着酷狗音乐台说的,很有道理))#include #include #define MAX 1
阅读全文
posted @ 2013-08-02 22:40
you Richer
阅读(171)
推荐(0)
摘要:
题意:在N*N的图中,找出孤立存在的十字架的个数。十字架要求为正十字,孤立表示组成十字架的‘#的周围的一格再无’#‘。dfs找出在中心的‘#’(周围四格也为‘#'),则缩小了搜索范围,再bfs找出是否是符合要求。#include #include #include #include #include using namespace std;char map[55][55];int n,cnt,head,tail,vis[55][55],center[55][55];int dirx[4] = {1,-1,0,0};int diry[4] = {0,0,1,-1};struct Queu
阅读全文
posted @ 2013-08-02 22:38
you Richer
阅读(178)
推荐(0)
摘要:
import java.beans.BeanInfo; import java.beans.IntrospectionException; import java.beans.Introspector; import java.beans.PropertyDescriptor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.Map;import org.apache.commons.beanutils.BeanUtils; import
阅读全文
posted @ 2013-08-02 22:36
you Richer
阅读(161)
推荐(0)
摘要:
问题:求1~r中有多少个数与n互素。 对于这个问题由容斥原理,我们有3种写法,其实效率差不多。分别是:dfs,队列数组,位运算。 先说说位运算吧:用二进制1,0来表示第几个素因子是否被用到,如m=3,三个因子是2,3,5,则i=3时二进制是011,表示第2、3个因子被用到 LL Solve(LL n,LL r){ vector p; for(LL i=2; i*i1) p.push_back(n); LL ans=0; for(LL msk=1; msk1) p.push_back(n);}void dfs(LL k,LL t,LL s,LL...
阅读全文
posted @ 2013-08-02 22:34
you Richer
阅读(317)
推荐(0)
摘要:
Problem Description The Princess has been abducted by the BEelzebub feng5166, our hero Ignatius has to rescue our pretty Princess. Now he gets into feng5166's castle. The castle is a large labyrinth. To make the problem simply, we assume the labyrinth is a N*M two-dimensional array which left-to
阅读全文
posted @ 2013-08-02 22:32
you Richer
阅读(150)
推荐(0)
摘要:
OverflowWrite a program that reads an expression consisting of twonon-negative integer and an operator. Determine if either integer orthe result of the expression is too large to be represented as a``normal'' signed integer (typeinteger if you are workingPascal, type int if you are working i
阅读全文
posted @ 2013-08-02 22:30
you Richer
阅读(204)
推荐(0)
摘要:
Problem Description Angel was caught by the MOLIGPY! He was put in prison by Moligpy. The prison is described as a N * M (N, M #include#includeusing namespace std;typedef struct nn{ int x,y; int time; friend bool operator Q; node q,p; q.time=0;q.x=sj;q.y=si; Q.push(q); while(!Q...
阅读全文
posted @ 2013-08-02 22:28
you Richer
阅读(220)
推荐(0)
摘要:
点此连接到UVA10494思路: 采取一种, 边取余边取整的方法, 让这题变的简单许多~ AC代码:#include#includeint main() { long long mod; long long k, tmp; int len; int ans[10010]; char num[10010], ch[2]; while(scanf("%s%s%lld", num, ch, &mod) != EOF) { len = strlen(num); k = 0; tmp = 0; memset(ans, 0, sizeof(ans)); for(int i =
阅读全文
posted @ 2013-08-02 22:26
you Richer
阅读(133)
推荐(0)
摘要:
题意:有n个人,n个房子,一个人每走一步(可上、下、左、右取一个方向)花费1美元,问让这n个人走到n个房子里最少需要多少美元(n >在学最小费用最大流,找模版题找到了这道。建图:1到n为人的编号,n+1到2*n为房子的编号,另加上源点0和汇点2*n+1;源点到每个人各建立一条容量为1的流,费用为0;每个人到每个房子各建立一条容量为1的流,费用按题意计算;(注意:反向费用!!!)每个房子到汇点建立一条容量为1的流,费用为0。当满足最大流时,一定是源点发出n,每个人接收1并发出1到一个房子,n个房子各发出1汇成n到汇点,所以,真是最小费用最大流的模版题。#include #include #
阅读全文
posted @ 2013-08-02 22:24
you Richer
阅读(270)
推荐(0)
摘要:
LVM有扩容功能,无容错功能 物理卷: [root@localhost ~]# pvscan PV /dev/sda2 VG VolGroup lvm2 [19.51 GiB / 0 free] Total: 1 [19.51 GiB] / in use: 1 [19.51 GiB] / in no VG: 0 [0 ] [root@localhost ~]# pvcreate /dev/sd[bcd] 把bcd磁盘都设置为...
阅读全文
posted @ 2013-08-02 22:23
you Richer
阅读(437)
推荐(0)
摘要:
Cheapest PalindromeTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 4592Accepted: 2236DescriptionKeeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID tag that the system will read as the cows pa
阅读全文
posted @ 2013-08-02 22:21
you Richer
阅读(172)
推荐(0)
摘要:
在jni编译过程中,遇到non-numeric second argument to `wordlist' function错误,个人遇到这个错误的原因,是因为从windows中拷贝了Android.mk文件到ubuntu中,使用dos2unix Android.mk.把格式转化为unix格式即可。如还有错,尝试dos2unix AndroidManifest.xml。
阅读全文
posted @ 2013-08-02 22:19
you Richer
阅读(163)
推荐(0)
摘要:
在用PHPWEB模板的时候,碰到首页有一个FLASH轮播广告,在IE浏览器下可以正常显示播放,在谷歌浏览器中却显示不了,解决办法如下: 欢迎转载:http://blog.csdn.net/aminfo/article/details/9721875 1、找到advs/templates/tpl_advsflashlb.htm这个文件; 2、将这个文件的原内容如下: 修改为新内容如下: 现在360浏览器客户端有好多也是用谷歌浏览器的内核,所以360浏览器不支持FLASH轮播广告的也可用以上方法解决。
阅读全文
posted @ 2013-08-02 22:17
you Richer
阅读(384)
推荐(0)
摘要:
很多时候、我们需要选择出从指定位置开始的指定行数、此时、limit笑了 对于limit的定义是: limit x,y 表示从第x行开始选择y条记录 在业务需要分页操作的时候、我们通常采用limit+order by这对洗剪吹组合、高端洋气上档次 然而、当翻到非常靠后的页面时、MySQL需要花费大量的时间来扫描需要丢弃的数据 此时比较好的策略是使用延迟关联: 通过使用覆盖索引查询返回需要的主键、再根据这些主键关联原表获得需要的行 具体请看下面的一个例子 假如有这样一个查询:select film_id,actor,description from film w...
阅读全文
posted @ 2013-08-02 22:15
you Richer
阅读(331)
推荐(0)
摘要:
WallTime Limit:1000MSMemory Limit:10000KTotal Submissions:26286Accepted:8760Description Once upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a
阅读全文
posted @ 2013-08-02 22:13
you Richer
阅读(197)
推荐(0)
摘要:
题目大意就是给一个deque然后有n个数,依次进行操作,每种操作,你可以把这个数放在deque首部,也可以放在尾部,也可以扔掉不管,但是要保证deque中的数是非递减的。最要求deque中最长能是多少 思路是这样的:对于这个序列,最重要的应该是第一个进去的数是什么,然后以该数为开头的最长不升子序列和以该数为开头的最长不降子序列则可以凑成一个最长的序列,当然这两个序列中可能都出现了该数,也就是发生了重复,所以就要减掉重复的部分,即两个子序列中有该数个数较少的序列中这个数应当被减掉。然后由于数据量大,所以要用到二分求最长上升子序列的方法顺便使用了stl中的equal_range函数,意思就是返回一
阅读全文
posted @ 2013-08-02 22:11
you Richer
阅读(229)
推荐(0)
摘要:
cocos的事件分发器CCTouchDispatcher,存在两个通道,m_pTargetedHandlers存储CMenu,CScrollView的事件处理器,这里的处理器,在处理过消息后,会声明bClaimed为True,表示事件有被处理过,如果处理器isSwallowsTouches为真,则处理过的消息将被吞噬掉,并且直接跳出对m_pTargetedHandlers的遍历,并且会把消息从消息列表中删除,后续的标准消息处理器将不会收到吞噬的消息。(menu默认会吞噬,CScrollView默认不会) m_pStandardHandlers存储layer的事件处理器,并且,没有吞噬消息的逻辑
阅读全文
posted @ 2013-08-02 22:09
you Richer
阅读(211)
推荐(0)
摘要:
这题太欢乐了......虽然wa了几次,但是想到骑士在两幅图的传送门中传来传去就觉得这骑士太坑了#include #include #include #include using namespace std;int n,m,cost,head,tail,ans;char map[2][15][15];int sum[2][15][15];struct node { int z,x,y;} q[11111];node st, end;int dirx[4] = {1,-1,0,0};int diry[4] = {0,0,1,-1};void init() { memset(sum,-...
阅读全文
posted @ 2013-08-02 22:07
you Richer
阅读(131)
推荐(0)
摘要:
Problem A: Football (aka Soccer) The Problem Football the most popular sport in the world (americans insist to call it "Soccer", but we will call it "Football"). As everyone knows, Brasil is the country that have most World Cup titles (four of them: 1958, 1962, 1970 and 1994). As
阅读全文
posted @ 2013-08-02 22:05
you Richer
阅读(317)
推荐(0)
摘要:
Problem Description The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The show is hold in the Small hall, so it attract a lot of boys and girls. Now there are n boys enrolling in. At the beginning, the n boy
阅读全文
posted @ 2013-08-02 22:03
you Richer
阅读(294)
推荐(0)
摘要:
The die is castInterGames is a high-tech startup company that specializes in developing technology that allows users to play games over the Internet. A market analysis has alerted them to the fact that games of chance are pretty popular among their potential customers. Be it Monopoly, ludo or backga
阅读全文
posted @ 2013-08-02 22:01
you Richer
阅读(297)
推荐(0)
摘要:
Problem D: XYZZYADVENT: /ad�vent/, n.The prototypical computer adventure game, first designed by Will Crowther on the PDP-10 in the mid-1970s as an attempt at computer-refereed fantasy gaming, and expanded into a puzzle-oriented game by Don Woods at Stanford in 1976. (Woods had been one of the autho
阅读全文
posted @ 2013-08-02 21:59
you Richer
阅读(404)
推荐(0)
摘要:
我以为我会是最坚强的那一个 我还是高估了自己 我以为你会是最无情的那一个 还是我贬低了自己 就算不能够在一起 我还是为你担心 就算你可能听不清 也代表我的心意 那北极星的眼泪 闪过你曾经的眼角迷离 那玫瑰花的葬礼 埋葬的却是关于你的回忆 如果时光可以倒流 我希望不要和你分离 如果注定分离 我希望不要和你相遇 ——摘自《小Q失恋日记 》第17卷520页 这是码农小Q第58次失恋了,也是陷得最深的一次。 要知道,小Q自从第一次到腾讯公司报到,就被风姿绰约的前台MM彻底迷住了,这1000多个日日夜夜他无时无刻不在憧憬着他们美好的未来。为了能见到MM,他每天早到晚归,甘愿加班,连续...
阅读全文
posted @ 2013-08-02 21:57
you Richer
阅读(176)
推荐(0)
摘要:
题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=1885题目意思:给一个矩阵,给一个起点多个终点,有些点有墙不能通过,有些点的位置有门,需要拿到相应颜色的钥匙才能打开,问到达终点的最短步数。解题思路:BFS+状态压缩。将每种颜色对应一个二进制数位,1表示已经得到该颜色的钥匙,0表示没有得到。一把钥匙可以同种颜色的多扇门。代码:#include#include#include#include#include#include#include#include#include#include#include#include#include#define.
阅读全文
posted @ 2013-08-02 21:55
you Richer
阅读(205)
推荐(0)
摘要:
Problem A: The Monocycle A monocycle is a cycle that runs on one wheel and the one we will be considering is a bit more special. It has a solid wheel colored with five different colors as shown in the figure: The colored segments make equal angles (72o) at the center. A monocy...
阅读全文
posted @ 2013-08-02 21:53
you Richer
阅读(211)
推荐(0)
摘要:
题意:给你一些括号,问匹配规则成立的括号的个数。思路:这题lrj的黑书上有,不过他求的是添加最少的括号数,是的这些括号的匹配全部成立。我想了下,其实这两个问题是一样的,我们可以先求出括号要匹配的最少数量,那么设原来括号的数量为l , 添加了l' 。那么其实原来括号匹配成功的括号数就是((l + l') / 2 - l') * 2。#define N 105char a[N] ;int dp[N][N] ;int f[N][N] ;int check(int i ,int j) { if(a[i] == '[' && a[j] ==
阅读全文
posted @ 2013-08-02 21:52
you Richer
阅读(235)
推荐(0)
摘要:
Problem Description As we all know, machine scheduling is a very classical problem in computer science and has been studied for a very long history. Scheduling problems differ widely in the nature of the constraints that must be satisfied and the type of schedule desired. Here we consider a 2-machin
阅读全文
posted @ 2013-08-02 21:50
you Richer
阅读(141)
推荐(0)