求最大留下的观众,观众之间存在不能同时满足的关系,就是矛盾关系,矛盾关系建边,建边是双向的所以最大匹配要/2 还有一种建图的方法:把观众分成两个集合,一个是投留下猫的,一个是投留下狗的每个集合间没有矛盾关系,就是二分图了,求出最大匹配, 两种方法都是要求最大独立集 #include#include#define N 510int map[N][N],n,m,k,match[N],vis[N];struct op{ int love,hate;}p[N];int find(int x){ for(int i=1;i#include#define N 510int map[N][N... Read More
posted @ 2013-07-24 21:14
javawebsoa
Views(232)
Comments(0)
Diggs(0)
判断语句 if else 如下: 1 /* 2 语法: 3 if(条件) 4 { 5 代码块 6 }else 7 { 8 代码块 9 } 10 用中文可以理解为:如果(if)......否则(else)........ 11 注:条件返回是Boolean类型,非true即false。还可以多层嵌套 12 */ 13 if(5>3) 14 { 15 if(1==1) 16 { 17 // 1==1 条件返回结果为true则执行这里的代码 18 }else 19 { 20 //1==1 条件返回结果为false... Read More
posted @ 2013-07-24 21:12
javawebsoa
Views(159)
Comments(0)
Diggs(0)
随机化还是很厉害的...印象最深的是以前手写快排~~一般加个随机化会使耗时不受输入数据的..时间更加稳定 这个题是人品题了...开始交了好多遍都过不了..多交几次终于过了... Program:#include#include#include#include#include#include#include#include#define ll long long#define oo 1000000007#define MAXN 505using namespace std; int n,M[3][MAXN][MAXN];bool judge(){ int t,i,j,x,y,p,... Read More
posted @ 2013-07-24 21:09
javawebsoa
Views(176)
Comments(0)
Diggs(0)
如果你是做Java web应用开发的,那么必须熟悉那声名狼藉的SQL注入式攻击。去年Sony就遭受了SQL注入攻击,被盗用了一些Sony play station(PS机)用户的数据。在SQL注入攻击里,恶意用户通过SQL元数据绑定输入,比如:某个网站的登录验证SQL查询代码为: strSQL = "SELECT * FROM users WHERE name = '" + userName + "' and pw = '"+ passWord +"';" 恶意填入: userName = " Read More
posted @ 2013-07-24 21:07
javawebsoa
Views(349)
Comments(0)
Diggs(0)
1.vmlinux vmlinux是未压缩的内核,vmlinux 是ELF文件,即编译出来的最原始的文件。用于kernel-debug,产生system.map符号表,不能用于直接加载,不可以作为启动内核。只是启动过程中的中间媒体。vmlinux.bin:The same as vmlinux, but in a binary file format. 2.vmlinuz vmlinuz是可引导的、压缩的内核。“vm”代表“Virtual Memory”。Linux 支持虚拟内存,不像老的操作系统比如DOS有640KB内存的限制。Linux能够使用硬盘空间作为虚拟内存,因此得名“v... Read More
posted @ 2013-07-24 21:05
javawebsoa
Views(1169)
Comments(0)
Diggs(0)
由于仅仅是听课笔记,错漏均会有,原理是正确的1.环境主机1 192.168.0.101 1)win2003操作系统 2)开启apache+mysql+php+wordpress 其中 apache以低权限用户webmaster运行,使用端口80 wordpress暴露漏洞形式如下 XXX.php $path_array = array( "xxxpath" => "../../" ... ); $postValue = $_POST; $tmpArray = array_merge($path_array,$_POST); include_onc. Read More
posted @ 2013-07-24 21:03
javawebsoa
Views(202)
Comments(0)
Diggs(0)
算是个经典题目了,很模板的树形DP题目做这个题的时候一开始就想到树形DP了,可是由于各种原因没写出来,代码太糟烂了,赛后还是改了好久才过的dp(u,0)=sum(dp(v,1));dp(u,1)=sum(min(dp(v,0),dp(v,1))); #include #include #include #include using namespace std;vector G[100010];int d[100010][2];int x,y,n;int dfs(int u,int fa){ d[u][0]=0; d[u][1]=1; for(int i=0;i<G[u].si... Read More
posted @ 2013-07-24 21:01
javawebsoa
Views(340)
Comments(0)
Diggs(0)
1.直接敲sqlplus并回车就是启动SQL*PLUS,输入user及password将使用户登陆到缺省的数据库。请输入用户名:2.sqlplus user/password@SERVICE_NAME将连接到指定的数据库。3.敲sqlplus /nolog就是使SQL*PLUS启动,但不登陆Oracle数据库。然后需要使用connect命令连接Oracle。 SQL>connect sys/oracle@192.168.1.204/icpdb 已连接。 SQL> sqlplus -h SQL*Plus: Release 10.2.0.1.0 - Production Copyrig Read More
posted @ 2013-07-24 20:57
javawebsoa
Views(372)
Comments(0)
Diggs(0)
CCNode有三个方法,使用CCDirector的replaceScene方法替换场景时,每个节点都会调用这三个方法:onEnter与onExit方法在改变场景过程中的特定时刻被调用,这取决于是否使用CCTransitionScene。onEnterTransitionDidFinish方法在替换结束时调用。必须总是调用这些方法的超类实现来避免难输入问题和内存泄漏。01-(void) onEnter02{03CCLOG(@"%@: %@", NSStringFromSelector(_cmd), self);0405// must call super here:06[su Read More
posted @ 2013-07-24 20:54
javawebsoa
Views(464)
Comments(0)
Diggs(0)
S3C2440实现wifi、3G上网和迷你无线路由的制作 fulinux凌云实验室本文将通过ARM、linux平台,借助RT2070/RT3070芯片的无线模块(或使用RT2070/RT3070芯片的USB无线上网卡)、3G无线上网卡,实现无线上网、通过ADSL和3G的迷你无线路由器的制作。wifi上网首先是利用s3c2440开发板和RT2070/RT3070芯片的无线模块实现无线上网的功能,即让无线模块工作在STA模式,所谓的STA在WLAN中一般为客户端,可以是装有无线网卡的计算机,也可以是有WiFi模块的智能手机。STA可以是移动的,也可以是固定的,是无线局域网的最基本组成单元。这里假定 Read More
posted @ 2013-07-24 20:53
javawebsoa
Views(3921)
Comments(0)
Diggs(0)

浙公网安备 33010602011771号