|
冒牌陈杰晟【MOD】 (wed)
|
3ms |
420 KiB |
|
141 Bytes |
2022-2-28 21:51:08 |
|
heyuzhe
|
3ms |
6.9 MiB |
C++98 |
163 Bytes |
2024-8-16 8:56:23 |
|
庹仕杰
|
3ms |
444 KiB |
|
203 Bytes |
2023-5-13 15:10:30 |
|
司雨来 (siyulai)
|
3ms |
512 KiB |
|
178 Bytes |
2023-1-14 17:51:56 |
|
陈于硕(我™的) (chenyu)
|
3ms |
384 KiB |
|
188 Bytes |
2023-3-18 10:11:34 |
|
MacrozClick_ (蒋淞霖)
|
3ms |
380 KiB |
|
233 Bytes |
2022-1-23 10:08:38 |
|
谢雨贝
|
3ms |
436 KiB |
|
253 Bytes |
2023-5-16 20:56:32 |
|
ycy
|
3ms |
6.9 MiB |
|
212 Bytes |
2023-7-19 15:37:39 |
|
lys
|
3ms |
384 KiB |
|
238 Bytes |
2022-9-10 20:31:29 |
|
laiyouming22031
|
3ms |
332 KiB |
|
207 Bytes |
2022-12-11 10:04:21 |
|
songbingqi
|
3ms |
6.7 MiB |
|
176 Bytes |
2023-9-15 14:18:40 |
|
yzl2
|
3ms |
384 KiB |
|
206 Bytes |
2022-11-3 18:19:45 |
|
李奎龙 (Judge_lkl)
|
3ms |
384 KiB |
|
188 Bytes |
2022-10-29 20:49:28 |
|
chenjunyao
|
3ms |
7.1 MiB |
|
191 Bytes |
2023-9-2 11:28:05 |
|
zhouxifei
|
3ms |
436 KiB |
|
221 Bytes |
2022-10-2 19:58:48 |
|
章愉霖
|
3ms |
384 KiB |
|
237 Bytes |
2023-4-16 17:46:04 |
|
安闵煜 (anzai)
|
3ms |
6.7 MiB |
C++11 |
212 Bytes |
2024-8-2 23:25:15 |
|
凌肯 (lingken22006)
|
3ms |
436 KiB |
|
186 Bytes |
2022-7-24 21:39:39 |
|
诸禹吉 (zhuyuji)
|
3ms |
384 KiB |
|
203 Bytes |
2022-8-26 18:19:33 |
|
俞伏羲
|
3ms |
392 KiB |
|
192 Bytes |
2023-5-28 14:44:09 |
|
六 (江智昕)
|
3ms |
436 KiB |
|
218 Bytes |
2023-2-25 12:05:00 |
|
时代校区-刘臣原 (微笑王子)
|
3ms |
436 KiB |
|
187 Bytes |
2022-8-31 20:09:14 |
|
龚嘉俊 (gongjiajun)
|
3ms |
7 MiB |
|
162 Bytes |
2023-10-15 14:43:15 |
|
炸鱼4000+ (dxc)
|
3ms |
360 KiB |
|
220 Bytes |
2023-4-8 19:37:46 |
|
zjm
|
3ms |
376 KiB |
|
220 Bytes |
2022-12-11 10:39:28 |
|
曾子墨
|
3ms |
444 KiB |
|
206 Bytes |
2022-7-2 14:18:37 |
|
俞伏羲
|
3ms |
392 KiB |
|
192 Bytes |
2023-5-28 14:44:13 |
|
爱情海校区—沙天一 (沙天一)
|
3ms |
424 KiB |
|
200 Bytes |
2023-3-23 19:18:40 |
|
MacrozClick_ (蒋淞霖)
|
3ms |
384 KiB |
|
233 Bytes |
2022-1-23 10:08:39 |
|
游灵一幻 (martin)
|
3ms |
384 KiB |
|
195 Bytes |
2023-5-7 10:18:56 |
|
我推的乱破 (贺俊楠)
|
3ms |
384 KiB |
|
205 Bytes |
2023-3-26 14:38:04 |
|
zhangzhixiong
|
3ms |
6.9 MiB |
|
146 Bytes |
2023-6-18 14:32:26 |
|
zjm
|
3ms |
384 KiB |
|
220 Bytes |
2022-12-11 10:39:26 |
|
吴思谛 (wusidi)
|
3ms |
384 KiB |
|
199 Bytes |
2022-5-21 10:48:09 |
|
我是傻逼 (刘鸿瑞)
|
3ms |
7 MiB |
C++11 |
198 Bytes |
2024-8-24 15:08:19 |
|
新壹街校区--税崇峻 (税崇峻)
|
3ms |
6.9 MiB |
|
175 Bytes |
2023-8-4 19:31:11 |
|
Error404sans (焦阳浩云)
|
3ms |
7.1 MiB |
|
149 Bytes |
2023-6-18 14:39:39 |
|
江坤锜
|
3ms |
376 KiB |
|
215 Bytes |
2023-4-8 19:36:06 |
|
吴攸 (wuyou)
|
3ms |
384 KiB |
|
185 Bytes |
2023-5-28 14:51:12 |
|
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 |
6.9 MiB |
|
220 Bytes |
2023-7-15 8:29:13 |
|
李龙腾 (llt)
|
3ms |
384 KiB |
|
186 Bytes |
2022-9-10 20:36:48 |
|
许嘉恩 (xje22031)
|
3ms |
392 KiB |
|
188 Bytes |
2023-3-9 18:45:04 |
|
SB (Wendy)
|
3ms |
436 KiB |
|
203 Bytes |
2023-3-25 15:45:46 |
|
什蒂尔布 (吴东航)
|
3ms |
384 KiB |
|
211 Bytes |
2023-5-4 20:21:14 |
|
wangshuo
|
3ms |
384 KiB |
|
195 Bytes |
2022-10-30 12:06:37 |
|
王晴萱
|
3ms |
7.3 MiB |
|
203 Bytes |
2023-7-15 10:51:14 |
|
MacrozClick_ (蒋淞霖)
|
3ms |
384 KiB |
|
233 Bytes |
2022-1-23 10:08:35 |
|
胡澜之 (666hlz666)
|
3ms |
448 KiB |
|
227 Bytes |
2023-4-27 20:22:30 |
|
zjm
|
3ms |
384 KiB |
|
220 Bytes |
2022-12-11 10:39:24 |
|
乐瀚阳 (yuehanyang)
|
3ms |
392 KiB |
|
180 Bytes |
2023-4-15 15:10:35 |
|
田世瑞
|
3ms |
384 KiB |
|
235 Bytes |
2023-3-26 14:05:37 |
|
呵呵呵 (陈思琦)
|
3ms |
420 KiB |
|
176 Bytes |
2022-12-24 15:14:32 |
|
毕浩宇 (bihaoyu)
|
3ms |
384 KiB |
|
272 Bytes |
2023-4-29 17:18:21 |
|
22029-lsl
|
3ms |
448 KiB |
|
234 Bytes |
2022-11-28 13:37:35 |
|
hjh
|
3ms |
392 KiB |
|
160 Bytes |
2023-5-19 18:11:32 |
|
雷文博(帅哥) (18983951391)
|
3ms |
6.8 MiB |
|
224 Bytes |
2023-6-11 15:33:07 |
|
印昭旭(412) (印昭旭)
|
3ms |
392 KiB |
|
189 Bytes |
2023-5-28 9:24:37 |
|
杨坤霖 (steven)
|
3ms |
440 KiB |
|
236 Bytes |
2023-1-16 9:04:00 |
|
手搓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 |
444 KiB |
|
233 Bytes |
2022-11-27 9:32:19 |
|
王浚西 (22016-wjx)
|
3ms |
384 KiB |
|
226 Bytes |
2022-9-18 9:49:23 |
|
linjingming
|
3ms |
444 KiB |
|
200 Bytes |
2022-8-16 18:21:31 |
|
张梓浩 (zhangzihao)
|
3ms |
392 KiB |
|
221 Bytes |
2023-4-1 10:52:18 |
|
苏信泽
|
3ms |
392 KiB |
|
218 Bytes |
2023-4-8 19:42:51 |
|
RanHao
|
3ms |
6.9 MiB |
|
217 Bytes |
2023-7-22 19:30:55 |
|
马兴宇 (mxy01)
|
3ms |
520 KiB |
|
270 Bytes |
2022-10-1 18:50:27 |
|
dustsans (njo)
|
3ms |
384 KiB |
|
146 Bytes |
2022-9-9 20:17:24 |
|
wangtan
|
3ms |
384 KiB |
|
245 Bytes |
2023-2-12 14:08:17 |
|
黄梓轩 (huangzixuan)
|
3ms |
436 KiB |
|
206 Bytes |
2022-11-28 17:35:09 |
|
强愉堃 (强愉堃1)
|
3ms |
428 KiB |
|
177 Bytes |
2023-4-13 19:21:40 |
|
俞伏羲
|
3ms |
364 KiB |
|
192 Bytes |
2023-5-28 14:44:13 |
|
林靖明
|
3ms |
436 KiB |
|
197 Bytes |
2023-1-7 15:31:00 |
|
罗元邑2
|
3ms |
364 KiB |
|
187 Bytes |
2023-3-18 10:42:28 |
|
俞文博
|
3ms |
444 KiB |
|
178 Bytes |
2022-11-5 21:04:40 |
|
俞伏羲
|
3ms |
384 KiB |
|
192 Bytes |
2023-5-28 14:44:14 |
|
新壹街陈科言 (cky)
|
3ms |
7 MiB |
|
210 Bytes |
2023-7-19 14:11:39 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
3ms |
384 KiB |
|
157 Bytes |
2022-12-11 10:04:24 |
|
liuyuchen
|
3ms |
440 KiB |
|
224 Bytes |
2023-5-28 14:34:25 |
|
陈雨泽1
|
3ms |
440 KiB |
|
246 Bytes |
2022-12-3 15:34:45 |
|
邵冠铖 (shaoguancheng22031)
|
3ms |
384 KiB |
|
172 Bytes |
2022-12-11 10:17:51 |
|
苏庭毅
|
3ms |
384 KiB |
|
209 Bytes |
2023-4-8 19:34:45 |
|
稻妻第一深情 (喝酒の吟游诗人)
|
3ms |
452 KiB |
|
1.2 KiB |
2023-3-12 0:03:56 |
|
李樊駁
|
3ms |
404 KiB |
|
209 Bytes |
2023-5-28 14:55:16 |
|
dustsans (njo)
|
3ms |
476 KiB |
|
200 Bytes |
2022-10-28 20:49:38 |
|
时代一校-王宥量 (wangyouliang)
|
3ms |
440 KiB |
|
190 Bytes |
2022-11-6 15:14:38 |
|
吴攸 (wuyou)
|
3ms |
392 KiB |
|
185 Bytes |
2023-5-28 14:50:42 |
|
李林峰 (金克拉)
|
3ms |
440 KiB |
|
184 Bytes |
2022-8-31 19:56:58 |
|
86想要钱 (twt)
|
3ms |
436 KiB |
|
216 Bytes |
2022-10-30 18:36:24 |
|
yangbinyu
|
3ms |
392 KiB |
|
198 Bytes |
2022-11-27 20:10:17 |
|
我很6 (zjj22031)
|
3ms |
440 KiB |
|
162 Bytes |
2022-12-15 16:31:04 |
|
zjm
|
3ms |
440 KiB |
|
220 Bytes |
2022-12-11 10:38:33 |
|
灵光sans (wangchihao)
|
3ms |
384 KiB |
|
179 Bytes |
2023-4-15 15:10:47 |
|
强奸肾[冷漠] (05c41-zjb)
|
3ms |
404 KiB |
|
326 Bytes |
2022-11-5 17:03:20 |
|
缥 (王硕2012)
|
3ms |
384 KiB |
|
223 Bytes |
2022-12-11 10:09:53 |
|
ask (ayk)
|
3ms |
384 KiB |
|
186 Bytes |
2022-10-28 21:11:11 |
|
朱老师 (zyp)
|
3ms |
384 KiB |
|
215 Bytes |
2022-12-11 10:07:07 |
|
chenjunyao
|
3ms |
6.8 MiB |
|
191 Bytes |
2023-6-10 9:39:08 |
|
朱老师 (zyp)
|
3ms |
440 KiB |
|
219 Bytes |
2022-11-3 18:56:05 |
|
stehpen_zuo
|
3ms |
6.4 MiB |
C++20 |
254 Bytes |
2024-7-4 23:24:20 |
|
俞伏羲
|
3ms |
440 KiB |
|
192 Bytes |
2023-5-28 14:44:15 |
|
wangtan
|
3ms |
384 KiB |
|
245 Bytes |
2023-2-12 14:08:17 |