`
Dev|il
  • 浏览: 125219 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论
文章列表

HDU2100Lovekey

Lovekey Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2812    Accepted Submission(s): 929 Problem Description XYZ-26进制数是一个每位都是大写字母的数字。 A、B、C、…、X、Y、Z 分别依次代表一个0 ~ 25 的数字,一个 n 位的26进制数转化成是10进制的规则如下 A0A1A2A3…An-1 的每一位代表的数字为a0a1a2a3…an-1 ,则该XYZ-2 ...
Reversi Time Limit: 5000/2000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 591    Accepted Submission(s): 251 Problem Description Reversi, also called Othello, is a two-sided game. Each of the two sides corresponds to one player; they are referred to here as li ...
Tempter of the Bone Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 26363    Accepted Submission(s): 7218 Problem Description The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze bega ...
#include <iostream> using namespace std; const int _N = 10000; int d[_N], p[_N]; bool flag[_N]; int n; void dfs(int pos) { int i; if(pos == n) { for(i = 0; i < n; i++) cout<<d[i]<<" "; cout<<endl; return; } for(i = 0; i < n; ...
连连看 Time Limit: 20000/10000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6496    Accepted Submission(s): 1660 Problem Description “连连看”相信很多人都玩过。没玩过也没关系,下面我给大家介绍一下游戏规则:在一个棋盘中,放了很多的棋子。如果某两个相同的棋子,可以通过一条线连起来(这条线不能经过其它棋子),而且线的转折次数不超过两次,那么这两个棋子就可以在棋盘上消去。不好意思,由于我以前没有玩 ...
Number Sequence Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 3450    Accepted Submission(s): 1555 Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 < ...
c实现 #include <iostream> using namespace std; //串的模式匹配算法 //返回字串t在主串s中第pos个字符后的位置,若不存在则返回0, 返回的位置可以是0 int Index(char s[], char t[], int pos) { int slen = strlen(s), tlen = strlen(t);; int i = pos, j = 0; while(i < slen && j < tlen) { if(s[i] == t[j]) { i++;j ...
A hard puzzle Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 13911    Accepted Submission(s): 4872 Problem Description lcy gives a hard puzzle to feng5166,lwg,JGShining and Ignatius: gave a and b,how to know the a^b.everybody objects to this ...
串的顺序实现 串的顺序结构实现有弊端: 1.串的最大长度固定 2.当串的长度超过MAXSTRLEN时,采用截尾法处理,这种方法不仅在求串的连接时可能发生,还在串的插入,置换也有可能发生. #include <iostream> using namespace std; #define MAXSTRLEN 255 //用户可以在255以内定义最大串长 #define TURE 1 #define FALSE 0 #define ERROR 0 #define OK 1 typedef unsigned char SString[MAXSTRLEN + 1]; //0号 ...
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 31804    Accepted Submission(s): 10554 Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favor ...
继上篇文章 直接贴代码 #include <iostream> using namespace std; #define ElemType int const int INIT_SIZE = 100; const int INCREMENT_SIZE = 10; //缺点:浪费空间 class Queue{ private: int front; int rear; int queue_total_size; ElemType *data; public: bool InitQueue(); //构造一个空队列 void Destory ...
队列的链式表示和实现    队列是一种先进先出的数据结构,和食堂排队打饭类似,在前面的先打到饭,而后来者只有等前面的打完饭,后面的才能进行 以下给出C++实现 #include <iostream> using namespace std; #define ElemType int typedef struct QNode{ ElemType data; struct QNode *next; }Node, *NodePtr; //72 //链队列 class Queue{ private: NodePtr front; //队头 NodePt ...
Treasure the new start, freshmen! Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4758    Accepted Submission(s): 1543 Problem Description background: A new semester comes , and the HDU also meets its 50th birthday. No matter what's your majo ...

HDU2251Seinfeld

Seinfeld Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 736    Accepted Submission(s): 381 Problem Description I’m out of stories. For years I’ve been writing stories, some rather silly, just to make simple problems look difficult ...
#include <iostream> using namespace std; #define ElemType int typedef struct LNode{ ElemType data; struct LNode *next; }Node; //链栈 class ListStack{ private: Node *head; int list_stack_size; Node * curr; public: ListStack() { list_stack_size = 0; head = curr = NUL ...
Global site tag (gtag.js) - Google Analytics