上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页
摘要: http://poj.org/problem?id=1661 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define INF 100000000 7 using namespace std; 8 9 int n,m,... 阅读全文
posted @ 2014-05-06 15:14 galaxy77 阅读(157) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1676题意:有n个城市和m条路,一辆车要从s城市到e城市,而且这辆车能够乘的油的容量为cap,每走1单位距离就耗费1单位油。每个城市都有加油站,但是每个加油站的价格不同。让你判断这辆车能否到达城市e,如果能够达到,... 阅读全文
posted @ 2014-05-06 15:10 galaxy77 阅读(220) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1023 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace ... 阅读全文
posted @ 2014-05-06 15:04 galaxy77 阅读(139) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1023 1 //package dhsjdhjkh; 2 3 import java.util.*; 4 import java.io.*; 5 import java.math.BigInteger; 6 7... 阅读全文
posted @ 2014-05-06 15:02 galaxy77 阅读(187) 评论(0) 推荐(0) 编辑
摘要: http://acm.fzu.edu.cn/problem.php?pid=2171 Problem 2171 防守阵地 II Accept: 73Submit: 256Time Limit: 3000 mSecMemory Limit :... 阅读全文
posted @ 2014-05-05 19:13 galaxy77 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 携程的一道图论题题意:给出一张无向图 每条边有一个长度和 删除该边的权值 再给出起点和终点 求从起点到终点的最短路增加 要删除的边的最小的权值和。【思路】要使从起点到终点的最短路长度增加 就要把该最短路破坏掉 从起点到终点的最短路可能不止一条,我们可以把 这些路径都找出来 重新构成一个图 ... 阅读全文
posted @ 2014-04-15 20:23 galaxy77 阅读(198) 评论(0) 推荐(0) 编辑
摘要: 本来都快写完了的 后来不小心删掉了 先占个坑 什么时候想写了 再填上吧 阅读全文
posted @ 2014-04-13 19:11 galaxy77 阅读(97) 评论(0) 推荐(0) 编辑
摘要: wa还没找出哪里的错误 先放这里#include#include#include#include#include#include#includeusing namespace std;int n,m;struct node{ int f,k;} p[50002];int find1(int x) //{ if(p[x].f==x) { p[x].k=0; return p[x].f=x; } int fa=find1(p[x].f); p[x].k=(p[x].k+p[p[x].f].k)%3; return p[x].f... 阅读全文
posted @ 2014-04-13 12:45 galaxy77 阅读(128) 评论(0) 推荐(0) 编辑
摘要: http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3772 ac 代码 1 #include 2 #include 3 #include 4 #define mod 1000000007 5 using namespace std; 6 7 struct node{long long mat[2][2];} a[100002]; 8 struct node2{int l,r; node matrix;} tree[440004]; //树的节点 9 10 node mul(node a,node b) // 两个矩阵... 阅读全文
posted @ 2014-04-07 18:44 galaxy77 阅读(128) 评论(0) 推荐(0) 编辑
摘要: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2085A.囧Time Limit: 1000 MSMemory Limit: 65536 KTotal Submit: 80 (40 users)Total Accepted: 34 (34 users)Special Judge: NoDescriptionDS最近很囧,总是不能把妹子哄开心。所以,邪恶的他也想让你们囧一囧。他给你一个数字 n 让你输出囧字的迭代(详见样例)。 Input第一行一个整数,代表数据的组数。 每组数据一 阅读全文
posted @ 2014-03-30 15:02 galaxy77 阅读(483) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 20 下一页