显示下一条  |  关闭

郁闷的小昱

我就是一个二逼啊=。=!

 
 
 
 
 
 

poj3288

2011-11-12 0:13:21 阅读4 评论0 122011/11 Nov12

今天是光棍节,纪念一下,试试水。

#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int dp[513][513],flag[513],n,p;
int inf=0x3f3f3f3f;
typedef struct
{
    vector<int> adv;
}node;
node nod[513];
int dfs(int x)
{
    int i,j,k;
    for(v

作者  | 2011-11-12 0:13:21 | 阅读(4) |评论(0) | 阅读全文>>

ural 1018 一道可爱的树形dp

2011-10-24 21:47:37 阅读10 评论2 242011/10 Oct24

此题对于刚学树形dp的选手来讲比较难,但是静下心来一看,思路也不是没有,只需考虑每个节点是否取即可,两种状态。

本菜的原代码如下:

#include<cstdio>
#include<cstring>
#include<vector>
#include<algorithm>
using namespace std;
typedef struct
{
    vector<int> son;
}node;
node nod[102];
int dp[102][102],vis[102],con[102][102],n,q;
int dfs(int x)
{
    int i,j,k;

作者  | 2011-10-24 21:47:37 | 阅读(10) |评论(2) | 阅读全文>>

poj2486

2011-10-24 21:43:19 阅读4 评论0 242011/10 Oct24

傻逼dp题不解释。

代码如下:

#include<iostream>
#include<cstdio>
#include<vector>
#include<algorithm>
using namespace std;
int dp[513][513],flag[513],n,p;
int inf=0x3f3f3f3f;
typedef struct
{
    vector<int> adv;
}node;
node nod[513];
int dfs(int x)
{
    int i,j,k;
    for

作者  | 2011-10-24 21:43:19 | 阅读(4) |评论(0) | 阅读全文>>

hdoj2717 简单的bfs(无聊时可以写写)

2011-10-24 21:27:43 阅读4 评论1 242011/10 Oct24

其实这道题没什么价值(当你想到bfs时),有位兄弟说是想看看代码,于是本菜就写了一份,代码如下:

#include<iostream>
#include<cstdio>
#include<cstring>
#include<queue>
using namespace std;
int flag[2000002],n,k;
typedef struct
{
    int num,tim;
}node;
node a;
queue<node> q;
int bound(int x)
{
    if(x>=0&&x<=2*k)

作者  | 2011-10-24 21:27:43 | 阅读(4) |评论(1) | 阅读全文>>

poj2492

2011-10-24 21:14:28 阅读3 评论0 242011/10 Oct24

题目连接:http://xiaoyuwendao.blog.163.com/#m=0&t=0

郁闷的一题,原来可以说是无需任何调试就ac的,想不到我一运行程序就报中木马,=。=!后来索性直接交了,果断直接ac。。。

代码如下:

#include<cstdio>
#include<cstring>
#include<string>
using namespace std;
typedef struct
{
    int fa,re;
}node;
node nod[2002];

作者  | 2011-10-24 21:14:28 | 阅读(3) |评论(0) | 阅读全文>>

查看所有日志>>

 
 
 
 
 
 
 
 

江苏省 苏州市

 发消息  写留言

 
博客等级加载中...
今日访问加载中...
总访问量加载中...
最后登录加载中...
 
 
 
 
 
 
 
心情随笔列表加载中...
 
 
 
 
 
 
 
博友列表加载中...
 
 
 
 
 

发现好博客

 
 
列表加载中...
 
 
 
 
 
 
 
列表加载中...
 
 
 
 
 
 我要留言
 
 
 
留言列表加载中...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2012

   
创建博客 登录  
 关注