|
凌肯 (lingken22006)
|
31ms |
8.2 MiB |
|
222 Bytes |
2022-7-31 18:54:34 |
|
赵泳鑫 (zhaoyongxin)
|
31ms |
8.2 MiB |
|
290 Bytes |
2022-4-12 18:29:11 |
|
罗翌珂 (dangdang)
|
31ms |
8.2 MiB |
|
183 Bytes |
2022-8-27 10:36:31 |
|
zhuqiwei22006
|
31ms |
8.2 MiB |
|
125 Bytes |
2022-4-27 20:47:40 |
|
luoluonuoya
|
31ms |
8.2 MiB |
|
170 Bytes |
2022-1-24 12:55:40 |
|
icwy (zuolun)
|
31ms |
8.2 MiB |
|
157 Bytes |
2022-5-21 13:51:54 |
|
wangshuo
|
31ms |
8.2 MiB |
|
161 Bytes |
2022-10-23 12:04:51 |
|
ywh
|
31ms |
8.2 MiB |
|
159 Bytes |
2022-1-24 15:33:36 |
|
hangge
|
31ms |
8.2 MiB |
|
106 Bytes |
2023-5-30 19:08:07 |
|
中二游侠(๑•̀ㅂ•́)و✧ (张凯翔)
|
31ms |
8.2 MiB |
|
214 Bytes |
2022-7-9 9:04:56 |
|
杨浩灵 (金坷拉)
|
31ms |
8.2 MiB |
|
110 Bytes |
2022-7-9 16:04:57 |
|
luojunyang
|
31ms |
8.2 MiB |
|
135 Bytes |
2022-1-21 18:58:33 |
|
NJL (NJlL)
|
31ms |
8.2 MiB |
|
146 Bytes |
2022-4-17 16:30:50 |
|
手搓STL stack 双向无环链表 _ 向量 2种实现方式: template <typename Map_Type> class Stack_l /* Stack _ List */ { private: struct Node { Map_Type Node_Data; Node *nextp, *lastp; Node(void) { nextp = 0; lastp = 0; } }; struct List_Data { unsigned int List_Size; Node *headp, *endp; List_Data(void) { List_Size = 0; headp = 0; endp = 0; } }Data; struct Vector_Data { Map_Type *headp, *lastp, *endp; void resize(unsigned int data_size) { Map_Type *newp = new Map_Type[data_size](); endp = newp + data_size - 1; lastp = newp + (data_size > lastp - headp ? lastp - headp : data_size); if (headp) delete[] headp; headp = newp; } Vector_Data(void) { headp = 0; lastp = 0; endp = 0; } }; public: unsigned int size(void) { return Data.List_Size; } Map_Type& top(void) { return Data.endp -> Node_Data; } void* data(void) { return &Data; } bool empty(void) { return !((bool)Data.headp); } Stack_l<Map_Type>& push(Map_Type push_data) { Node *nodep = new Node(); nodep -> lastp = Data.endp; if (!Data.headp) { Data.headp = nodep; Data.endp = nodep; } else Data.endp -> nextp = nodep; Data.endp = nodep; nodep -> Node_Data = push_data; ++Data.List_Size; return *this; } Stack_l<Map_Type>& push(Map_Type& push_data) { Node *nodep = new Node(); nodep -> lastp = Data.endp; if (!Data.headp) { Data.headp = nodep; Data.endp = nodep; } else Data.endp -> nextp = nodep; Data.endp = nodep; nodep -> Node_Data = push_data; ++Data.List_Size; return *this; } Stack_l<Map_Type>& push(Map_Type* push_data) { Node *nodep = new Node(); nodep -> lastp = Data.endp; if (!Data.headp) { Data.headp = nodep; Data.endp = nodep; } else Data.endp -> nextp = nodep; Data.endp = nodep; nodep -> Node_Data = *push_data; ++Data.List_Size; return *this; } Stack_l<Map_Type>& push(const Map_Type* push_data) { Node *nodep = new Node(); nodep -> lastp = Data.endp; if (!Data.headp) { Data.headp = nodep; Data.endp = nodep; } else Data.endp -> nextp = nodep; Data.endp = nodep; nodep -> Node_Data = *(Map_Type*)push_data; ++Data.List_Size; return *this; } Stack_l<Map_Type>& pop(void) { if (Data.headp) { if (Data.List_Size == 1u) { delete Data.headp; Data.List_Size = 0; Data.headp = 0; Data.endp = 0; } else { Data.endp = Data.endp -> lastp; delete Data.endp -> nextp; Data.endp -> nextp = 0; --Data.List_Size; } } return *this; } Stack_l<Map_Type>& clear(void) { while (Data.List_Size) { pop(); } return *this; } Stack_l<Map_Type>(void) { /* NULL */ } Stack_l<Map_Type>(unsigned int data_size, Map_Type map_data) { Data.List_Size = data_size; while (data_size--) { Node *nodep = new Node(); nodep -> Node_Data = map_data; if (Data.headp) { nodep -> lastp = Data.endp; Data.endp -> nextp = nodep; Data.endp = nodep; } else { Data.headp = nodep; Data.endp = nodep; } } } Stack_l<Map_Type>(Stack_l<Map_Type>& map_data) { if (!map_data.empty()) { List_Data *listp = (List_Data*)map_data.data(); Node *nodep = listp -> headp, *newp; for (unsigned int i = 0; i != listp -> List_Size; ++i, nodep = nodep -> nextp) { newp = new Node(); newp -> Node_Data = nodep -> Node_Data; if (Data.headp) { newp -> lastp = Data.endp; Data.endp -> nextp = newp; Data.endp = newp; } else { Data.headp = newp; Data.endp = newp; } } Data.List_Size = listp -> List_Size; } } Stack_l<Map_Type>& operator=(Stack_l<Map_Type>& copy_data) { if (copy_data.empty()) return *this; List_Data *listp = (List_Data*)copy_data.data(); Node *nodep = listp -> headp, *newp; for (unsigned int i = 0; i != listp -> List_Size; ++i, nodep = nodep -> nextp) { newp = new Node(); newp -> Node_Data = nodep -> Node_Data; if (Data.headp) { newp -> lastp = Data.endp; Data.endp -> nextp = newp; Data.endp = newp; } else { Data.headp = newp; Data.endp = newp; } } Data.List_Size = listp -> List_Size; return *this; } bool operator==(Stack_l<Map_Type>& cmp_data) { if (cmp_data.size() != Data.List_Size) return false; else if (cmp_data.empty() && (!Data.List_Size)) return true; Node *nodep1 = Data.headp, *nodep2 = ((List_Data*)cmp_data.data()) ->headp; for (unsigned int i = 0; i != Data.List_Size; ++i, nodep1 = nodep1 -> nextp, nodep2 = nodep2 ->nextp) { if (nodep1 -> Node_Data != nodep2 -> Node_Data) return false; } return true; } bool operator!=(Stack_l<Map_Type>& cmp_data) { if (cmp_data.size() == Data.List_Size) return false; else if (cmp_data.empty() && (!Data.List_Size)) return false; Node *nodep1 = Data.headp, *nodep2 = ((List_Data*)cmp_data.data()) ->headp; for (unsigned int i = 0; i != Data.List_Size; ++i, nodep1 = nodep1 -> nextp, nodep2 = nodep2 ->nextp) { if (nodep1 -> Node_Data != nodep2 -> Node_Data) return true; } return true; } ~Stack_l<Map_Type>(void) { clear(); } }; /* Stack _ List */ template <typename Map_Type> class Stack_v /* Stack _ Vector */ { private: struct Node { Map_Type Node_Data; Node *nextp, *lastp; Node(void) { nextp = 0; lastp = 0; } }; struct List_Data { unsigned int List_Size; Node *headp, *endp; List_Data(void) { List_Size = 0; headp = 0; endp = 0; } }; struct Vector_Data { Map_Type *headp, *lastp, *endp; void resize(unsigned int data_size) { Map_Type *newp = new Map_Type[data_size](); endp = newp + data_size - 1; lastp = newp + (data_size > lastp - headp ? lastp - headp : data_size); if (headp) delete[] headp; headp = newp; } Vector_Data(void) { headp = 0; lastp = 0; endp = 0; } }Data; public: unsigned int size(void) { return Data.lastp - Data.headp; } Map_Type& top(void) { return *(Data.lastp - 1); } void* data(void) { return &Data; } bool full(void) { if (!Data.headp) return true; return Data.endp + 1 == Data.lastp; } bool empty(void) { if (!Data.headp) return true; return Data.headp == Data.lastp; } Stack_v<Map_Type>& push(Map_Type push_data) { if (full()) Data.resize((unsigned int)((Data.lastp - Data.headp) * 1.5) + 1); *Data.lastp = push_data; ++Data.lastp; return *this; } Stack_v<Map_Type>& push(Map_Type& push_data) { if (full()) Data.resize((unsigned int)((Data.lastp - Data.headp) * 1.5) + 1); *Data.lastp = push_data; ++Data.lastp; return *this; } Stack_v<Map_Type>& push(Map_Type* push_data) { if (full()) Data.resize((unsigned int)((Data.lastp - Data.headp) * 1.5) + 1); *Data.lastp = *push_data; ++Data.lastp; return *this; } Stack_v<Map_Type>& push(const Map_Type* push_data) { if (full()) Data.resize((unsigned int)((Data.lastp - Data.headp) * 1.5) + 1); *Data.lastp = *(Map_Type*)push_data; ++Data.lastp; return *this; } Stack_v<Map_Type>& pop(void) { if (empty()) { if (Data.lastp - Data.headp > 1) Data.resize((Data.lastp - Data.headp) >> 1); else return *this; } else --Data.lastp; return *this; } Stack_v<Map_Type>(void) { /* NULL */ } Stack_v<Map_Type>(unsigned int data_size, Map_Type map_data) { while (data_size) { push(&map_data); --data_size; } } Stack_v<Map_Type>(Stack_v<Map_Type>& map_data) { Vector_Data *datap = (Vector_Data*)map_data.data(); for (unsigned int i = 0, k = map_data.size(); i != k; ++i) push(datap -> headp + i); } Stack_v<Map_Type>& operator=(Stack_v<Map_Type>& copy_data) { if (copy_data.empty()) clear(); else { Vector_Data *datap = (Vector_Data*)copy_data.data(); for (unsigned int i = 0, k = copy_data.size(); i != k; ++i) push(datap -> headp + i); } return *this; } bool operator==(Stack_v<Map_Type>& cmp_data) { if (size() != cmp_data.size()) return false; else if (empty() && cmp_data.empty()) return true; Vector_Data *datap = (Vector_Data*)cmp_data.data(); for (unsigned int i = 0, k = size(); i != k; ++i) { if (*(Data.headp + i) != *(datap ->headp + i)) return false; } return true; } bool operator!=(Stack_v<Map_Type>& cmp_data) { if (size() != cmp_data.size()) return true; else if (empty() && cmp_data.empty()) return false; Vector_Data *datap = (Vector_Data*)cmp_data.data(); for (unsigned int i = 0, k = size(); i != k; ++i) { if (*(Data.headp + i) != *(datap -> headp + i)) return true; } return false; } Stack_v<Map_Type>& clear(void) { delete[] Data.headp; Data.headp = 0; Data.lastp = 0; Data.endp = 0; return *this; } ~Stack_v<Map_Type>(void) { delete[] Data.headp; } }; /* Stack _ Vector */ int main(void) { return 0; } (22029-xys)
|
31ms |
8.2 MiB |
|
176 Bytes |
2023-4-15 12:08:02 |
|
姚宏逸
|
31ms |
8.2 MiB |
|
165 Bytes |
2022-4-4 13:43:11 |
|
李彦臻
|
31ms |
8.2 MiB |
|
160 Bytes |
2022-11-17 10:43:02 |
|
张泰凌 (ztl)
|
31ms |
8.2 MiB |
|
249 Bytes |
2022-6-11 9:32:06 |
|
xuaonan
|
31ms |
8.2 MiB |
|
170 Bytes |
2022-10-4 18:01:38 |
|
刘昊臻 (liuhaozhen)
|
31ms |
8.2 MiB |
|
149 Bytes |
2023-2-21 20:28:55 |
|
chaikexu
|
31ms |
8.2 MiB |
|
134 Bytes |
2022-12-2 21:49:17 |
|
奇怪的正义人! (leweiqi)
|
31ms |
8.2 MiB |
|
136 Bytes |
2022-10-28 21:36:50 |
|
Jack
|
31ms |
8.2 MiB |
|
116 Bytes |
2022-8-2 17:14:44 |
|
05c05-zjk
|
31ms |
6.9 MiB |
|
174 Bytes |
2022-12-16 20:01:55 |
|
爱琴海校区-黄辰浩 (huangchenhao)
|
31ms |
8.2 MiB |
|
176 Bytes |
2023-3-26 17:11:33 |
|
ycy
|
31ms |
8.2 MiB |
|
124 Bytes |
2022-7-17 10:08:48 |
|
蒋青峰
|
31ms |
6.9 MiB |
|
122 Bytes |
2023-2-12 15:57:36 |
|
无尽的想象 (谭仕高)
|
31ms |
8.2 MiB |
|
199 Bytes |
2022-7-12 18:16:57 |
|
王瀚毅 (wanghanyi)
|
31ms |
8.2 MiB |
|
157 Bytes |
2022-10-23 12:04:59 |
|
詹宇航 (zyh7)
|
31ms |
8.2 MiB |
|
133 Bytes |
2022-3-27 20:55:06 |
|
任远宁 (renyuanning)
|
31ms |
8.2 MiB |
|
186 Bytes |
2022-8-5 17:44:09 |
|
ask (ayk)
|
31ms |
8.2 MiB |
|
106 Bytes |
2022-10-14 18:02:30 |
|
贾鑫豪 (Mr Sam)
|
31ms |
8.2 MiB |
|
187 Bytes |
2022-6-11 13:26:06 |
|
huyinuo
|
31ms |
8.2 MiB |
|
151 Bytes |
2022-2-20 9:25:06 |
|
杨瀚霖 (yanghanlin)
|
31ms |
8.2 MiB |
|
164 Bytes |
2023-2-13 22:11:21 |
|
05c05-lyx
|
31ms |
8.2 MiB |
|
136 Bytes |
2022-6-9 20:39:22 |
|
kkksc03 (彭士锋)
|
31ms |
8.2 MiB |
|
146 Bytes |
2022-3-5 14:52:36 |
|
dmh (丁墨涵)
|
31ms |
8.2 MiB |
|
165 Bytes |
2022-1-28 15:08:21 |
|
ttz
|
31ms |
8.2 MiB |
|
167 Bytes |
2022-3-17 21:16:40 |
|
谢靳骁 (XJX)
|
31ms |
6.7 MiB |
|
162 Bytes |
2023-5-12 20:31:14 |
|
ymj
|
31ms |
8.2 MiB |
|
143 Bytes |
2023-5-13 9:17:49 |
|
cheers 戴 (daizhuorun)
|
31ms |
8.2 MiB |
|
162 Bytes |
2022-4-9 15:50:43 |
|
https://www.crazygames.com/game/kiomet-com (chensitong)
|
31ms |
8.2 MiB |
|
158 Bytes |
2022-5-22 15:59:10 |
|
Stacy (陈妍西)
|
31ms |
7.9 MiB |
|
172 Bytes |
2023-6-18 16:15:51 |
|
朱泽晟
|
31ms |
8.2 MiB |
|
164 Bytes |
2022-2-11 19:13:30 |
|
zhangyh (张育菡)
|
31ms |
8.2 MiB |
|
142 Bytes |
2022-6-10 22:06:33 |
|
hnd (陈皓洋)
|
32ms |
8.2 MiB |
|
312 Bytes |
2022-8-27 16:11:38 |
|
王重道
|
32ms |
8.2 MiB |
|
208 Bytes |
2022-4-16 15:27:35 |
|
05c35-dyh
|
32ms |
8.2 MiB |
|
177 Bytes |
2022-5-27 20:11:53 |
|
梨冻亿 (wiueh)
|
32ms |
8.2 MiB |
|
117 Bytes |
2022-1-22 19:20:58 |
|
诸禹吉 (zhuyuji)
|
32ms |
8.2 MiB |
|
150 Bytes |
2022-3-12 18:31:01 |
|
CK (李弘毅)
|
32ms |
8.2 MiB |
|
195 Bytes |
2022-12-3 16:34:27 |
|
林文杰 (057)
|
32ms |
8.2 MiB |
|
151 Bytes |
2022-3-18 18:25:10 |
|
熊奕博 (Mothefuck)
|
32ms |
8.1 MiB |
|
209 Bytes |
2022-8-24 21:07:27 |
|
wangruibo20xh
|
32ms |
8.2 MiB |
|
112 Bytes |
2022-1-22 11:17:51 |
|
陈秋石
|
32ms |
8 MiB |
|
149 Bytes |
2022-8-27 10:56:15 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
32ms |
7.7 MiB |
|
222 Bytes |
2022-9-6 20:16:10 |
|
Tender. (05c05-zhou)
|
32ms |
8.2 MiB |
|
146 Bytes |
2022-5-27 19:21:46 |
|
希蒙 (zhengxingya)
|
32ms |
8.2 MiB |
|
233 Bytes |
2023-8-14 15:20:14 |
|
zyq1
|
32ms |
8.2 MiB |
|
236 Bytes |
2023-5-15 19:16:09 |
|
新壹街校区-郭老师-陈品烨 (陈品烨)
|
32ms |
6.8 MiB |
|
166 Bytes |
2023-10-2 14:41:30 |
|
食不食油饼(点主页康康) (Nemo)
|
32ms |
8.2 MiB |
|
103 Bytes |
2022-11-22 19:04:49 |
|
罗宇凡 (吴彦祖)
|
32ms |
8.2 MiB |
|
147 Bytes |
2022-3-3 20:45:45 |
|
Z.饮月君 (张皓南)
|
32ms |
8.2 MiB |
|
206 Bytes |
2022-5-19 18:10:52 |
|
童艺涵
|
32ms |
7.1 MiB |
|
167 Bytes |
2022-12-7 20:44:37 |
|
Steven (王梓丞)
|
32ms |
8.2 MiB |
|
176 Bytes |
2022-6-4 14:12:13 |
|
陈骏逸 (chenjunyi)
|
32ms |
8.2 MiB |
|
175 Bytes |
2022-7-28 21:30:58 |
|
邬文博 (wwb)
|
32ms |
8.2 MiB |
|
160 Bytes |
2022-6-14 20:18:49 |
|
易锦程 (sky)
|
32ms |
6.8 MiB |
|
262 Bytes |
2023-3-4 11:16:34 |
|
xzf
|
32ms |
8.2 MiB |
|
214 Bytes |
2023-8-12 16:58:22 |
|
南坪校区-郑力博 (zhenglibo23003)
|
32ms |
8.2 MiB |
|
127 Bytes |
2023-3-13 20:48:34 |
|
谭懿轩 (yanyixuan)
|
32ms |
8.2 MiB |
|
135 Bytes |
2022-3-17 17:44:12 |
|
谢靳骁 (XJX)
|
32ms |
6.7 MiB |
|
162 Bytes |
2023-5-12 20:31:14 |
|
李树崑 (lishukun)
|
33ms |
8.2 MiB |
|
258 Bytes |
2022-6-11 13:26:52 |
|
新壹街校区-陈琬舒 (空空大师)
|
33ms |
8.2 MiB |
|
134 Bytes |
2023-7-31 11:17:34 |
|
qinjin11
|
33ms |
8.2 MiB |
|
132 Bytes |
2022-7-19 13:23:45 |
|
杨子力
|
33ms |
8.2 MiB |
|
165 Bytes |
2022-3-6 20:49:51 |
|
jighghjkfkhfdhdfdfdsfsdfsafvmnkbnkbmnlvnmkbvnvb;,.m;,;.;,;kbvlmkbnlmkblnvkmlbnkmlbvkmlbvklmbkmlkblmbnm;,l.,.;,'.,';.[',;.[,kjkoihgfhfgiohifgohifgohiofgihgofhiofgihofgihofgihofgiho;''[;.',m;.',m.;',.;'m,.;';'cv;x'cb'cx;b'cv;b'xc;b'c;b'cvbvc.'bv.//,/vb./vcb./cvbv,c.b,cv.,b.cv,b.vc,bg;hgl;hgl;hg;h;hfg;hl;lf;l;lxc;cln;bvln;vcln;vnl;vbl;vbln;vlv;blnvb;plnp;lplhfljpjh;nlvb;nv;bn;vcvl;nlv;nlv;g;hjhchl;ghfghl;fghl;ltlh;l;hlf;lg;bnlc;;nlv;nbv;nbv;nvb;nlvcnl;xc;blxcb;ll;hg;lhgl;dfl;t;ldy;l;lyl;rewlt493;l;dl;dsflg;lsdlpbpcxobpocvbpopopopreopotpreotertertretert (litingxu)
|
33ms |
6.7 MiB |
|
164 Bytes |
2023-5-7 17:57:55 |
|
黄立信
|
33ms |
7.2 MiB |
|
255 Bytes |
2022-12-3 11:58:30 |
|
葛琮扬
|
33ms |
8.2 MiB |
|
144 Bytes |
2023-8-2 15:08:08 |
|
纪承熙 (jcx001)
|
33ms |
8.2 MiB |
|
179 Bytes |
2022-5-27 21:40:46 |
|
05c35-hzh
|
33ms |
8.2 MiB |
|
177 Bytes |
2022-3-11 17:16:55 |
|
何洋名 (heyangming)
|
33ms |
8.2 MiB |
|
170 Bytes |
2022-3-6 12:58:36 |
|
月下的九尾银狐
|
33ms |
8.2 MiB |
|
195 Bytes |
2023-6-17 9:30:51 |
|
^_^ (ctc)
|
33ms |
7.2 MiB |
|
128 Bytes |
2022-12-7 10:55:29 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
33ms |
7.8 MiB |
|
186 Bytes |
2022-8-30 19:57:14 |
|
chenyifei
|
33ms |
8.2 MiB |
|
181 Bytes |
2022-4-16 20:04:54 |
|
某某某
|
33ms |
8.2 MiB |
|
145 Bytes |
2022-6-14 17:14:05 |
|
李奕霖 (liyilin233)
|
33ms |
8.2 MiB |
|
135 Bytes |
2022-5-28 19:04:51 |
|
汤杰尧 (05c05-tjy1)
|
33ms |
8.2 MiB |
|
186 Bytes |
2022-6-5 15:44:23 |
|
陈于硕(我™的) (chenyu)
|
33ms |
6.7 MiB |
|
214 Bytes |
2023-5-29 21:56:54 |
|
新壹街——陈学彬 (BUG)
|
33ms |
8.2 MiB |
|
161 Bytes |
2022-3-12 8:03:18 |
|
廖永亨
|
33ms |
7.1 MiB |
|
169 Bytes |
2022-12-7 17:15:16 |
|
丁宇涵 (05c35-dyh1)
|
33ms |
8.2 MiB |
|
168 Bytes |
2022-6-3 20:15:24 |
|
张梓辰 (DiaoDesi屌德斯)
|
33ms |
8.2 MiB |
|
194 Bytes |
2022-7-19 8:49:29 |
|
Turorany (郑浩然)
|
33ms |
7.2 MiB |
|
230 Bytes |
2023-11-30 20:09:28 |
|
姚宏逸
|
33ms |
8.2 MiB |
|
168 Bytes |
2022-5-18 19:14:17 |
|
陈玺宇
|
34ms |
8.2 MiB |
|
130 Bytes |
2023-8-1 16:32:53 |
|
甄一阳 (22016-zyy)
|
34ms |
7.6 MiB |
|
149 Bytes |
2022-9-12 18:15:10 |
|
疯神芭芭脱丝 (李卓修)
|
34ms |
8.2 MiB |
|
162 Bytes |
2022-7-16 13:40:04 |
|
代尚函 笛卡尔 (daishanghan)
|
34ms |
8.1 MiB |
|
119 Bytes |
2022-8-25 10:25:57 |