自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(63)
  • 资源 (11)
  • 收藏
  • 关注

原创 开始写博客

如题。今后把每天做过的题目贴上来。天天给自己一个提醒。20091017   升到2级20091024   升到3级20091029   惊喜的发现终于在POJ水了50题了。哈哈20091115   升到4级20091116   升到5级20091125   升到6级20091125   升到7级 C++输出控制小数点:cout  

2009-10-11 12:35:00 238

原创 POJ2632

 摘要:模拟题,水#include using namespace std;const int size = 100;typedef struct Position{    int machine;    int dir;}Position;typedef struct Machine{    int x;    int y;}Machine

2009-11-25 21:27:00 341

原创 POJ2418

 摘要:水,排序 #include #include #include #include #include using namespace std;const int size = 1000000;string input[size];int main(){    char tree[50];    int index = 0;     

2009-11-25 21:25:00 358

原创 POJ2388

 摘要:数据太弱,排序就过了。可以做到o(n)#include #include using namespace std;const int size = 10000;int input[size+1] = {0};int main(){    int n;    scanf("%d", &n);    for(int i=1; i       

2009-11-25 21:23:00 292

原创 POJ2371

摘要:排序,水。#include #include #include using namespace std;const int size = 100000;int input[size+1] = {0};int main(){    int n;    scanf("%d", &n);    for(int i=1; i        sc

2009-11-25 21:19:00 464

原创 POJ2362

摘要:DFS, 和1151查不多,注意剪枝。 #include #include #include using namespace std;const int size = 20;int input[size];bool used[size];bool found = false;int M = 0;int sum = 0;void DFS(

2009-11-25 21:17:00 424

原创 POJ2301

 摘要:快被淹死了。。。 #includeusing namespace std;int main(){        int cyle,a,b;        cin>>cyle;        while(cyle--) {            cin>>a>>b;            if(a            cout      

2009-11-25 21:15:00 311

原创 POJ2245

 摘要:枚举,暴搜^_^ #include using namespace std;const int SIZE = 12;int input[SIZE] = {0};int k;    int main(){    int temp = 1;    while( cin >> k )    {        if( k == 0 )

2009-11-25 21:10:00 344

原创 POJ2159

摘要:读懂题意是关键,只要两个字符串每个频次的字母的个数相同就可以了。 #include #include using namespace std;const int size = 105;int main(){    char str1[size];    char str2[size];    int len1[size] = {0};   

2009-11-25 21:03:00 271

原创 POJ1979

摘要:BFS #include #include #include using namespace std;const int size = 20;int input[size+1][size+1] = {0};int flag[size+1][size+1] = {0};int sum = 0;struct Pos{    int x;  

2009-11-25 20:59:00 391

原创 POJ1753

 摘要:BFS, 状态压缩的搜索,位操作。  #include #include #include using namespace std;const int MAX_STATE = 0xffff;const int MIN_STATE = 0x0000;int step[MAX_STATE+1] = {0}; int getNextStat

2009-11-25 20:48:00 300

原创 POJ 1579

摘要:记忆化搜索,DFS#include #include #include using namespace std;const int size = 20;int value[size+1][size+1][size+1] = {0};int flag[size+1][size+1][size+1] = {0};int calculate(int a,

2009-11-25 20:47:00 350

原创 POJ1423

摘要:靠公式过的。都打表会超时,有牛人只对奇数打表过的。 #include #include #include using namespace std;const int PI = 3.1415926;int main(){          long long num;          int len;          int count;

2009-11-25 20:45:00 330

原创 POJ1411

打表求出100000以内的所有素数,再枚举就是了 #include #include #include using namespace std;bool checkPrime(int value){    int max_value = sqrt(value);    for(int i=2; i    {        if( value %

2009-11-25 20:32:00 447

原创 POJ1328

 摘要:贪心,把每个岛转成能覆盖他的雷达的区间。题目变成求最少的点使得每个区间内都有点。贪心:去点包含其他区间的区间(这个代码里没去,而是例外处理)。使每个点尽可能的往右。 #include #include #include using namespace std;const int size = 1000;typedef struct Interval{

2009-11-25 20:23:00 261

原创 POJ1068

 摘要:普通模拟题#include #include using namespace std;const int size = 100;int s[size+1]= {0};int f[size+1] = {0};int main(){    int n;    cin >> n;    for(int index=1; index     

2009-11-25 20:19:00 228

原创 POJ1028

 摘要:浏览器前进后退的实现,stack的操作 #include #include using namespace std;const int size = 100;string forward[size+1];string backward[size+1];int f_pos = 1;int b_pos = 1;int main(){   

2009-11-25 20:11:00 474

原创 POJ1019

 摘要:打表记录以断为单位的位数。 #include #include #include #include using namespace std;unsigned int table[31270] = {0};int calLen(int i){    if( i>= 1000000000 ){        return 10;     

2009-11-25 20:00:00 282

原创 POJ1012

 摘要:枚举的时候考虑剩下最后个 bad guy的时候,把圈打开排成队,bad guy作为最后一个。这时候要么是从bad guy开始或从第一个开始,从bad guy开始:m=t(k+1)+1 (t=1, 2, 3....)从第一个开始:m=t(k+1) (t=1, 2, 3...)例外在check每一个m的时候,每找到一个bad gun,就:total--;pos = pos-

2009-11-25 19:50:00 446

原创 POJ1004

 摘要:水,求平均数,不过学会了C++输出时候的控制小数点位数的方法:cout #include #include using namespace std;int main(){    double sum = 0;    double c;    for(int i=1; i        cin >> c;        sum += c;   

2009-11-25 19:35:00 238

原创 POJ1003

摘要:打表+二分查表水过。 #include #include using namespace std;const int size = 1000;float data[size+1];int findIndex(int left, int right, double value){    while( left         int mid =

2009-11-17 23:24:00 336

原创 POJ1002

摘要:再次败给cin, cout, 记得输入规模在100000以上要用scanf, printf, fget等,别用cin, cout.同时电话好码太少,用空间换时间的优势不明显,试过用sort,发现消耗的时间是一样的。。#include #include #include #include #include #include using namespace s

2009-11-17 23:21:00 223

原创 POL1007

 摘要:水,不过看了discuss后知道求逆序对数是可以o(n)内做到的。 #include #include #include using namespace std;typedef struct Node{    int value;    string sequence;}Node;const int size = 100;Node i

2009-11-17 23:12:00 224

原创 POJ1389

 摘要:还是矩形合并求面积,用1151的代码过了#include #include #include #include #include #include using namespace std;const int size = 50000;const int rectangle_num = 1000;typedef struct Vertical{

2009-11-16 23:30:00 432

原创 POJ3368

 摘要:话说看Discuss看了半天,茫茫然不知所云,硬着头皮自己写了个线段树,居然过了。。。#include #include using namespace std;typedef struct Node{    int left;    int right;    int left_value;    int right_value;    int

2009-11-16 22:41:00 372

原创 POJ3468

 摘要:节点里需要记录区间的和,区间的增量。以保证Insert和Calculate都是log(n)的,话说还不是很懂,看别人的代码过的。。#include #include using namespace std;const int size = 100000;typedef struct  Node{    int left;    int right;

2009-11-16 20:18:00 879

原创 POJ1256

 摘要:重复排列,因为输出是把字符串末尾的"/n"输出了.PE了还几次。。FT#include #include #include using namespace std;const int size = 13;char array[size+1] = {0};int n = 0;bool compare(char one, char two){  

2009-11-15 22:15:00 331

原创 POJ1011

摘要:DFS,剪支很重要。1。相同的数只要有一次碰到了但没选,接下来再碰到就不选了。比如数据5 2 1 5 2 1 5 2 1在一轮寻找中第一个2没选,那么接下来的2就都不要选。2。要先选大的数,这样就较少的接下来的可能行。别小看这个,看似漫不经心,其实很关键。没注意就会TLE,注意了就是0或16ms所以要给原序列从大到小排序。 #include #includ

2009-11-15 20:15:00 294

原创 POJ3277

 摘要:简单的矩形覆盖,用线段树+离散#include #include #include #include #include #include #include using namespace std;const int size = 40000;typedef struct Node{    int left;    int right;    int height;    Node * le

2009-11-15 14:03:00 687

原创 POJ2828

摘要:线段树,主要考虑用线段树的查询。注意反向思维,从最后一个开始判断位置。#include #include #include #include using namespace std;const int size = 200000;typedef struct Node{    int left;    int right;    int pos

2009-11-15 13:59:00 483

原创 POJ2777

摘要:颜色覆盖,典型的线段树应用#include #include #include using namespace std;typedef struct Node{    int left;    int right;    int color;    Node * left_child;    Node * right_child;    voi

2009-11-15 13:58:00 807

原创 POJ2352

摘要:线段树,主要考虑要用线段树查询#include #include using namespace std;const int size = 320000;const int N = 150000;typedef struct Node{    int left;    int right;    int nums;    Node * left

2009-11-15 13:56:00 478

原创 POJ1177

 摘要:矩形覆盖,求周长,线段树+离散+扫描,注意分别是X,Y方向两次扫描都求对应的“横边”#include #include #include #include #include #include using namespace std;const int size = 20000;const int rectangle_num = 5000;ty

2009-11-15 13:52:00 785

原创 POJ1151

摘要:矩形覆盖,求面积,线段树+离散+扫描#include #include #include #include #include #include using namespace std;const int size = 20000;const int rectangle_num = 100;typedef struct Vertical{  

2009-11-15 13:48:00 680

原创 POJ2528

 摘要:第二个线段树#include #include #include #include #include #include #include using namespace std;typedef struct Node{    int left;    int right;    int poster;    Node * left

2009-10-30 00:16:00 215

原创 POJ1298

 摘要:赶时间,水#include #include using namespace std;int main(){    string line;    while( getline(cin, line) ){        if(line!="START" || line=="ENDOFINPUT"){            break;      

2009-10-30 00:15:00 329

原创 POJ1769

摘要:第一个线段树,^_^注意别排序哦,按题目要求顺序已经固定了,所以不可以贪心。 #include #include #include using namespace std;typedef struct Node{    int left;    int right;    int minstep;    Node *left_child; 

2009-10-30 00:13:00 462

原创 POJ1006

摘要:就是加啊加啊加,加过的。。^_^#include using namespace std;const int p_cycle = 23;const int e_cycle = 28;const int i_cycle = 33;void  operation(int & p, int & e, int & i){    int temp = (

2009-10-29 00:02:00 237

原创 POJ1008

摘要:水,不过奇怪用atoi()怎么要包含algorithm,明天去看看书#include #include #include #include using namespace std;map h_month;map t_day;const int h_year_days = 365;const int t_year_days = 260;int

2009-10-28 23:59:00 214

原创 POJ1013

摘要:暴搜,测试每个或重或轻 #include #include using namespace std;typedef struct weighing{    string left;    string right;    string result;}weighing;weighing w[3];bool check(string co

2009-10-28 23:57:00 254

BIC拥塞控制算法论文

BIC拥塞控制算法论文

2019-11-18

算法艺术和信息学竞赛

两本黑书之一。不管你是竞赛还是学习,抑或工作,都值得一看。

2010-01-24

Bigtable论文

googlee的数据库系统,很有特点的数据库。

2010-01-24

MapReduce论文

google云计算三大技术之一。很简洁的模式,却很实用的技术。

2010-01-24

GFS(Google File System)论文

GFS的论文,google云计算三技术之一。

2010-01-24

Struts入门

经典好书!!共享一下

2008-03-09

汉字识别汉字识别

个人觉得不错,拿来分享一下

2008-03-08

JAVA程序员必读:基础篇

从基础学起,一步一步来

2008-03-08

STL源码剖析-侯捷

没分了.....居然,传点书,拿点分

2008-03-07

c++标准程序库

没什么好说,好书是了

2008-03-07

C++ Primer 源码

全套服务,中文的,英文的,习题答案,源码,我的资源里都有

2008-03-01

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除