会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
xlc2845
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
14
15
16
17
18
19
20
21
22
下一页
2013年8月7日
spoj 62
摘要: 看了题解 自己好水 ......#include #include struct node{ int x,y;};node A,B;node add(node &a,node &b){ node f; f.x = a.x+b.x; f.y = a.y+b.y; ret...
阅读全文
posted @ 2013-08-07 15:10 xlc2845
阅读(111)
评论(0)
推荐(0)
2013年8月6日
hdu 1087
摘要: 动规 d[i]记录以第 i 个数结尾的最大值#include #include #include #define maxn 1010using std::max;int dp[maxn];int value[maxn];int main(){ int n,_max; while(scan...
阅读全文
posted @ 2013-08-06 21:12 xlc2845
阅读(124)
评论(0)
推荐(0)
hdu 4648
摘要: 求一个数列中 去掉一些连续的数之后 不改变对m取余后的值就是求一个最长的连续子序列 对m取余后为0 我的方法可能比较水#include#include#include#include #include #include #include #define maxn 100010using namesp...
阅读全文
posted @ 2013-08-06 21:07 xlc2845
阅读(117)
评论(0)
推荐(0)
spoj 1436
摘要: 用并查集看一下是否会围成一个环 若围成环直接输出NO 当然 当 m >= n 时必然会围成环直接输出NO#include #include #include using namespace std;int f[10010];int find(int x){ return f[x] == x ...
阅读全文
posted @ 2013-08-06 20:36 xlc2845
阅读(143)
评论(0)
推荐(0)
uva 10034
摘要: 计算所有点之间的权值 然后就是最小生成树#include#include#include#include#include#include#includeusing namespace std;struct point{ double x,y;};struct edge{ int u,v...
阅读全文
posted @ 2013-08-06 16:42 xlc2845
阅读(115)
评论(0)
推荐(0)
uva 10608
摘要: 简单并查集 水水.....#include #include #define maxn 30005int fa[maxn],ans[maxn],n,m;int findd( int x ){ return fa[x] == x ? x : fa[x] = findd(fa[x]);}int m...
阅读全文
posted @ 2013-08-06 11:42 xlc2845
阅读(126)
评论(0)
推荐(0)
poj 1862
摘要: 弱弱地排个序 然后过了 .....#include #include #include #include #include using namespace std;double a[110];int cmp(double x, double y){ return x > y;}int main...
阅读全文
posted @ 2013-08-06 10:31 xlc2845
阅读(117)
评论(0)
推荐(0)
hdu 4403
摘要: 水水的dfs#include #include #include #include #include using namespace std;char b[20];int a[20], ans;void dfs(int cur, int len){ if(cur == len - 1) ...
阅读全文
posted @ 2013-08-06 10:30 xlc2845
阅读(100)
评论(0)
推荐(0)
uva 10810
摘要: 刘汝佳书上 143 归并排序求逆序数对#include #include #include #include #include using namespace std;int a[500010],b[500010];long long ans;void merge_sort(int *A, int ...
阅读全文
posted @ 2013-08-06 10:28 xlc2845
阅读(135)
评论(0)
推荐(0)
2013年8月5日
ural 1250
摘要: 有点坑的dfs 看懂题应该就会做了 神圣海必然围成一个圈 dfs将神圣还外围的全部去掉 简单题#include #include #include using namespace std;int dx[] = {1, 1, 1, -1, -1, -1, 0, 0};int dy[] = {1, 0...
阅读全文
posted @ 2013-08-05 21:18 xlc2845
阅读(128)
评论(0)
推荐(0)
上一页
1
···
14
15
16
17
18
19
20
21
22
下一页
公告