题意:给出每两个队伍的胜负关系,求排名。
思路:裸裸的拓扑排序。
#include
#include
#include
using namespace std;
int n,m,p1,p2;
int indegree[500010],match[505][505],flag;
void tuopu()
{
int i,j,k,flag=0;
for(j=1;j<=n;j++)
...
分类:
其他好文 时间:
2015-03-13 16:47:00
阅读次数:
119
(1)项目布局文件
activity_main.xml<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:layout_width="match_parent...
分类:
移动开发 时间:
2015-03-13 16:43:45
阅读次数:
251
一、创建一个新的项目
activity_main.xml<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
andr...
分类:
Web程序 时间:
2015-03-13 14:27:46
阅读次数:
278
用preg_match来检查内容里是否有匹配的“/",$content)){ echo "检测到图片";}else{ echo "未发现图片";}
分类:
Web程序 时间:
2015-03-12 22:17:42
阅读次数:
144
一、关于布局适配1、不要使用绝对布局2、尽量使用match_parent 而不是fill_parent 。3、能够使用权重的地方尽量使用权重(android:layout_weight)4、如果是纯色背景,尽量使用android的shape 自定义。5、如果需要在特定分辨率下适配,可以在res目录上...
分类:
移动开发 时间:
2015-03-12 20:36:31
阅读次数:
147
match是字符串方法,写法为:str.match(reg) exec是正则表达式方法,写法为:reg.exec(str) match和exec在匹配成功时返回的都是数组,在没有匹配上时返回的都是null,故在没有深入了解两者的使用规则前,会误以为两者的使用效果是一样的,下面在几种情况中对m...
分类:
Web程序 时间:
2015-03-12 16:41:35
阅读次数:
173
function rgb2hex(rgb) { rgb = rgb.match(/^rgb\((\d+),(\d+),(\d+)\)$/); function hex(x) { return ("0" + parseInt(x).toString(16)).slice(-2); } ret...
分类:
其他好文 时间:
2015-03-12 12:54:58
阅读次数:
124
setServer('localhost',9312); //设置服务器 $sc->setMatchMode(SPH_MATCH_EXTENDED); //匹配的模式,默认为SPH_MATCH_ALL(匹配所有查询的词) $res = $sc->query($keywords,'s...
分类:
其他好文 时间:
2015-03-12 06:22:32
阅读次数:
148
//用户名必须为字母、数字与下划线if (!preg_match('/^\w+$/i', $username))//验证邮箱格式是否正确if (!preg_match('/^[\w\.]+@\w+\.\w+$/i', $useremail))//手机号必须为11位数字,且为1开头if (!preg_...
分类:
Web程序 时间:
2015-03-12 06:18:53
阅读次数:
129
一、关于布局适配
1、不要使用绝对布局
2、尽量使用match_parent 而不是fill_parent 。
3、能够使用权重的地方尽量使用权重(android:layout_weight)
4、如果是纯色背景,尽量使用android的shape 自定义。
5、如果需要在特定分辨率下适配,可以在res目录上新建layout-HxW.xml的文件夹。比如要适配1080*1800的屏幕(魅...
分类:
移动开发 时间:
2015-03-11 17:30:03
阅读次数:
166