原创 棧的最小值

今天刷題看到了一個求棧最小值的方法,覺得很不錯啊~~ class Solution { public: stack< pair<int,int> >s; void push(int value) {

原创 BUPT OJ 矩陣冪

水題 #include<iostream> #include<cstring> #define MAXSIZE 10 using namespace std; int k; class matrix { public: int n;

原创 BUPT OJ IP地址

水題 #include<iostream> #include<string> using namespace std; inline bool ipstring(string ip) { int threes=0; for(int i=0

原创 BUPT OJ 最小距離查詢

用了類似鄰接表的結構,一個vector,存放每種字母對應的出現位置,並在插入時排序。 用cin超時,scanf通過。。。  怪不得連題目描述裏都強行提示最好用scanf。。 #include<cstdio> #include<cstdli

原创 Trie樹

博客貼代碼老出錯也是醉了。。。 #include<iostream> using namespace std; struct node{ struct node*child[26]; int t; bool exist; no

原创 BUPT OJ 統計節點個數

#include<iostream> #define MAXSIZE 1000 using namespace std; class node { public: int degree; int parent; int nu

原创 BUPT OJ 中序遍歷序列

水 #include<iostream> #include<vector> #include<algorithm> using namespace std; int main() { int t,n,x; cin>>t;

原创 二叉排序樹

題目1467:二叉排序樹 時間限制:1 秒 內存限制:128 兆 特殊判題:否 提交:3883 解決:1566 題目描述:

原创 NowCoder猜想--牛客網題

           NowCoder猜想 反正沒人看,隨便寫寫,話說這還是我的第一篇博客。。。 時間限制:1秒空間限制:32768K通過比例:4.49%參與人數:729 題目描述 nowcoder在家極度無聊,於是找了張紙開始

原创 BUPT OJ 虛數

#include<iostream> #include<queue> #include<string> #include<cstdio> using namespace std; class complex { public: int

原创 BUPT OJ 文件系統

孩子兄弟表示法的多叉樹遍歷  #include<iostream> #include<string> using namespace std; enum type{file,dir}; class node { public: stri

原创 BUPT OJ 尋找寶藏

水題 #include<iostream> #include<iomanip> using namespace std; class node {public: int parent; int branches; node() {

原创 TreeMap排序記錄

記錄一下TreeMap對數據的排序,有點像桶排 public static void mysort(int[] nums) { TreeMap<Integer,Integer>data = new TreeMap

原创 Hadoop 經典案例:詞頻統計

全文作爲個人記錄用。不做任何參考。環境搭建參考:http://www.ityouknow.com/hadoop/2017/07/24/hadoop-cluster-setup.html詞頻代碼參考:https://blog.csdn.ne

原创 tomcat啓動報異常: java.util.zip.ZipException: invalid LOC header (bad signature)

轉載自    https://blog.csdn.net/limingjian/article/details/53925001原因是jar包下載缺損。到maven的reposity目錄下搜aether*****in-progress(可