12 2015 档案
摘要:import java.util.*;class animal{ void cry(){ } void get_animal_name(){ }}class dog extends animal{ String s1,s2; dog(String s1,String s2){ thi...
阅读全文
摘要:import java.util.*;public class Main { public static void main(String args[]){ Scanner cin=new Scanner(System.in); while(cin.hasNext(...
阅读全文
摘要:#include #include #include #include#define MAXSTRLEN 255 /* 可以在255以内定义最大串长 */typedef char SString[MAXSTRLEN + 1]; /* 0号单元存放串的长度 */void get_next(SS...
阅读全文
摘要:1 ///page71 2 ///测试样例:nihao 3 ///output 4 /*5 5 5 nihao 6 0 7 10 nihaonihao 8 4 aoni 9 4 10 14 nihaoaoninihao 11 9 noninihao 12 13 nombx...
阅读全文
摘要:///page61操作,非链式,顺式#include #include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2typedef ...
阅读全文
摘要:#include #include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2typedef int status;typedef ...
阅读全文
摘要://stack.h#include#include#define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define OVERFLOW -1#define UNDERFLOW ...
阅读全文
摘要:/* 课本p54页*/#include#include using namespace std;void move(int n, char a, char b){ printf("Move %c to %c.\n",a,b);}void hanoi(int n, char a, char b...
阅读全文
摘要:#include #include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2#define LIST_INIT_SIZE 100#...
阅读全文
摘要://************ 课本53页,用栈来实现的简单的四则运算表达式. '#'是表达式结束符, 注意在表达式输入完毕后需再输入一个'#'表示结束. eg:4+2*3-10/5# **********//#include#include #include #inc...
阅读全文
摘要:这个应该是以一个数组实现两个栈的共享。 ----------------------------------------------- | | | | | | | | | | | 长度为10的数组 ...
阅读全文
摘要:#include #include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2#define LIST_INIT_SIZE 100#...
阅读全文
摘要://双链循环线性表的表示与实现#include #include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2typedef int ...
阅读全文
摘要:/*Sample Inputsin(20+10){[}]Sample Outputyesno*/#include #include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE ...
阅读全文
摘要:/*n个人想玩残酷的死亡游戏,游戏规则如下: n个人进行编号,分别从1到n,排成一个圈,顺时针从1开始数到m,数到m的人被杀,剩下的人继续游戏,活到最后的一个人是胜利者。 请输出最后一个人的编号。Input输入n和m值。m>1。Output输出胜利者的编号。Sample Input5 3Sampl...
阅读全文
摘要:#include #include typedef struct lnode{ int data; struct lnode* next;} node,*linklist;void initlist(linklist &l){ linklist p=(linklist)mallo...
阅读全文
摘要:D.基础数据结构——单链表(2)(链表)Time Limit: 1000 MSMemory Limit: 32768 KTotal Submit: 192 (72 users) Total Accepted: 82 (67 users) Special Judge: No Description19...
阅读全文
摘要:#include #include #include #define TRUE 1#define FALSE 0#define OK 1#define ERROR 0#define INFEASIBLE -1#define OVERFLOW -2#define LIST_INIT_SIZE 100#...
阅读全文
摘要:/* ***********************************************Author :mubaixuCreated Time :2015-12-08 20:45:05File Name :线性表顺序存储操作********************...
阅读全文
摘要:/* ***********************************************Author :mubaixuCreated Time :2015-12-08 20:45:05File Name :线性表顺序存储操作********************************...
阅读全文
摘要:#includelong long cnt;long long a[500001],t[500001];void merge(long long *a,long long *t,int l,int m,int r){ int p = l; int q = m+1; int k =...
阅读全文
摘要:F - Supermarket Time Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 1456 F - Supermarket Submit Status Pra
阅读全文
摘要:HDU 1272 I - 小希的迷宫 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Practice HDU 1272 HDU 1272 I - 小希的迷宫 Submit Stat
阅读全文
摘要:G - A Bug's Life Time Limit:10000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2492 G - A Bug's Life Submit Status
阅读全文