#ifndef _LINKEDLIST_H_#define _LINKEDLIST_H_#include <stdexcept>using namespace std;class EmptyListException : public logic_error {public: EmptyListException(const string& what_arg ) throw() : logic_error ("Empty list exception: " + what_arg) {}};template <class T>cla ...
  • 18:26
  • 浏览 (83)
  • 评论 (0)
#ifndef _KMP_H_#define _KMP_H_template<typename T>void prefix(T* p, int m, int* next){ int k = -1; for(int i=0; i<m; i++) { while(k>-1 && p[i]!=p[k]) k=next[k]; if(p[i]==p[k+1]) next[i]=k+1; else next[i]=0; }}template<typename T>i ...
  • 18:24
  • 浏览 (61)
  • 评论 (0)
#ifndef _ADD_H_#define _ADD_H_ #include <iostream>#include <stack>#include <string> using namespace std; class BigNum; ostream &operator<<(ostream &os, BigNum &bn);istream &operator>>(istream &is, BigNum &bn); BigNum &operator+(BigNum &la ...
  • 18:24
  • 浏览 (62)
  • 评论 (0)
/////////////////////////////////////////////////////////////////////////////////// The Sort //// /////////////////////////////////////////////////////////// ...
  • 18:23
  • 浏览 (64)
  • 评论 (0)
DraculaW
搜索本博客
博客分类
最近加入圈子
存档
最新评论