|
laiyouming22031
|
1ms |
384 KiB |
|
229 Bytes |
2022-12-25 13:32:15 |
|
没有此人 (akm)
|
1ms |
384 KiB |
|
222 Bytes |
2022-9-3 17:14:46 |
|
lichengrui23003
|
1ms |
384 KiB |
|
166 Bytes |
2023-2-4 18:01:44 |
|
罗元邑
|
1ms |
372 KiB |
|
192 Bytes |
2023-2-10 20:52:00 |
|
李玥漪
|
1ms |
384 KiB |
|
211 Bytes |
2022-2-24 20:40:01 |
|
陈杰晟
|
1ms |
384 KiB |
|
208 Bytes |
2022-4-20 20:00:21 |
|
scallway
|
1ms |
344 KiB |
|
191 Bytes |
2022-6-14 20:46:03 |
|
益布响完辣 (黄靖益1)
|
1ms |
384 KiB |
|
200 Bytes |
2023-4-14 21:55:29 |
|
炸鱼4000+ (dxc)
|
1ms |
384 KiB |
|
196 Bytes |
2023-1-15 19:52:20 |
|
RanHao
|
1ms |
6.9 MiB |
|
208 Bytes |
2023-7-29 19:21:46 |
|
qqqqpqqqqp (孙澜01)
|
1ms |
384 KiB |
|
221 Bytes |
2022-10-7 11:58:06 |
|
陈忝锐
|
1ms |
384 KiB |
|
192 Bytes |
2022-4-19 17:42:58 |
|
吴佳智 (AWM)
|
1ms |
384 KiB |
|
222 Bytes |
2023-2-4 11:06:50 |
|
董乙辰
|
1ms |
6.9 MiB |
|
174 Bytes |
2023-11-4 16:22:51 |
|
强愉堃
|
1ms |
376 KiB |
|
209 Bytes |
2023-2-5 10:55:23 |
|
谢博文
|
1ms |
384 KiB |
|
213 Bytes |
2022-4-13 18:51:04 |
|
zcx
|
1ms |
7.2 MiB |
C++98 |
187 Bytes |
2024-4-21 10:37:46 |
|
13883645777
|
1ms |
372 KiB |
|
252 Bytes |
2022-9-3 14:24:04 |
|
王星皓
|
1ms |
384 KiB |
|
214 Bytes |
2022-2-24 20:39:31 |
|
李浩然
|
1ms |
392 KiB |
|
196 Bytes |
2023-4-29 17:37:06 |
|
许嘉恩 (xje22031)
|
1ms |
356 KiB |
|
187 Bytes |
2022-10-4 22:40:16 |
|
江坤锜
|
1ms |
384 KiB |
|
203 Bytes |
2023-1-15 19:51:31 |
|
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)
|
1ms |
6.7 MiB |
|
269 Bytes |
2023-8-17 15:39:50 |
|
ren (陈苡心)
|
1ms |
384 KiB |
|
193 Bytes |
2023-5-7 15:32:17 |
|
蒋丁非凡
|
1ms |
384 KiB |
|
203 Bytes |
2023-5-18 20:51:18 |
|
草||草 (陈星佑)
|
1ms |
392 KiB |
|
202 Bytes |
2022-4-23 11:37:32 |
|
郑岐蔚
|
1ms |
384 KiB |
|
208 Bytes |
2022-8-27 19:01:55 |
|
新壹街校区-老师: 黄路 (陈星宇)
|
1ms |
392 KiB |
|
200 Bytes |
2023-4-19 21:30:49 |
|
陶zx
|
1ms |
6.9 MiB |
C++11 |
185 Bytes |
2024-6-2 14:30:24 |
|
zhuyvbing
|
1ms |
384 KiB |
|
204 Bytes |
2022-10-29 11:32:29 |
|
草||草 (陈星佑)
|
1ms |
392 KiB |
|
202 Bytes |
2022-4-23 11:37:31 |
|
炸鱼4000+ (dxc)
|
1ms |
384 KiB |
|
196 Bytes |
2023-1-15 19:52:18 |
|
罗翊宸
|
1ms |
6.8 MiB |
|
181 Bytes |
2023-9-2 11:05:09 |
|
liuyuchen
|
1ms |
384 KiB |
|
211 Bytes |
2023-2-5 15:17:37 |
|
Stephen Stevenson
|
1ms |
384 KiB |
|
202 Bytes |
2022-12-15 18:05:21 |
|
韩昀彤
|
1ms |
348 KiB |
|
193 Bytes |
2022-4-10 18:49:42 |
|
张景豪
|
1ms |
384 KiB |
|
216 Bytes |
2022-10-4 16:08:41 |
|
新壹街校区-周士杰 (zsj)
|
1ms |
368 KiB |
|
195 Bytes |
2023-3-5 13:21:21 |
|
zhangjiani
|
1ms |
384 KiB |
|
192 Bytes |
2022-6-21 20:27:27 |
|
马渝杭 (mayuhang)
|
1ms |
384 KiB |
|
193 Bytes |
2022-12-20 10:54:49 |
|
强愉堃
|
1ms |
384 KiB |
|
209 Bytes |
2023-2-5 10:55:24 |
|
zhangjiani
|
1ms |
384 KiB |
|
192 Bytes |
2022-6-21 20:25:28 |
|
陈秋石
|
1ms |
384 KiB |
|
219 Bytes |
2022-2-13 11:44:25 |
|
ymh
|
1ms |
384 KiB |
|
194 Bytes |
2022-4-17 10:19:48 |
|
益布响完辣 (黄靖益1)
|
1ms |
384 KiB |
|
200 Bytes |
2023-4-14 21:55:38 |
|
炸鱼4000+ (dxc)
|
1ms |
384 KiB |
|
196 Bytes |
2023-1-15 19:52:16 |
|
炸鱼4000+ (dxc)
|
1ms |
384 KiB |
|
196 Bytes |
2023-1-15 19:52:19 |
|
龚铭俊 (哈哈哈)
|
1ms |
384 KiB |
|
202 Bytes |
2022-12-18 10:11:04 |
|
张梓浩 (zhangzihao)
|
1ms |
384 KiB |
|
196 Bytes |
2023-1-8 20:55:38 |
|
hyh
|
1ms |
384 KiB |
|
193 Bytes |
2023-4-26 18:39:10 |
|
梨冻亿 (wiueh)
|
1ms |
384 KiB |
|
132 Bytes |
2022-2-19 9:03:21 |
|
邓智凌
|
1ms |
6.6 MiB |
|
255 Bytes |
2023-7-4 19:33:22 |
|
林小博
|
1ms |
384 KiB |
|
238 Bytes |
2022-3-21 19:11:51 |
|
炸鱼4000+ (dxc)
|
1ms |
384 KiB |
|
196 Bytes |
2023-1-15 19:52:17 |
|
你干嘛~~~~~~哎哟·····》?~! (刘高杰)
|
1ms |
476 KiB |
|
213 Bytes |
2023-4-14 21:34:07 |
|
zyz (曾韵竹)
|
1ms |
384 KiB |
|
233 Bytes |
2023-1-1 17:51:01 |
|
zlx (xiao)
|
1ms |
384 KiB |
|
201 Bytes |
2022-11-27 12:26:53 |
|
tyx_9192596
|
1ms |
384 KiB |
|
117 Bytes |
2023-3-18 20:10:36 |
|
手搓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)
|
1ms |
384 KiB |
|
221 Bytes |
2023-5-20 11:19:17 |
|
龙湖源著校区-王子涵 (王子涵)
|
2ms |
384 KiB |
|
194 Bytes |
2022-9-3 17:18:31 |
|
益布响完辣 (黄靖益1)
|
2ms |
384 KiB |
|
200 Bytes |
2023-4-14 21:55:26 |
|
殷语函
|
2ms |
384 KiB |
|
299 Bytes |
2023-1-6 16:25:35 |
|
张猪猪
|
2ms |
6.5 MiB |
|
208 Bytes |
2023-9-2 11:00:34 |
|
重庆龙湖源著校区+杨聆暄 (杨聆暄)
|
2ms |
384 KiB |
|
164 Bytes |
2022-9-3 17:04:03 |
|
潘佑实
|
2ms |
384 KiB |
|
220 Bytes |
2022-10-23 15:04:52 |
|
王星皓
|
2ms |
384 KiB |
|
214 Bytes |
2022-2-24 20:38:52 |
|
礼貌地塞班
|
2ms |
384 KiB |
|
206 Bytes |
2022-9-17 17:56:55 |
|
益布响完辣 (黄靖益1)
|
2ms |
384 KiB |
|
200 Bytes |
2023-4-14 21:55:39 |
|
任远宁 (renyuanning)
|
2ms |
384 KiB |
|
183 Bytes |
2023-2-25 14:53:33 |
|
强愉堃
|
2ms |
392 KiB |
|
209 Bytes |
2023-2-5 10:55:23 |
|
南坪校区-郑力博 (zhenglibo23003)
|
2ms |
384 KiB |
|
178 Bytes |
2023-2-4 18:06:22 |
|
喵 (蹇心悦)
|
2ms |
384 KiB |
|
168 Bytes |
2022-4-30 15:04:24 |
|
yuandingyang22031
|
2ms |
384 KiB |
|
188 Bytes |
2022-10-2 14:22:30 |
|
xiongjinyu
|
2ms |
384 KiB |
|
227 Bytes |
2023-2-4 11:17:31 |
|
§范马 · 猫羽雫™☠ (lixiaoxiang22031)
|
2ms |
384 KiB |
|
162 Bytes |
2022-9-22 19:55:33 |
|
qingweiran
|
2ms |
384 KiB |
|
206 Bytes |
2023-2-12 16:43:41 |
|
下降率太高啦!!! (徐攒焱)
|
2ms |
6.8 MiB |
|
187 Bytes |
2023-8-26 16:53:22 |
|
RanHao
|
2ms |
7.1 MiB |
|
309 Bytes |
2023-11-4 11:06:45 |
|
XZY
|
2ms |
6.7 MiB |
|
162 Bytes |
2023-9-24 17:31:57 |
|
缥 (王硕2012)
|
2ms |
384 KiB |
|
191 Bytes |
2022-10-2 11:01:15 |
|
童艺涵
|
2ms |
384 KiB |
|
202 Bytes |
2023-1-27 7:41:00 |
|
11111
|
2ms |
384 KiB |
|
176 Bytes |
2022-2-20 11:41:44 |
|
炸鱼4000+ (dxc)
|
2ms |
364 KiB |
|
196 Bytes |
2023-1-15 19:52:19 |
|
强愉堃
|
2ms |
384 KiB |
|
209 Bytes |
2023-2-5 10:55:25 |
|
陈星亦 (cxy01)
|
2ms |
384 KiB |
|
202 Bytes |
2022-10-6 14:23:33 |
|
yuhaodi
|
2ms |
624 KiB |
|
261 Bytes |
2023-4-19 8:07:05 |
|
秦兴润
|
2ms |
384 KiB |
|
207 Bytes |
2023-1-10 17:15:35 |
|
👾 (谭宇辰)
|
2ms |
384 KiB |
|
194 Bytes |
2023-4-14 21:52:28 |
|
益布响完辣 (黄靖益1)
|
2ms |
392 KiB |
|
200 Bytes |
2023-4-14 21:55:36 |
|
何星震 (Jacob)
|
2ms |
384 KiB |
|
199 Bytes |
2022-9-30 21:22:00 |
|
益布响完辣 (黄靖益1)
|
2ms |
384 KiB |
|
200 Bytes |
2023-4-14 21:55:27 |
|
raozheng
|
2ms |
368 KiB |
|
292 Bytes |
2022-11-28 18:09:41 |
|
田世瑞
|
2ms |
384 KiB |
|
206 Bytes |
2022-10-23 15:01:59 |
|
李禹衡 (liyuheng22006)
|
2ms |
384 KiB |
|
208 Bytes |
2022-10-18 20:21:19 |
|
炸鱼4000+ (dxc)
|
2ms |
384 KiB |
|
196 Bytes |
2023-1-15 19:52:06 |
|
炸鱼4000+ (dxc)
|
2ms |
384 KiB |
|
196 Bytes |
2023-1-15 19:52:17 |
|
益布响完辣 (黄靖益1)
|
2ms |
384 KiB |
|
200 Bytes |
2023-4-14 21:55:36 |
|
炸鱼4000+ (dxc)
|
2ms |
384 KiB |
|
196 Bytes |
2023-1-15 19:52:16 |
|
邵冠铖 (shaoguancheng22031)
|
2ms |
384 KiB |
|
177 Bytes |
2022-9-25 11:15:27 |
|
陈家齐
|
2ms |
384 KiB |
|
202 Bytes |
2023-1-15 19:51:44 |