摘要:
#include<iostream>#include<cmath>using namespace std;char s[2][2];int main(){ int i; double h=0,t=0,d=0,temp,a[2]; while(cin>>s[0] && s[0][0]!='E') { cin>>a[0]>>... 阅读全文
posted @ 2010-05-12 13:38
VRS
阅读(165)
评论(0)
推荐(0)
摘要:
本来这篇文章应该开博第一天就来写的,鉴于前两天一直忙,没时间来写写。 其实我开博客原因很简单,并非要吸引点击率(本来就不是什么名人),只是想作为自己的小地盘,把一些学习工作的资料统一管理,收藏别人的好文章,分享自己的一点体会,作为与其他技术人员交流的平台。 写文章本来就不是自己的长项,但我也不想在这个博客里吹水,希望尽可能保留好一点的博文,可能借鉴别人的比较多吧。 阅读全文
posted @ 2010-05-12 13:34
VRS
阅读(111)
评论(0)
推荐(0)
摘要:
1.读计算机研究生最好要有实际际开发经验 这里所说的“有实际开发工作经验”通常应该具备:1)你已经认为C++和汇编语言都是很简单的语言,并能够自如地运用; 2)你完全理解STL为什么这么重要;3)你能够在30分钟之内想到正确的五子棋AI算法设计思路和方向;4)你能够独立地解决所有的编译与链接问题,哪怕你从来没有遇到的问题,你也不需要询问任何人;5)英文网站是你的首要信息来源... 阅读全文
posted @ 2010-05-12 13:23
VRS
阅读(232)
评论(0)
推荐(0)
摘要:
我编译的是在Ubuntu9.10下编译 Linux-2.6.33内核(原来内核Linux-2.6.31.……)首先需要前期准备,由于Ubuntu没有相关的编译工具,所以应该先安装Vim,build-essential,ncurses-dev这几个工具前期准备:1. 安装编译器(这其实是一个开发工具包) sudo apt-get install build-essenti... 阅读全文
posted @ 2010-05-12 13:16
VRS
阅读(1994)
评论(0)
推荐(2)
摘要:
#include<iostream>using namespace std;char s[100];int a[100000];int main(){ int i,n,num,valu; cin>>n; while(n--) { cin>>s; cin>>num; for(i=0;i<num;i++) cin>>a[i]; i... 阅读全文
posted @ 2010-05-12 13:12
VRS
阅读(161)
评论(0)
推荐(0)
摘要:
//////////////////////////////////////////////////////////////最安全逃芝加哥路径//用单源最短路径法//在本题中的prev[]没有用到,这是用于构造最短路径的,本题不需要#include<iostream>#include<iomanip>using namespace std;#define MIN 0.0do... 阅读全文
posted @ 2010-05-12 13:11
VRS
阅读(488)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int num; int n; cin>>n; while(n--) { cin>>num; int i; int sum=0; for(i=0;i<num;i++) { int temp; cin>>temp; sum+=temp; ... 阅读全文
posted @ 2010-05-12 13:11
VRS
阅读(101)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;char st[1000];int main(){ while(cin.getline(st,990) && st[0]!='#') { int len=strlen(st); int i; long sum=0; for(i=0;i<len;i++) if(st[i]!=' ')... 阅读全文
posted @ 2010-05-12 13:11
VRS
阅读(208)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<math.h>using namespace std;int main(){ long n; cin>>n; while(n--) { long num; cin>>num; if(num<=10) cout<<num<<endl; else { long ... 阅读全文
posted @ 2010-05-12 13:09
VRS
阅读(179)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<string>using namespace std;struct Item{ char st[10]; bool flag;}from[25],to[25];void move(int sta_pos,int req_pos){ strcpy(to[req_pos].st,from[sta_pos].st); from... 阅读全文
posted @ 2010-05-12 13:09
VRS
阅读(201)
评论(0)
推荐(0)
摘要:
#include<iostream.h>#include<math.h>//using namespace std;int main(){ int a,i,jishu; while(cin>>a && a!=0) { jishu=0; i=0; while(!i) { i=a%2; a/=2; if(i==0) jishu++; } ... 阅读全文
posted @ 2010-05-12 13:08
VRS
阅读(144)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;long st[50000];int main(){ int casenum; cin>>casenum; while(casenum--) { int n; cin>>n; int i; st[1]=0; for(i=2;i<=n;i++) cin>>st[... 阅读全文
posted @ 2010-05-12 13:08
VRS
阅读(154)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int casenum; cin>>casenum; while(casenum--) { int sum,dif; cin>>sum>>dif; if(sum<dif || 1==(sum-dif)%2) //当sum<dif或一奇... 阅读全文
posted @ 2010-05-12 13:07
VRS
阅读(188)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;bool fun(int n){ int sum=0; int temp=n; while(temp!=0) { sum+=temp%10; temp/=10; } temp=n; int sum2=0; while(temp!=0) { sum2+=temp%12; temp/=12; } if(su... 阅读全文
posted @ 2010-05-12 13:07
VRS
阅读(160)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;long st[1000000];int main(){ long casenum; cin>>casenum; while(casenum--) { long len,num; cin>>len>>num; long i; for(i=0;i<num;i++)... 阅读全文
posted @ 2010-05-12 13:06
VRS
阅读(233)
评论(0)
推荐(0)
摘要:
#include<iostream>#include<string>using namespace std;struct MAN{ float sp; int a,b; char name[40];}man[3];int main(){ man[0].sp=4.5; man[0].a=150; man[0].b=200; strcpy(man[0].name,"Wide R... 阅读全文
posted @ 2010-05-12 13:05
VRS
阅读(148)
评论(0)
推荐(0)
摘要:
//2345国王金币数//思路:先找出allnum(allnum<=n)使allnum=1+2+3+…+k,同时算出k,则f(allnum)=∑i^2,// 而f(n)=f(allnum)+(n-allnum)*(k+1). 已知公式∑i^2=k*(k+1)*(2k+1)/6#include<iostream>#include<math.h&g... 阅读全文
posted @ 2010-05-12 13:05
VRS
阅读(261)
评论(0)
推荐(0)
摘要:
//关键是一条公式#include <iostream>#include <iomanip>#include <math.h>using namespace std;int main(){ int case_num; cin>>case_num; while(case_num--) { double ka,ori; //这里科学记录法可以作为输入 ... 阅读全文
posted @ 2010-05-12 13:05
VRS
阅读(214)
评论(0)
推荐(0)
摘要:
///////////////////////////////////////////////////// 1677474 2008-10-25 14:46:52 Accepted 2202 C++ 0 192 VRS //计算编码后再译码的种数//利用分治法,把字符串s二分为s1和s2,再把两部分的种数相乘//注意情况:合并s1和s2时,考虑相邻接的两数可以组成一个编码,还有对0的多种情况的讨论... 阅读全文
posted @ 2010-05-12 13:03
VRS
阅读(290)
评论(0)
推荐(0)
摘要:
#include<iostream>using namespace std;int main(){ int num; while(cin>>num && num!=-1) { int old,cur; int cost; int sum=0; old=0; while(num--) { cin>>cost>>cur; su... 阅读全文
posted @ 2010-05-12 13:01
VRS
阅读(149)
评论(0)
推荐(0)