A square pattern of size N x N (1 20 #include
21 #include 22 using namespace std; 23 24 //旋转90度的操作 25 int
**transiformation_one(int before[][11],i...
分类:
其他好文 时间:
2014-05-16 03:10:30
阅读次数:
361
HDU 3555
BOMBhttp://acm.hdu.edu.cn/showproblem.php?pid=3555不能出现相邻的49正在学习。。。会了自己写#includeusing
namespace std;LL dp[21][3],n; int len,bit[21];//dp[i][0]...
分类:
其他好文 时间:
2014-05-15 21:18:59
阅读次数:
293
d[n]=min(dp[n-1]+1,dp[n、2]); n为偶数
dp[n]=dp[n-1]+1; 答案为18 怎么通过计算求得答案? #includeusing namespace std;int d[2014];int
min(int x,int y){ if(x>y) return y; e...
分类:
其他好文 时间:
2014-05-15 21:05:33
阅读次数:
387
好好学习c#代码,学了怎么调用类using System;using
System.Collections.Generic;using System.Linq;using System.Text;namespace robot{
class Program { static...
分类:
其他好文 时间:
2014-05-15 10:45:07
阅读次数:
263
简介本文主要介绍通过XELemet去读取含有namespaces(xmlns)的XML,这也是偶然间发现这个问题的,一个群里的小伙伴突然问起这个,以此记录一下。背景一个XML文档可能包括来自多个XML词汇表的元素或属性,如果每一个词汇表指派一个命名空间,那么相同名字的元素或属性之间的名称冲突就可以解...
分类:
其他好文 时间:
2014-05-15 09:31:16
阅读次数:
269
using System;using System.Collections.Generic;using
System.Linq;using System.Text;namespace MegreSort{ class Program { static void
Main(s...
分类:
其他好文 时间:
2014-05-15 09:21:59
阅读次数:
171
tarjan算法第一题
喷我一脸。。。。把手写栈的类型开成了BOOL,一直在找错。。。
#include
#include
#include
#include
#define maxn 100005
const int MOD=1000000007;
using namespace std;
struct node
{
int to,next;
}edge[maxn...
分类:
其他好文 时间:
2014-05-15 08:18:56
阅读次数:
353
#include
#include
using namespace std;
class Base
{
public:
Base(){}
~Base(){}
public:
virtual void f1(int x){ cout "baseclass: f1() " x << endl; }
virtual void f2()final{ cout "baseclass: f2() "...
分类:
编程语言 时间:
2014-05-15 08:11:39
阅读次数:
271
整理了下C#语言和数据库技术基础,作为复习资料第一章一、c#和JAVA对比:1.c#用命名空间(namespace)java用包(package)2.引入命名空间或包的关键字C#用using,JAVA用import3.程序入口:C#的Main()有四种形式staticvoidMain(string[]args)staticintMain(string[]args)staticvo..
分类:
数据库 时间:
2014-05-15 00:34:53
阅读次数:
1595
第一、任意一个比较排序算法在最好情况下的时间复杂度也是O(nlogN);
第二、计数排序
假设n个输入元素的每一个都是介于0到k之间的整数,计数排序可用,需要临时存储空间O(K),时间复杂度是O(n).
#include
using namespace std;
void countingSort(int *A,int len,int max)
{
if(A==NULL || len<...
分类:
其他好文 时间:
2014-05-14 23:58:58
阅读次数:
382