|
赵泳鑫 (zhaoyongxin)
|
7ms |
388 KiB |
|
183 Bytes |
2022-6-5 18:08:16 |
|
谢雨贝
|
7ms |
436 KiB |
|
201 Bytes |
2023-5-3 20:30:03 |
|
王晴萱
|
7ms |
7 MiB |
|
250 Bytes |
2023-7-16 11:21:55 |
|
刘致言
|
7ms |
392 KiB |
|
148 Bytes |
2022-12-9 20:27:26 |
|
欧俊阳
|
7ms |
6.7 MiB |
|
204 Bytes |
2023-8-25 13:30:17 |
|
dustsans (njo)
|
7ms |
384 KiB |
|
138 Bytes |
2022-12-9 20:28:02 |
|
极为的好van的 (lyq)
|
7ms |
384 KiB |
|
181 Bytes |
2023-5-12 19:38:52 |
|
hzm
|
7ms |
440 KiB |
|
227 Bytes |
2022-9-12 21:37:10 |
|
靳博然 (jbr)
|
7ms |
384 KiB |
|
222 Bytes |
2023-5-28 17:48:02 |
|
黄彦熹 (AK-203)
|
7ms |
512 KiB |
|
180 Bytes |
2023-2-26 19:52:13 |
|
霍弈丞小号
|
7ms |
424 KiB |
|
204 Bytes |
2023-2-26 17:19:04 |
|
xyc (谢雨宸)
|
7ms |
6.7 MiB |
|
174 Bytes |
2023-9-27 20:15:56 |
|
1396013295
|
7ms |
384 KiB |
|
316 Bytes |
2022-1-25 19:56:43 |
|
王韵淮
|
7ms |
428 KiB |
|
162 Bytes |
2022-5-17 21:08:30 |
|
李哲 (lizhe)
|
7ms |
440 KiB |
|
243 Bytes |
2022-7-27 22:25:34 |
|
缥 (王硕2012)
|
7ms |
384 KiB |
|
300 Bytes |
2023-3-4 22:54:26 |
|
金沙校区-先珂熠 (九转大肠)
|
7ms |
6.8 MiB |
C++20(O2) |
234 Bytes |
2024-8-11 17:55:27 |
|
我是曾科智儿子 (沈小童)
|
7ms |
432 KiB |
|
145 Bytes |
2023-5-13 15:04:32 |
|
汪致卉 (wangzh)
|
7ms |
440 KiB |
|
208 Bytes |
2022-4-22 19:24:01 |
|
黄立信
|
7ms |
512 KiB |
|
177 Bytes |
2023-5-16 21:37:57 |
|
colin1112 (墙凌可)
|
7ms |
6.7 MiB |
|
157 Bytes |
2023-9-1 17:37:10 |
|
huyinuo
|
7ms |
428 KiB |
|
319 Bytes |
2022-4-13 20:57:22 |
|
11451254188 (22029-mjh)
|
7ms |
512 KiB |
|
180 Bytes |
2023-2-14 21:52:09 |
|
wangruibo20xh
|
7ms |
436 KiB |
|
149 Bytes |
2022-2-11 14:03:59 |
|
ttt123
|
7ms |
384 KiB |
|
180 Bytes |
2022-12-3 22:33:36 |
|
张瑞博
|
7ms |
6.9 MiB |
C++11 |
142 Bytes |
2024-6-22 23:33:19 |
|
时代一校-王宥量 (wangyouliang)
|
7ms |
384 KiB |
|
167 Bytes |
2022-12-4 10:00:59 |
|
霍弈丞小号
|
7ms |
392 KiB |
|
204 Bytes |
2023-2-26 17:19:08 |
|
zhangheyi22006
|
7ms |
384 KiB |
|
182 Bytes |
2022-11-3 20:01:46 |
|
_PXY_
|
7ms |
392 KiB |
|
152 Bytes |
2022-1-23 12:00:17 |
|
zhang (章愉霖是傻逼)
|
7ms |
6.7 MiB |
|
158 Bytes |
2023-8-29 9:06:21 |
|
郑岐蔚
|
7ms |
444 KiB |
|
145 Bytes |
2023-5-12 19:33:49 |
|
chen (peter)
|
7ms |
428 KiB |
|
169 Bytes |
2022-11-5 18:57:57 |
|
本人天生贪生pass (05c41-cqs)
|
7ms |
392 KiB |
|
195 Bytes |
2022-11-6 10:45:33 |
|
李倾城的忠实假粉 (向熠可)
|
7ms |
512 KiB |
|
204 Bytes |
2022-3-27 15:25:32 |
|
谢欣霖 (xiexinlin)
|
7ms |
512 KiB |
|
168 Bytes |
2022-11-17 11:59:56 |
|
章愉霖
|
7ms |
392 KiB |
|
155 Bytes |
2023-5-21 17:09:58 |
|
xmw318046
|
7ms |
6.7 MiB |
C++98 |
197 Bytes |
2024-7-13 12:30:04 |
|
时代校区-刘臣原 (微笑王子)
|
7ms |
428 KiB |
|
225 Bytes |
2022-9-7 18:37:53 |
|
yuhaodi
|
7ms |
444 KiB |
|
223 Bytes |
2023-5-7 9:11:22 |
|
罗毅川 (scp-049)
|
7ms |
444 KiB |
|
279 Bytes |
2022-6-6 23:41:22 |
|
明哲瀚 (18580067605)
|
7ms |
436 KiB |
|
166 Bytes |
2023-3-14 21:26:48 |
|
陈杰晟
|
7ms |
512 KiB |
|
168 Bytes |
2022-4-10 13:49:01 |
|
金沙—彭智宸 (彭智宸)
|
7ms |
512 KiB |
|
170 Bytes |
2023-5-8 20:14:25 |
|
甄一阳 (22016-zyy)
|
7ms |
444 KiB |
|
155 Bytes |
2022-12-1 19:25:03 |
|
赵沛喆
|
7ms |
440 KiB |
|
125 Bytes |
2022-8-15 15:14:53 |
|
luoluonuoya
|
7ms |
436 KiB |
|
146 Bytes |
2022-8-31 15:27:30 |
|
灵光sans (wangchihao)
|
7ms |
396 KiB |
|
145 Bytes |
2023-4-15 17:16:07 |
|
繁星 (05c35-zzm)
|
7ms |
384 KiB |
|
257 Bytes |
2022-11-6 10:10:06 |
|
wuqilin
|
7ms |
448 KiB |
|
185 Bytes |
2022-12-3 17:10:35 |
|
周琪渃
|
7ms |
384 KiB |
|
315 Bytes |
2022-12-17 19:49:48 |
|
无尽的想象 (谭仕高)
|
7ms |
384 KiB |
|
167 Bytes |
2022-8-25 17:53:18 |
|
zcx
|
7ms |
384 KiB |
|
161 Bytes |
2022-12-24 11:25:06 |
|
阮 (媚狐不吃道旁李)
|
7ms |
7.2 MiB |
C++98 |
279 Bytes |
2024-5-2 16:46:24 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
7ms |
384 KiB |
|
165 Bytes |
2022-12-3 16:08:39 |
|
Tender. (05c05-zhou)
|
7ms |
440 KiB |
|
263 Bytes |
2022-10-19 22:00:13 |
|
胡宸华 (huchenhua)
|
7ms |
6.9 MiB |
|
140 Bytes |
2023-7-11 19:27:21 |
|
(张洛诚)
|
7ms |
436 KiB |
|
168 Bytes |
2023-5-27 8:43:01 |
|
靳博然 (jbr)
|
7ms |
436 KiB |
|
222 Bytes |
2023-5-28 17:48:08 |
|
林靖明
|
7ms |
440 KiB |
|
187 Bytes |
2023-1-30 19:00:29 |
|
luosifu22006
|
7ms |
512 KiB |
|
150 Bytes |
2022-8-19 16:55:08 |
|
SYH.邵允涵 (Zoe邵)
|
7ms |
432 KiB |
|
186 Bytes |
2023-3-17 20:15:11 |
|
22029-lsl
|
7ms |
404 KiB |
|
149 Bytes |
2022-12-24 11:24:12 |
|
天之渺 (05c41-dd)
|
7ms |
392 KiB |
|
209 Bytes |
2022-11-6 10:51:34 |
|
zry
|
7ms |
440 KiB |
|
226 Bytes |
2022-11-6 10:01:46 |
|
蒲梓勋 (puzixun)
|
7ms |
440 KiB |
|
168 Bytes |
2022-10-16 16:08:54 |
|
CK (李弘毅)
|
7ms |
444 KiB |
|
137 Bytes |
2023-4-15 15:39:20 |
|
巨珩宇
|
7ms |
6.5 MiB |
|
172 Bytes |
2023-6-4 10:03:57 |
|
乐瀚阳 (yuehanyang)
|
7ms |
384 KiB |
|
154 Bytes |
2023-4-15 16:52:27 |
|
时代一校-赵彦博 (zyb)
|
7ms |
512 KiB |
|
139 Bytes |
2022-12-4 11:11:59 |
|
李晨希
|
8ms |
7.2 MiB |
|
154 Bytes |
2023-7-19 11:47:34 |
|
龚铭俊 (哈哈哈)
|
8ms |
6.6 MiB |
|
158 Bytes |
2023-6-4 11:09:46 |
|
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)
|
8ms |
6.7 MiB |
|
316 Bytes |
2023-8-24 14:59:31 |
|
昌文迪 (05c05-cwd2)
|
8ms |
512 KiB |
|
170 Bytes |
2022-11-4 21:13:44 |
|
22029-lyh
|
8ms |
384 KiB |
|
152 Bytes |
2022-12-24 11:24:11 |
|
胡澜之 (666hlz666)
|
8ms |
7 MiB |
|
160 Bytes |
2024-1-9 20:10:02 |
|
hxb
|
8ms |
384 KiB |
|
164 Bytes |
2023-3-24 17:06:04 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
8ms |
432 KiB |
|
169 Bytes |
2022-12-24 11:08:09 |
|
22016-oyc
|
8ms |
444 KiB |
|
251 Bytes |
2022-12-9 21:41:13 |
|
luosifu22006
|
8ms |
512 KiB |
|
170 Bytes |
2022-11-3 20:00:07 |
|
伍芷函
|
8ms |
436 KiB |
|
163 Bytes |
2023-1-31 11:29:09 |
|
马渝杭 (mayuhang)
|
8ms |
440 KiB |
|
232 Bytes |
2023-2-25 20:05:05 |
|
钟元朗
|
8ms |
512 KiB |
|
121 Bytes |
2022-12-31 20:20:49 |
|
贺睿林
|
8ms |
6.7 MiB |
|
190 Bytes |
2023-6-4 11:44:32 |
|
汤杰尧 (05c05-tjy1)
|
8ms |
384 KiB |
|
263 Bytes |
2022-11-4 22:23:53 |
|
小根哥
|
8ms |
436 KiB |
|
173 Bytes |
2022-8-25 11:16:05 |
|
三差学生(尘埃蓝莓) (白佳睿)
|
8ms |
6.9 MiB |
|
145 Bytes |
2023-8-8 16:25:43 |
|
22029-zjs
|
8ms |
384 KiB |
|
167 Bytes |
2022-12-24 11:24:47 |
|
王瀚毅 (wanghanyi)
|
8ms |
512 KiB |
|
135 Bytes |
2023-1-15 11:46:43 |
|
司雨来 (siyulai)
|
8ms |
444 KiB |
|
156 Bytes |
2023-1-14 21:01:01 |
|
zyl
|
8ms |
7.3 MiB |
|
163 Bytes |
2024-1-22 9:44:55 |
|
Z.饮月君 (张皓南)
|
9ms |
444 KiB |
|
150 Bytes |
2022-8-25 22:07:37 |
|
林凡童 (lft)
|
9ms |
456 KiB |
|
212 Bytes |
2022-9-15 20:13:20 |
|
RanHao
|
9ms |
6.9 MiB |
|
257 Bytes |
2023-8-2 16:02:36 |
|
scallway
|
9ms |
420 KiB |
|
144 Bytes |
2023-3-24 17:03:08 |
|
手搓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)
|
9ms |
440 KiB |
|
238 Bytes |
2022-12-24 9:24:05 |
|
纪承熙 (jcx001)
|
9ms |
412 KiB |
|
211 Bytes |
2022-11-16 16:04:55 |
|
我推的乱破 (贺俊楠)
|
9ms |
7.1 MiB |
|
154 Bytes |
2023-12-24 15:04:04 |
|
SYC0226
|
11ms |
412 KiB |
|
236 Bytes |
2022-10-3 10:44:32 |
|
jinitaimei
|
11ms |
440 KiB |
|
140 Bytes |
2022-12-4 16:53:35 |