|
肖添宇
|
14ms |
444 KiB |
|
229 Bytes |
2022-2-20 15:05:40 |
|
雷文博(帅哥) (18983951391)
|
14ms |
428 KiB |
|
199 Bytes |
2023-3-23 20:28:10 |
|
SB (mfy01)
|
14ms |
436 KiB |
|
192 Bytes |
2023-2-3 17:39:15 |
|
江子墨
|
14ms |
6.8 MiB |
C++98 |
200 Bytes |
2024-6-7 15:53:44 |
|
张家豪 (zhangjiahao)
|
15ms |
424 KiB |
|
170 Bytes |
2022-7-1 15:11:46 |
|
陈雨泽1
|
15ms |
424 KiB |
|
207 Bytes |
2023-2-18 11:23:56 |
|
chenjunyao
|
15ms |
6.9 MiB |
|
184 Bytes |
2023-8-26 11:12:13 |
|
周造宇
|
15ms |
7 MiB |
C++11 |
194 Bytes |
2024-6-1 15:35:32 |
|
李卓燃 (李卓燃1)
|
15ms |
392 KiB |
|
170 Bytes |
2023-3-10 20:20:51 |
|
wangtan
|
15ms |
412 KiB |
|
221 Bytes |
2023-2-19 15:31:22 |
|
源著校区-宋昊成 (马冬梅)
|
15ms |
432 KiB |
|
230 Bytes |
2023-2-25 18:27:28 |
|
雷文博(帅哥) (18983951391)
|
15ms |
420 KiB |
|
199 Bytes |
2023-3-23 20:27:37 |
|
11451254188 (22029-mjh)
|
15ms |
440 KiB |
|
211 Bytes |
2023-2-7 21:50:06 |
|
Microsoft (hu_moren)
|
15ms |
7 MiB |
C++98 |
204 Bytes |
2024-8-23 17:10:22 |
|
重庆龙湖源著校区+杨聆暄 (杨聆暄)
|
15ms |
492 KiB |
|
218 Bytes |
2023-2-1 17:59:22 |
|
雷文博(帅哥) (18983951391)
|
15ms |
392 KiB |
|
199 Bytes |
2023-3-23 20:29:01 |
|
hulang
|
15ms |
436 KiB |
|
271 Bytes |
2022-2-13 19:49:15 |
|
heyi
|
15ms |
6.8 MiB |
C++98(O2) |
226 Bytes |
2024-8-10 15:26:26 |
|
雷文博(帅哥) (18983951391)
|
15ms |
392 KiB |
|
199 Bytes |
2023-2-19 15:18:22 |
|
17779
|
15ms |
392 KiB |
|
175 Bytes |
2022-3-17 15:10:04 |
|
wangtan
|
15ms |
392 KiB |
|
221 Bytes |
2023-2-19 15:31:22 |
|
NJL (NJlL)
|
15ms |
436 KiB |
|
213 Bytes |
2022-2-27 18:20:52 |
|
tad (OP AI)
|
15ms |
7 MiB |
C++98 |
166 Bytes |
2024-6-22 14:14:16 |
|
(张洛诚)
|
15ms |
512 KiB |
|
247 Bytes |
2023-4-27 20:19:51 |
|
雷文博(帅哥) (18983951391)
|
15ms |
392 KiB |
|
199 Bytes |
2023-2-19 15:18:23 |
|
zhengjiaxiang
|
15ms |
392 KiB |
|
187 Bytes |
2023-3-10 20:19:28 |
|
wangtan
|
15ms |
392 KiB |
|
221 Bytes |
2023-2-19 15:30:53 |
|
伍芷函
|
15ms |
440 KiB |
|
211 Bytes |
2022-9-12 13:37:15 |
|
黄立信
|
15ms |
6.8 MiB |
|
227 Bytes |
2023-10-15 20:49:03 |
|
叶哲宇 (yzy)
|
15ms |
6.9 MiB |
|
178 Bytes |
2023-6-30 19:20:07 |
|
雷文博(帅哥) (18983951391)
|
15ms |
384 KiB |
|
199 Bytes |
2023-2-19 15:18:21 |
|
李龙腾 (llt)
|
15ms |
432 KiB |
|
193 Bytes |
2023-3-19 14:26:29 |
|
王浚西 (22016-wjx)
|
15ms |
392 KiB |
|
181 Bytes |
2022-9-25 12:11:07 |
|
AAA? Prow max (hechenxuan23005)
|
15ms |
6.8 MiB |
C++98 |
205 Bytes |
2024-6-5 20:00:32 |
|
陈红恺 (chk)
|
15ms |
440 KiB |
|
170 Bytes |
2022-8-16 11:12:31 |
|
高国瑞
|
15ms |
6.9 MiB |
|
188 Bytes |
2023-7-17 10:46:31 |
|
chenrunxiang22031
|
15ms |
384 KiB |
|
229 Bytes |
2023-1-9 11:15:59 |
|
我很6 (zjj22031)
|
15ms |
512 KiB |
|
210 Bytes |
2023-1-9 11:02:35 |
|
繁星 (05c35-zzm)
|
15ms |
432 KiB |
|
215 Bytes |
2022-11-30 21:23:42 |
|
chenrunxiang22031
|
15ms |
512 KiB |
|
222 Bytes |
2023-3-24 18:49:08 |
|
牟淳雅
|
15ms |
6.7 MiB |
|
177 Bytes |
2023-9-17 10:22:57 |
|
弹射起飞 ? 冲 ! (吴周周)
|
15ms |
6.3 MiB |
|
253 Bytes |
2023-6-3 17:39:24 |
|
张梓辰 (DiaoDesi屌德斯)
|
15ms |
440 KiB |
|
205 Bytes |
2022-7-18 19:43:21 |
|
刘蕤箎
|
15ms |
7 MiB |
|
176 Bytes |
2023-8-26 11:12:58 |
|
魑归sama
|
15ms |
428 KiB |
|
178 Bytes |
2022-7-12 16:26:16 |
|
陈泰羽 (chentaiyu)
|
15ms |
384 KiB |
|
187 Bytes |
2023-3-10 20:23:28 |
|
毕浩宇 (bihaoyu)
|
15ms |
6.4 MiB |
|
188 Bytes |
2023-6-3 17:52:56 |
|
雷文博(帅哥) (18983951391)
|
15ms |
392 KiB |
|
199 Bytes |
2023-2-19 15:18:24 |
|
呵呵呵
|
15ms |
6.8 MiB |
|
196 Bytes |
2023-6-28 19:27:52 |
|
缥 (王硕2012)
|
15ms |
512 KiB |
|
216 Bytes |
2023-2-11 11:00:30 |
|
22029-zjs
|
15ms |
384 KiB |
|
179 Bytes |
2023-1-7 10:58:35 |
|
手搓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)
|
15ms |
384 KiB |
|
198 Bytes |
2023-1-7 11:06:01 |
|
李哲 (lizhe)
|
15ms |
436 KiB |
|
168 Bytes |
2022-8-25 16:17:41 |
|
李树崑 (lishukun)
|
15ms |
512 KiB |
|
250 Bytes |
2022-8-21 11:19:28 |
|
JOKER (hhy)
|
15ms |
7.1 MiB |
|
214 Bytes |
2023-7-12 9:13:32 |
|
chenyantong
|
15ms |
384 KiB |
|
171 Bytes |
2023-3-10 20:21:57 |
|
朱泽晟
|
15ms |
428 KiB |
|
232 Bytes |
2022-8-30 17:10:18 |
|
UsMt1 (jiangyuan)
|
15ms |
6.9 MiB |
|
198 Bytes |
2023-7-31 10:31:42 |
|
阮 (媚狐不吃道旁李)
|
15ms |
7 MiB |
C++98 |
211 Bytes |
2024-5-25 16:34:34 |
|
chenyantong
|
15ms |
392 KiB |
|
171 Bytes |
2023-3-10 20:22:00 |
|
王义苇 (wangyiwei)
|
15ms |
396 KiB |
|
194 Bytes |
2023-2-19 15:13:21 |
|
陈诺
|
16ms |
7.1 MiB |
|
193 Bytes |
2024-1-2 17:03:18 |
|
刘致言
|
16ms |
436 KiB |
|
193 Bytes |
2023-3-11 9:32:39 |
|
杨瀚霖 (yanghanlin)
|
16ms |
384 KiB |
|
211 Bytes |
2023-3-11 9:38:55 |
|
罗竣瀚
|
16ms |
444 KiB |
|
173 Bytes |
2022-10-30 11:20:47 |
|
呵呵呵 (陈思琦)
|
16ms |
384 KiB |
|
170 Bytes |
2022-12-24 15:18:12 |
|
时代二校-陈天成 (鸭缩毛巾)
|
16ms |
7.1 MiB |
|
190 Bytes |
2023-6-3 17:57:27 |
|
新壹街校区-陈琬舒 (空空大师)
|
16ms |
6.7 MiB |
|
230 Bytes |
2023-9-10 16:04:19 |
|
新壹街陈科言 (cky)
|
16ms |
7.2 MiB |
|
204 Bytes |
2023-7-19 11:51:53 |
|
kapurua
|
16ms |
7.1 MiB |
|
185 Bytes |
2024-1-22 17:02:24 |
|
dream
|
16ms |
7.3 MiB |
|
227 Bytes |
2023-7-9 10:02:45 |
|
右边的右边的人是SB (22016-hjy)
|
16ms |
440 KiB |
|
184 Bytes |
2022-9-26 20:56:17 |
|
zvt_132 (任子轩)
|
16ms |
6.7 MiB |
|
190 Bytes |
2023-9-1 23:59:09 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
16ms |
432 KiB |
|
194 Bytes |
2022-9-3 18:51:41 |
|
叶雨昊 (yeyuhao22006)
|
16ms |
436 KiB |
|
216 Bytes |
2022-10-23 20:10:44 |
|
雷文博(帅哥) (18983951391)
|
16ms |
384 KiB |
|
199 Bytes |
2023-2-19 15:18:23 |
|
孙烽轶 (sfy)
|
16ms |
440 KiB |
|
202 Bytes |
2022-10-23 10:55:37 |
|
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)
|
16ms |
7 MiB |
|
234 Bytes |
2023-7-16 11:32:13 |
|
colin1112 (墙凌可)
|
16ms |
512 KiB |
|
207 Bytes |
2023-3-18 15:00:46 |
|
科比.布莱恩特 (董浩琰)
|
16ms |
6.9 MiB |
|
194 Bytes |
2023-8-3 10:56:46 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
16ms |
400 KiB |
|
228 Bytes |
2023-1-7 11:06:49 |
|
ganlin1
|
16ms |
6.9 MiB |
|
187 Bytes |
2023-7-27 11:48:59 |
|
希蒙 (zhengxingya)
|
16ms |
7 MiB |
|
224 Bytes |
2023-7-21 8:33:12 |
|
新壹街校区-杨轩懿 (杨轩懿1)
|
16ms |
7.5 MiB |
|
177 Bytes |
2023-7-21 11:40:40 |
|
三差学生(尘埃蓝莓) (白佳睿)
|
16ms |
6.6 MiB |
|
187 Bytes |
2023-9-22 9:37:24 |
|
黄梓轩 (huangzixuan)
|
16ms |
436 KiB |
|
212 Bytes |
2022-11-28 17:53:41 |
|
kim
|
16ms |
436 KiB |
|
212 Bytes |
2023-3-10 20:19:28 |
|
没有此人 (akm)
|
16ms |
6.9 MiB |
|
222 Bytes |
2023-7-2 19:03:55 |
|
何星震 (Jacob)
|
16ms |
436 KiB |
|
170 Bytes |
2022-9-11 11:47:31 |
|
甄一阳 (22016-zyy)
|
16ms |
428 KiB |
|
187 Bytes |
2022-9-25 9:45:49 |
|
22029-lyh
|
16ms |
392 KiB |
|
160 Bytes |
2023-1-7 11:00:08 |
|
wangtan
|
16ms |
384 KiB |
|
221 Bytes |
2023-2-19 15:31:23 |
|
RanHao
|
16ms |
6.9 MiB |
|
219 Bytes |
2023-7-22 18:41:18 |
|
CK (李弘毅)
|
16ms |
544 KiB |
|
185 Bytes |
2022-11-22 11:22:55 |
|
chenrunxiang22031
|
16ms |
420 KiB |
|
229 Bytes |
2023-1-9 11:16:09 |
|
小忙果 (王昱杰)
|
16ms |
6.9 MiB |
|
189 Bytes |
2023-7-18 8:46:23 |
|
22029-lsl
|
16ms |
384 KiB |
|
198 Bytes |
2023-1-7 10:59:30 |
|
张雯皓 (zhangwenhao)
|
16ms |
6.9 MiB |
|
202 Bytes |
2023-7-15 8:59:33 |
|
王晴萱
|
16ms |
7.2 MiB |
|
199 Bytes |
2023-7-14 14:25:39 |
|
12345
|
16ms |
512 KiB |
|
212 Bytes |
2022-8-9 9:49:48 |