注意:元组是否每一项加元组名非常重要,加与不加是完全不同的数据类型。比如:var iPlayer=(name:"李逍遥",life:1000,attack:35)将iPlayer传递给函数pk(a:(String,Int,Int),inout b:(String,Int,Int))中的参数就会出错。...
分类:
编程语言 时间:
2015-03-16 15:47:28
阅读次数:
154
【题意】给一个无向图的反图(即给定的边实际上不存在,而未给的边是存在的),求连通块数。(点数n G[i]为结点i相邻的结点,预处理时将其排序为有序序列。然后BFS,直接枚举st中的元素(即不存在已扫描到的连通块中的点),然后对该元素在G[i]中二分查找,如果没有找到,证明存在着这一条边,进行扩展即可...
分类:
其他好文 时间:
2015-03-15 18:21:48
阅读次数:
126
N-Queens问题:Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.思路: dfs + 回溯 常用模板我的代码:pub....
分类:
其他好文 时间:
2015-03-10 21:16:15
阅读次数:
152
一.CSRF是什么? CSRF(Cross-site request forgery),中文名称:跨站请求伪造,也被称为:one click attack/session riding,缩写为:CSRF/XSRF。 二.CSRF可以做什么? 你这可以这么理解CSRF攻击:攻击者盗用了你的身份,以你的...
分类:
其他好文 时间:
2015-03-10 18:54:32
阅读次数:
104
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other
Given an integer n, return all distinct solutions to the n-queens puzzle.
Ea...
分类:
其他好文 时间:
2015-03-10 17:16:38
阅读次数:
161
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:
其他好文 时间:
2015-03-08 15:31:44
阅读次数:
162
题目链接:N-Queens
The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other.
Given an integer n, return all distinct solutions to the n-queens...
分类:
其他好文 时间:
2015-03-07 11:39:45
阅读次数:
179
最近安全研究人员发现一种新型SSL/TLS漏洞,漏洞编号为CVE-2015-0204,该漏洞被称为FREAK(疯怪)。漏洞的名称取自于“RSA_EXPORT素数攻击”的英文首字母(Factoring attack on RSA-EXPORT Keys)。通过它...
分类:
Web程序 时间:
2015-03-06 10:40:40
阅读次数:
134
Save the StudentsTime Limit:134MS Memory Limit:0KB 64bit IO Format:%lld & %lluDescriptionHogwarts is under attack by the Dark Lord, He-Who-Must-Not-Be...
分类:
编程语言 时间:
2015-03-05 22:07:12
阅读次数:
224
Then-queens puzzle is the problem of placingnqueens on ann×nchessboard such that no two queens attack each other.Given an integern, return all distinc...
分类:
其他好文 时间:
2015-03-04 16:45:58
阅读次数:
168