Type Aliasestypealias AudioSample = UInt16Booleans非boolean值不会被替代为bool,例如:let i = 1if i { // this example will not compile, and will report an error}T....
分类:
编程语言 时间:
2015-01-14 06:22:48
阅读次数:
160
Throughout the development of Parallel Extensions for the .NET Framework 4, we’ve come across a myriad of situations where certain functionality would...
分类:
其他好文 时间:
2015-01-13 19:33:44
阅读次数:
222
题意:多组数据,最后的0/1表示0无向1有向。
问是否存在欧拉回路。
题解:无向边给它任意定个向。
首先欧拉回路中点入度=出度。
然后发现每个无向边如果修改个方向,原来的入点的入度+1,出度-1,出点反之。
然后我们不妨对入度和出度不同的点跟源汇中之一连边,容量为入出度差一半(每改一条边差-2)
然后原来的无向边联系图中各点,容量1,最后check if(maxflow...
分类:
其他好文 时间:
2015-01-07 09:21:54
阅读次数:
170
题目大意:给出一张混合图,问是否存在欧拉回路。
思路:成题,直接看题解吧。
http://www.cnblogs.com/Lyush/archive/2013/05/01/3052847.html
CODE:
#include
#include
#include
#include
#include
#define MAX 510
#define MAXE...
分类:
其他好文 时间:
2015-01-06 17:55:08
阅读次数:
235
let Constant var Variable
let implicitInteger = 70
let implicitDouble = 70.0
let explicitDouble: Double = 70 The so-called type implications To includ...
分类:
编程语言 时间:
2015-01-03 22:15:18
阅读次数:
149
// Playground - noun: a place where people can playimport UIKit/***********************************************************//*** 一. A Swift Tour*///1....
分类:
编程语言 时间:
2014-12-30 00:25:32
阅读次数:
231
给定n个点的树。下面n个数表示点权。下面n-1行给出树。找一条链,然后找出这条链中的点权组成的最长上升子序列。求:最长上升子序列的长度。思路:首先是维护一条链然后求答案,但是如果直接树形dp(记录每个点u,u往下递增和u往下递减的长度)会使序列是来回的,即递增和递减都在同一条链上。枚举每个点作为子序...
分类:
其他好文 时间:
2014-12-22 02:04:24
阅读次数:
163
题目链接:点击打开链接
题意:
给定n个点的树。
下面n个数表示点权。
下面n-1行给出树。
找一条链,然后找出这条链中的点权组成的最长上升子序列。
求:最长上升子序列的长度。
思路:
首先是维护一条链然后求答案,但是如果直接树形dp(记录每个点u,u往下递增和u往下递减的长度)会使序列是来回的,即递增和递减都在同一条链上。
枚举每个点作为子序列的开头,然后维护一条链进行LIS的...
分类:
其他好文 时间:
2014-12-22 00:57:11
阅读次数:
234
http://www.spoj.com/problems/FTOUR2/先前看了一会题解就自己yy出来了。。。对拍过后交tle。。。。。。。。。。。。。。。。。。自己造了下大数据。。。。。。。。tle。。。。。。。。。。。。。。。。。。。。。。。。。what?明早更新吧。。调到吐了。。#includ...
分类:
其他好文 时间:
2014-12-19 01:50:07
阅读次数:
296
Given a node from a cyclic linked list which has been sorted, write a function to insert a value into the list such that it remains a cyclic sorted li...
分类:
其他好文 时间:
2014-12-15 18:57:44
阅读次数:
158