#include
#include
#include
using namespace std;
#ifdef ONLINE_JUDGE
#define FINPUT(file) 0
#define FOUTPUT(file) 0
#else ...
分类:
其他好文 时间:
2014-05-10 08:58:45
阅读次数:
281
1 #include 2 #include 3 using namespace std; 4
int nCases; 5 int m[1001], n[1001]; 6 char a[1001], b[1001]; 7 int main() 8 { 9
scanf("%d", &nCa...
分类:
其他好文 时间:
2014-05-10 05:14:19
阅读次数:
342
#include
#include
#include
using namespace std;
#ifdef ONLINE_JUDGE
#define FINPUT(file) 0
#define FOUTPUT(file) 0
#else...
分类:
其他好文 时间:
2014-05-10 04:48:25
阅读次数:
287
//#include
#include
#include
//using namespace std;
//const int MAXN=10;
//int Stack[MAXN];
stack s;
class Solution {
public:
int getNumber(int x)
{
//int lengthOfStack=0;...
分类:
其他好文 时间:
2014-05-10 04:45:29
阅读次数:
231
#include
#include
#include
using namespace std;
#ifdef ONLINE_JUDGE
#define FINPUT(file) 0
#define FOUTPUT(file) 0
#else ...
分类:
其他好文 时间:
2014-05-10 04:36:26
阅读次数:
269
在下例中,演示了链表的各种操作
#include
using namespace std;
typedef struct Node
{
int data; //数据域
struct Node * next; //指针域
}NODE, *PNODE; //NODE相当于struct Node, PNODE相当于struct Node *
PNODE CreateList()...
分类:
其他好文 时间:
2014-05-10 04:29:49
阅读次数:
263
题目:意思就是判断给定的几条线段是否有相交的。
方法:模版吧,有空在来细细学习。
代码:
#include
#include
using namespace std;
struct Point
{
double x,y;
};
struct LineSeg
{
Point a,b;
};
double Cross(Point a, Point b, Poi...
分类:
其他好文 时间:
2014-05-10 03:39:07
阅读次数:
326
#includeusing namespace std;const int maxn =
30000+100;int F[maxn], D[maxn], S[maxn];void set(int n){ for(int i =0 ;i
>P; char c; int a, b; while(P--)...
分类:
其他好文 时间:
2014-05-10 02:56:28
阅读次数:
313
相关性质 可查看维基百科"二叉查找树"关键性质:设root为二叉查找树的结点
如果a是root的左结点 key[a] 2 #include 3 using namespace std; 4 /*二叉查找树*/ 5
/*实现中假设关键元素互不相同*/ 6 typedef i...
分类:
其他好文 时间:
2014-05-10 02:28:24
阅读次数:
630