- 博客(20)
- 收藏
- 关注
原创 linux解压命令
.tar解包:tar xvf FileName.tar打包:tar cvf FileName.tar DirName(注:tar是打包,不是压缩!)---------------------------------------------.gz解压1:gunzip FileName.gz解压2:gzip -d FileName.gz压缩:gzip FileName...
2012-02-17 22:20:23 121
原创 转自王道论坛
[size=small]2009年参加硕士生入学考试已经结束了,初试计算机专业基础141,总成绩403分。我被清华大学计算机系网络研究所录取。在王道一直潜水的,出来发一贴,感谢王道。一.准备工作(3月到5月)选择报考的学校: 人人对于考研的看法都不一样,恐怕每一个要考研的人最想问的一个问题就是考研难吗?我的感觉是考研比高考要简单。我举几个计算机比较牛的学校,想分三个层次说明一...
2011-08-09 15:12:34 569
原创 2011清华考研机试题2
[url]http://ac.jobdu.com/problem.php?id=1087[/url]水~[code="c++"]#include #include #include using namespace std;long long solved(long long key){ long long ans=0; if(key==1) ret...
2011-08-09 14:56:04 109
原创 2011清华考研机试题1
题目描述[url]http://ac.jobdu.com/problem.php?id=1088[/url]水~[code="c++"]#include using namespace std;int main(){ int l,m; int trees[10008]; while(cin>>l>>m) { int i,j,ans=0; fo...
2011-08-09 14:40:19 107
原创 考研清华2011复试机考第三题
[color=blue][size=large]题目描述[/size][/color][size=small]在某条线路上有N个火车站,有三种距离的路程,L1,L2,L3,对应的价格为C1,C2,C3.其对应关系如下:距离s 票价0...
2011-08-09 13:51:11 351
原创 poj3259 spfa解法
同上题,不过改的spfa算法,注意每个节点进入队列的次数至多为n-1次(一共n个节点),若进入大于等于n次了,则说明图中存在负权回路,此时正好满足题目中时光倒流的要求,另外注意,vector每次用的时候清空。下面是spfa算法的简单说明:我们用数组d记录每个结点的最短路径估计值,而且用邻接表来存储图G。我们采取的方法是松弛:设立一个先进先出的队列用来保存待优化的结点,优化时每次取出队首结点...
2011-08-08 19:59:32 179
原创 poj3259 bellman水题
poj3259[url]http://poj.org/problem?id=3259[/url]最简单的bellman,判断是否有负环,n-1次松弛后若还能松弛,则有负环[code]#include #include #define INF 999999999using namespace std;struct E{ int u; int v; in...
2011-08-08 17:04:49 93
原创 acm题目常用的预处理
[code="c++"]#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#include#defin...
2011-08-08 15:26:07 134
原创 poj1860
poj1860[url]http://poj.org/problem?id=1860[/url][code="c++"]#include #include #define ADJUST 0.00000001using namespace std;struct E{ int start; int end; double r; double c;...
2011-08-08 14:06:13 88
原创 water~9
poj2109[url]http://poj.org/problem?id=2109[/url]很神奇的居然a了[code="c++"]#include #include using namespace std;int main(){ double a,b; cout.precision(0); cout.setf(ios_base::fixed...
2011-08-06 18:01:06 144
原创 water~8
poj2027[url]http://poj.org/problem?id=2027[/url]just for fun[code="c++"] #include using namespace std;int main(){ int n; cin>>n; for(int i=0;i>a>>b; if(a
2011-08-06 17:22:27 87
water~7
poj1328[url]http://poj.org/problem?id=1328[/url]比较简单的贪心,看代码,不细说了~[code="c++"]#include #include #include #include using namespace std;struct Space { double left; double right;...
2011-08-06 17:15:34 87
water~6
poj1088[url]http://poj.org/problem?id=1088[/url]滑雪,DP,水题[code="c++"]#include #include using namespace std;int node[105][105];int dp[105][105];int r,c;int dpit(int i,int j){ if(...
2011-08-06 14:27:22 89
原创 water~5
poj1003[url]http://poj.org/problem?id=1003[/url]super water~[code="c++"]#include using namespace std;void waterit(double a){ int i=0; double s=0.0; while(s
2011-08-06 14:24:18 115
原创 water~4
poj1004[url]http://poj.org/problem?id=1004[/url]super water[code="c++"]#include using namespace std;int main(){ double ans=0; for(int i=0;i>temp; ans+=temp; } ans/=12;...
2011-08-06 14:09:05 150
原创 water~3
poj2159[url]http://poj.org/problem?id=2159[/url]题目非常水,不过题意非常容易理解错。[code="c++"]#include #include #include using namespace std;int main(){ string str1,str2; int a[26],b[26]; in...
2011-08-06 13:59:22 87
原创 water~2
poj3299[url]http://poj.org/problem?id=3299[/url][code="c++"]#include #include #include #define EXP 2.718281828using namespace std;double funcE(double dewPoint){ return 6.11*pow(E...
2011-08-06 12:10:57 158
water~1
poj1503[url]http://poj.org/problem?id=1503[/url][code="c++"]#include #include #include #include using namespace std;string ans="0";string inputs[107];int counts;string adds(con...
2011-08-06 10:35:07 97
POJ3280 简单DP
poj3280:[url]http://poj.org/problem?id=3280[/url][size=small]简单的多子问题多选择dp问题:dp[i][j]表示字符下标为i到j的子字符串构成回文的最小消费,构成解的子问题有以下两种情况:1、str[i]!=str[j],则最小费用为dp[i][j]=min{dp[i+1][j]+cost(str[i]),dp[i][j-1]...
2011-08-05 14:48:42 190
POJ3253
poj3253:[url]http://poj.org/problem?id=3253[/url],简单的哈夫曼问题[code="c++"]#include #include #include using namespace std;struct cmp{ bool operator() (unsigned int x,unsigned int y) {...
2011-08-04 13:36:50 204
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人