|
印昭旭(412) (印昭旭)
|
3ms |
6.8 MiB |
|
116 Bytes |
2023-6-23 13:23:07 |
|
Tang
|
3ms |
384 KiB |
|
134 Bytes |
2022-3-9 20:09:37 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
3ms |
384 KiB |
|
143 Bytes |
2022-10-16 9:27:18 |
|
炸鱼4000+ (dxc)
|
3ms |
444 KiB |
|
119 Bytes |
2023-2-11 19:37:50 |
|
我很6 (zjj22031)
|
3ms |
384 KiB |
|
124 Bytes |
2022-10-20 19:21:56 |
|
AC[谭赫奕] (tanheyi)
|
3ms |
384 KiB |
|
128 Bytes |
2023-4-2 16:28:15 |
|
朱老师 (zyp)
|
3ms |
384 KiB |
|
177 Bytes |
2022-10-16 9:28:14 |
|
任远宁 (renyuanning)
|
3ms |
428 KiB |
|
113 Bytes |
2023-2-25 14:55:12 |
|
江坤锜
|
3ms |
392 KiB |
|
117 Bytes |
2023-2-11 19:40:52 |
|
童艺涵
|
3ms |
436 KiB |
|
116 Bytes |
2023-1-29 7:55:32 |
|
yuandingyang22031
|
3ms |
384 KiB |
|
135 Bytes |
2022-10-16 9:32:52 |
|
zjm
|
3ms |
392 KiB |
|
133 Bytes |
2022-10-16 9:33:02 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
3ms |
436 KiB |
|
121 Bytes |
2022-6-27 17:00:35 |
|
(张洛诚)
|
3ms |
436 KiB |
|
124 Bytes |
2023-4-20 19:07:25 |
|
raozheng
|
3ms |
436 KiB |
|
134 Bytes |
2022-11-28 19:12:10 |
|
支彦淇
|
3ms |
440 KiB |
|
97 Bytes |
2022-10-5 15:19:33 |
|
lihaoyi
|
3ms |
392 KiB |
|
141 Bytes |
2022-10-16 9:31:01 |
|
zhangxiushi
|
3ms |
440 KiB |
|
160 Bytes |
2022-8-26 20:48:07 |
|
刘蕤箎
|
3ms |
512 KiB |
|
104 Bytes |
2023-3-17 20:05:11 |
|
Steven (王梓丞)
|
3ms |
384 KiB |
|
130 Bytes |
2022-4-16 14:39:25 |
|
新壹街校区-周士杰 (zsj)
|
3ms |
440 KiB |
|
103 Bytes |
2023-4-16 13:30:40 |
|
苏庭毅
|
3ms |
392 KiB |
|
114 Bytes |
2023-2-11 19:41:58 |
|
zhanglianjie
|
3ms |
432 KiB |
|
143 Bytes |
2023-2-25 17:12:20 |
|
chenrunxiang22031
|
3ms |
392 KiB |
|
141 Bytes |
2022-10-16 9:30:29 |
|
hyh
|
3ms |
432 KiB |
|
110 Bytes |
2023-5-10 18:15:05 |
|
gmja
|
3ms |
384 KiB |
|
127 Bytes |
2022-12-25 11:00:21 |
|
lihaoyi
|
3ms |
392 KiB |
|
141 Bytes |
2022-10-16 9:31:00 |
|
林小博
|
3ms |
444 KiB |
|
124 Bytes |
2022-3-21 18:27:42 |
|
李晨希
|
3ms |
436 KiB |
|
107 Bytes |
2023-3-18 9:22:14 |
|
草||草 (陈星佑)
|
3ms |
436 KiB |
|
113 Bytes |
2022-8-17 15:33:45 |
|
LukeDid
|
3ms |
384 KiB |
|
152 Bytes |
2023-4-22 13:39:26 |
|
曹元明
|
3ms |
444 KiB |
|
121 Bytes |
2022-4-23 11:31:11 |
|
马渝杭 (mayuhang)
|
3ms |
444 KiB |
|
110 Bytes |
2023-3-6 19:20:10 |
|
chenjunyao
|
3ms |
420 KiB |
|
105 Bytes |
2023-4-8 11:55:16 |
|
杨淇瑞 (杨淇瑞29)
|
3ms |
436 KiB |
|
119 Bytes |
2023-4-24 20:00:38 |
|
重庆龙湖源著校区+杨聆暄 (杨聆暄)
|
3ms |
400 KiB |
|
122 Bytes |
2023-1-7 16:03:23 |
|
zzy
|
3ms |
444 KiB |
|
116 Bytes |
2023-4-15 13:09:54 |
|
lihaoyi
|
3ms |
384 KiB |
|
141 Bytes |
2022-10-16 9:30:59 |
|
zhr
|
3ms |
384 KiB |
|
110 Bytes |
2023-4-8 12:10:15 |
|
李旻轩
|
3ms |
424 KiB |
|
152 Bytes |
2023-3-2 19:19:25 |
|
杨睎尧
|
3ms |
412 KiB |
|
98 Bytes |
2022-4-9 11:35:10 |
|
chenyifei
|
3ms |
396 KiB |
|
118 Bytes |
2022-8-27 17:15:55 |
|
CK (李弘毅)
|
3ms |
440 KiB |
|
121 Bytes |
2022-6-30 7:47:14 |
|
我全家SB!!! 我没母!!! (baijinlin)
|
3ms |
384 KiB |
|
190 Bytes |
2023-2-25 17:09:27 |
|
yanxiaosong
|
3ms |
412 KiB |
|
96 Bytes |
2022-4-4 21:04:57 |
|
SHY20091224
|
3ms |
436 KiB |
|
99 Bytes |
2022-8-16 15:35:21 |
|
邹曜丞 (13983097018)
|
3ms |
6.9 MiB |
|
116 Bytes |
2023-7-18 15:00:37 |
|
李嘉瑞
|
3ms |
384 KiB |
|
141 Bytes |
2022-10-5 17:54:40 |
|
我很6 (zjj22031)
|
3ms |
436 KiB |
|
124 Bytes |
2022-10-20 19:21:12 |
|
罗元邑
|
3ms |
404 KiB |
|
127 Bytes |
2023-3-4 9:39:17 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
3ms |
436 KiB |
|
115 Bytes |
2022-9-24 23:00:32 |
|
啊...这 (炼狱杏寿郎)
|
3ms |
448 KiB |
|
106 Bytes |
2022-7-1 11:27:49 |
|
张雯皓 (zhangwenhao)
|
3ms |
384 KiB |
|
107 Bytes |
2023-4-15 9:28:13 |
|
三差学生(尘埃蓝莓) (白佳睿)
|
3ms |
6.7 MiB |
|
119 Bytes |
2023-9-14 21:30:19 |
|
🐟<。)#)))≦、、鱼 (张馨月)
|
3ms |
436 KiB |
|
95 Bytes |
2023-2-25 11:01:47 |
|
chenrunxiang22031
|
3ms |
384 KiB |
|
141 Bytes |
2022-10-16 9:30:39 |
|
何星震 (Jacob)
|
3ms |
428 KiB |
|
105 Bytes |
2022-10-8 20:20:59 |
|
南坪校区-吴延衡 (小吴同学23003)
|
3ms |
436 KiB |
|
116 Bytes |
2023-2-25 17:07:27 |
|
李禹衡 (liyuheng22006)
|
3ms |
440 KiB |
|
111 Bytes |
2023-2-6 19:42:56 |
|
新壹街陈科言 (cky)
|
3ms |
6.9 MiB |
|
116 Bytes |
2023-7-21 16:26:00 |
|
邵冠铖 (shaoguancheng22031)
|
3ms |
444 KiB |
|
110 Bytes |
2022-10-16 9:27:06 |
|
11111
|
3ms |
424 KiB |
|
130 Bytes |
2022-3-20 9:08:26 |
|
chen (peter)
|
3ms |
436 KiB |
|
116 Bytes |
2022-8-26 19:48:25 |
|
手搓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)
|
3ms |
404 KiB |
|
120 Bytes |
2023-5-20 11:39:50 |
|
tyx_9192596
|
3ms |
396 KiB |
|
97 Bytes |
2023-3-19 7:47:44 |
|
颜梓宇
|
3ms |
6.8 MiB |
|
121 Bytes |
2023-6-22 16:33:21 |
|
杜是贤 (dushixian)
|
3ms |
428 KiB |
|
109 Bytes |
2023-5-28 10:48:43 |
|
向俊熙 (xiangjunxi23003)
|
3ms |
384 KiB |
|
119 Bytes |
2023-4-1 15:45:38 |
|
jiangjc
|
3ms |
7.6 MiB |
|
100 Bytes |
2023-6-18 15:28:06 |
|
lihaoyi
|
3ms |
392 KiB |
|
141 Bytes |
2022-10-16 9:31:00 |
|
时代一校林星宇 (lxy)
|
3ms |
436 KiB |
|
143 Bytes |
2022-11-25 20:18:14 |
|
我推的乱破 (贺俊楠)
|
3ms |
444 KiB |
|
119 Bytes |
2023-2-17 18:43:21 |
|
sunsihan
|
3ms |
6.7 MiB |
|
89 Bytes |
2023-8-23 15:05:53 |
|
jinitaimei
|
3ms |
432 KiB |
|
99 Bytes |
2022-9-25 18:47:13 |
|
chenrunxiang22031
|
3ms |
384 KiB |
|
141 Bytes |
2022-10-16 9:30:09 |
|
向俊熙 (xiangjunxi23003)
|
3ms |
432 KiB |
|
119 Bytes |
2023-2-25 17:04:14 |
|
新壹街校区-杨轩懿 (杨轩懿1)
|
3ms |
7.4 MiB |
|
105 Bytes |
2023-7-21 11:41:28 |
|
蒲梓勋 (puzixun)
|
3ms |
428 KiB |
|
119 Bytes |
2022-11-7 11:19:58 |
|
77777777
|
3ms |
6.6 MiB |
C++17 |
117 Bytes |
2024-7-18 22:23:36 |
|
lihaoyi
|
3ms |
384 KiB |
|
141 Bytes |
2022-10-16 9:30:58 |
|
张峻熙
|
3ms |
428 KiB |
|
110 Bytes |
2022-10-31 21:35:30 |
|
hyh22031
|
3ms |
384 KiB |
|
128 Bytes |
2022-10-20 19:23:57 |
|
我全家SB!!! 我没母!!! (baijinlin)
|
3ms |
384 KiB |
|
190 Bytes |
2023-2-25 17:09:27 |
|
maobohan
|
3ms |
7.2 MiB |
|
131 Bytes |
2023-7-3 9:35:29 |
|
lihaoyi
|
3ms |
384 KiB |
|
141 Bytes |
2022-10-16 9:31:01 |
|
王瀚毅 (wanghanyi)
|
3ms |
432 KiB |
|
106 Bytes |
2022-10-22 21:00:22 |
|
王祎辰 (wangyichen)
|
3ms |
7.2 MiB |
C++11 |
119 Bytes |
2024-4-27 13:35:41 |
|
经常消失 (小萝卜)
|
3ms |
416 KiB |
|
142 Bytes |
2022-7-10 17:25:12 |
|
贾鑫豪 (Mr Sam)
|
3ms |
6.9 MiB |
|
111 Bytes |
2023-7-21 19:06:05 |
|
曹埊睿 (caodirui)
|
3ms |
440 KiB |
|
112 Bytes |
2023-3-22 21:54:02 |
|
缥 (王硕2012)
|
3ms |
436 KiB |
|
161 Bytes |
2022-10-3 9:08:30 |
|
zyl
|
3ms |
6.9 MiB |
C++11(O2) |
113 Bytes |
2024-8-23 11:28:42 |
|
我全家SB!!! 我没母!!! (baijinlin)
|
3ms |
384 KiB |
|
190 Bytes |
2023-2-25 17:09:27 |
|
葛琮扬
|
3ms |
7.1 MiB |
|
131 Bytes |
2023-7-20 12:09:55 |
|
lihaoyi
|
3ms |
420 KiB |
|
141 Bytes |
2022-10-16 9:31:00 |
|
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)
|
3ms |
7.6 MiB |
|
164 Bytes |
2023-8-23 18:07:24 |
|
龚铭俊 (哈哈哈)
|
3ms |
424 KiB |
|
116 Bytes |
2022-12-18 10:13:48 |
|
11451254188 (22029-mjh)
|
3ms |
432 KiB |
|
139 Bytes |
2022-11-17 18:09:25 |
|
hxb
|
3ms |
436 KiB |
|
134 Bytes |
2023-3-18 11:19:27 |
|
时代校区-刘臣原 (微笑王子)
|
3ms |
420 KiB |
|
115 Bytes |
2022-10-12 21:30:57 |