文章列表
.tar
解包:tar xvf FileName.tar
打包:tar cvf FileName.tar DirName
(注:tar是打包,不是压缩!)
---------------------------------------------
.gz
解压1:gunzip FileName.gz
解压2:gzip -d FileName.gz
压缩:gzip FileName
.tar.gz 和 .tgz
解压:tar zxvf FileName.tar.gz
压缩:tar zcvf FileName.tar.gz DirName
------------------------------ ...
2009年参加硕士生入学考试已经结束了,初试计算机专业基础141,总成绩403分。我被清华大学计算机系网络研究所录取。在王道一直潜水的,出来发一贴,感谢王道。
一.准备工作(3月到5月)
选择报考的学校:
人人对于考研的看法都不一样,恐怕每一个要考研的人最想问的一个问题就是考研难吗?我的感觉是考研比高考要简单。我举几个计算机比较牛的学校,想分三个层次说明一下到底是个什么难度。单论难度的话,第一个层次以清华的计算机为例吧,清华计算机的录取线大概是360—370分这个区间。第二个层次我觉得浙大吧,不是说浙大是二等,不过浙大招收的人数比较多,所分数线相比较较低。浙大录取线大概在340分左右 ...
http://ac.jobdu.com/problem.php?id=1087
水~
#include <iostream>
#include <stdio.h>
#include <cmath>
using namespace std;
long long solved(long long key)
{
long long ans=0;
if(key==1)
return 1;
for(long long i=1;i<=sqrt(key);i++)
{
if(key % i==0)
if( ...
题目描述
http://ac.jobdu.com/problem.php?id=1088
水~
#include <iostream>
using namespace std;
int main()
{
int l,m;
int trees[10008];
while(cin>>l>>m)
{
int i,j,ans=0;
for(i=0;i<=l;i++)
trees[i]=0;
for(i=0;i<m;i++)
{
int a,b;
cin>>a>> ...
题目描述
在某条线路上有N个火车站,有三种距离的路程,L1,L2,L3,对应的价格为C1,C2,C3.其对应关系如下:
距离s 票价
0<S<=L1 C1
L1<S<=L2 C2
L2<S<=L3 C3
输入保证0<L1<L2<L3<10^9,0<C1<C2<C3<10^9。
每两个站之间的距离不超过L3。
当乘客要移动的两个站的距离大于L3的时候,可以选择从中间一个站下车,然后买票再上车,所以乘客整个过程中至少会买两张票。
现在给你一个 L1,L ...
同上题,不过改的spfa算法,注意每个节点进入队列的次数至多为n-1次(一共n个节点),若进入大于等于n次了,则说明图中存在负权回路,此时正好满足题目中时光倒流的要求,另外注意,vector每次用的时候清空。
下面是spfa算法的简单说明:
我们用数组d记录每个结点的最短路径估计值,而且用邻接表来存储图G。我们采取的方法是松弛:设立一个先进先出的队列用来保存待优化的结点,优化时每次取出队首结点u,并且用u点当前的最短路径估计值对离开u点所指向的结点v进行松弛操作,如果v点的最短路径估计值有所调整,且v点不在当前的队列中,就将v点放入队尾。这样不断从队列中取出结点来进行松弛操作,直至队列空为止。
...
poj3259http://poj.org/problem?id=3259
最简单的bellman,判断是否有负环,n-1次松弛后若还能松弛,则有负环
#include <iostream>
#include <fstream>
#define INF 999999999
using namespace std;
struct E
{
int u;
int v;
int w;
}edges[6000];
int n,m,w;
int countEdge;
int dist[1000];
void addEdge(in ...
#include<iostream>
#include<sstream>
#include<fstream>
#include<vector>
#include<list>
#include<deque>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<algorithm>
#include<cst ...
poj1860http://poj.org/problem?id=1860
#include <iostream>
#include <fstream>
#define ADJUST 0.00000001
using namespace std;
struct E
{
int start;
int end;
double r;
double c;
}e[108*108*2];
double v[108];
int m,n,s;
double origin;
void solved()
{
int j;
or ...
poj2109http://poj.org/problem?id=2109
很神奇的居然a了
#include <iostream>
#include <cmath>
using namespace std;
int main()
{
double a,b;
cout.precision(0);
cout.setf(ios_base::fixed);
while(cin>>a>>b)
cout<<exp(log(b)/a)<<endl;
return 0;
}
poj2027http://poj.org/problem?id=2027
just for fun
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
for(int i=0;i<n;i++)
{
int a,b;
cin>>a>>b;
if(a<b)
cout<<"NO BRAINS"<<endl;
else
cout<< ...
poj1328http://poj.org/problem?id=1328
比较简单的贪心,看代码,不细说了~
#include <iostream>
#include <fstream>
#include <algorithm>
#include <cmath>
using namespace std;
struct Space
{
double left;
double right;
friend bool operator<(Space a,Space b)
{
return a.left&l ...
poj1088http://poj.org/problem?id=1088
滑雪,DP,水题
#include <iostream>
#include <fstream>
using namespace std;
int node[105][105];
int dp[105][105];
int r,c;
int dpit(int i,int j)
{
if(dp[i][j]>0)
return dp[i][j];
int max=0;
if(j>1 && node[i][j]<node[i][j- ...
poj1003http://poj.org/problem?id=1003
super water~
#include <iostream>
using namespace std;
void waterit(double a)
{
int i=0;
double s=0.0;
while(s<a)
{
s=s+1.0/((double)i+2.0);
i++;
}
cout<<i<<" card(s)"<<endl;
}
int main()
{
d ...
poj1004http://poj.org/problem?id=1004
super water
#include <iostream>
using namespace std;
int main()
{
double ans=0;
for(int i=0;i<12;i++)
{
double temp;
cin>>temp;
ans+=temp;
}
ans/=12;
cout.setf(ios_base::fixed);
cout.setf(ios_base::showpoint);
...