码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
HDU 4198 Quick out of the Harbour(优先队列 + bfs)
解题思路: 直接的bfs,因为和时间有关,需要采用优先队列. #include #include #include #include #include #include #include #include #include #include using namespace std; const int MAXN = 500 + 10; char G[MAXN][MAXN];...
分类:其他好文   时间:2015-02-09 15:59:04    阅读次数:101
hdu3652
基本的数位dp,需要记录前面除以13的余数。#include #include using namespace std;#define D(x) xconst int MAX_DIGIT = 35;int n, m;int f[MAX_DIGIT];int memoize[MAX_DIGIT][2]...
分类:其他好文   时间:2015-02-09 15:48:14    阅读次数:134
CodeForces 204A Little Elephant and Interval 数位DP
#include #include using namespace std; typedef __int64 LL; int a[33]; LL dp[33][10]; LL dfs(int x, int s, int e, int flag, int first) { if(x == -1) return s == e; if(!flag && dp[x][...
分类:其他好文   时间:2015-02-09 14:10:22    阅读次数:200
uva11997 K Smallest Sums&&UVALive 3135 Argus(优先队列,多路归并)
#include#include#include#include#include#include#include#include#include#include#include#include#include#includeusing namespace std;#define pii pair#d...
分类:其他好文   时间:2015-02-09 12:26:49    阅读次数:117
POJ-1936-All in All
题目:POJ-1936-All in All水题。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 8 using namespace std; 9 10 char s[100010],t[100010];1.....
分类:其他好文   时间:2015-02-09 10:48:45    阅读次数:165
C#使用SOAP调用Web Service
程序代码using System;using System.IO;using System.Net;using System.Text;namespace ConsoleApplication1{class Program{static void Main(string[] args){//构造so...
分类:Windows程序   时间:2015-02-09 10:47:03    阅读次数:5208
.NET自带缓存机制实例
using System;using System.Web;using System.Web.Caching;using System.Collections.Generic;using System.Collections;namespace SZRPP.Common{ /// /// 缓存相关....
分类:Web程序   时间:2015-02-09 10:46:14    阅读次数:138
uva 1606 (计算几何)
这是我人生中的第一个计算几何题,好好收藏一下。1、当一个点关于远点对称之后,除了两点之间的连线外,其他的任何直线都会讲两点分成两个部分2、极角排序3、线的旋转4、叉积求 sin#include #include #include #include using namespace std;class ...
分类:其他好文   时间:2015-02-09 10:44:59    阅读次数:176
poj_3669_Meteor Shower(BFS+预处理)
http://poj.org/problem?id=3669 /*思路:BFS+预处理 先预处理会爆炸的区域,BFS,遇到-1则结束*/ #include #include #include using namespace std; int visit[1001][1001]; int dx[5] = {0,0,1,0,-1}; int dy[5] = {0,1,0,-1,0}; type...
分类:其他好文   时间:2015-02-09 09:29:14    阅读次数:122
BZOJ 1009 HNOI 2008 GT考试 AC自动机+矩阵乘法
题目大意:给出一个不能出现的字符串,问长度为k的字符串有多少种。 思路:用给定串建立一个AC自动机(或者KMP随便了),然后跑矩阵乘法就行了。 CODE: #include #include #include #include #include using namespace std; int k,length,p; char s[MAX]; int so...
分类:其他好文   时间:2015-02-09 09:26:32    阅读次数:198
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!