题意 : 4*4的+,-组成 每次能翻转一个点所在的行与列 求最小的翻转次数
使得矩阵全为-思路:暴力枚举#includeusing namespace std;int map[5][5];int b;int n;int
rsult[22];void slip(int i,int s[][4])//...
分类:
其他好文 时间:
2014-05-26 02:20:04
阅读次数:
320
1 #include 2 using namespace std; 3 template 4
class Queue 5 { 6 private: 7 struct node 8 { 9 T data;10 node * next;11 ...
分类:
其他好文 时间:
2014-05-26 02:19:36
阅读次数:
213
1 using System; 2 using System.Collections.Generic;
3 using System.Text; 4 5 namespace ConsoleApplication6 6 { 7 class semblance 8 {
9 10 ...
分类:
数据库 时间:
2014-05-26 02:11:57
阅读次数:
486
http://acm.hdu.edu.cn/showproblem.php?pid=1086跨立实验算法#include#include#include#includeusing
namespace std;struct Point{ double x,y;} ;struct Line{ ...
分类:
其他好文 时间:
2014-05-26 02:10:52
阅读次数:
224
#ifndef
BOYAA_FOURLANDLORD_REDISCLASS_H_20130217#define
BOYAA_FOURLANDLORD_REDISCLASS_H_20130217#include "hiredis.h"#include #include
using namespace ...
分类:
编程语言 时间:
2014-05-26 01:22:09
阅读次数:
505
using System;using System.Collections.Generic;using
System.Text;using Word = Microsoft.Office.Interop.Word;namespace ELO.BLL{ /* *
Descrip...
分类:
其他好文 时间:
2014-05-25 23:20:06
阅读次数:
420
题目:
链接:点击打开链接
题意:
n个课程m天完成,a[i][j]表示用j天完成第i个课程得到的价值,求最大价值。
算法:
分组背包。
思路:
m天是总容量,n是组数。
代码:
#include
#include
#include
using namespace std;
int n,m;
int a[110][...
分类:
其他好文 时间:
2014-05-25 18:16:18
阅读次数:
223
题目来源:POJ 2019 Cornfields
题意:求正方形二维区间最大最小值的差
思路:直接二维ST搞 试模版而已
#include
#include
#include
using namespace std;
const int maxn = 255;
int dp[maxn][maxn][8][8];
int dp2[maxn][maxn][8][8];
int a[...
分类:
其他好文 时间:
2014-05-25 10:21:07
阅读次数:
246
sg[0]=0;sg[i]=mex{sg[i-2^(j)]}
(i>=2^j)mex()为不在此集合的最小非负整数#include #include #include #include using namespace
std;using namespace std;int main(){ in...
分类:
其他好文 时间:
2014-05-25 03:27:01
阅读次数:
170
很少用bfs进行最短路搜索,实际BFS有时候挺方便得,省去了建图以及复杂度也降低了O(N*M);UVA 11624 写的比较挫#include #include
#include #include using namespace std;struct node{ int ft; int ...
分类:
其他好文 时间:
2014-05-25 03:23:54
阅读次数:
210