|
李某人
|
38ms |
760 KiB |
|
379 Bytes |
2022-3-6 16:16:41 |
|
人间理想小俗气
|
38ms |
760 KiB |
|
373 Bytes |
2022-1-27 19:06:38 |
|
ywh
|
38ms |
788 KiB |
|
347 Bytes |
2022-2-19 11:05:10 |
|
杜俊宏
|
38ms |
760 KiB |
|
278 Bytes |
2022-4-11 19:19:39 |
|
赵彬鸿
|
38ms |
672 KiB |
|
270 Bytes |
2022-8-13 16:01:01 |
|
程子杰 (05c41-czj)
|
39ms |
1.4 MiB |
|
348 Bytes |
2022-7-27 11:01:57 |
|
陈忝锐
|
39ms |
812 KiB |
|
359 Bytes |
2022-2-12 17:11:01 |
|
李某人
|
39ms |
692 KiB |
|
377 Bytes |
2022-3-6 16:10:22 |
|
lch (凌昌瀚)
|
39ms |
720 KiB |
|
296 Bytes |
2022-7-8 22:17:28 |
|
喵 (蹇心悦)
|
39ms |
760 KiB |
|
308 Bytes |
2022-5-28 15:13:01 |
|
贾鑫豪 (Mr Sam)
|
39ms |
1.3 MiB |
|
342 Bytes |
2022-3-3 6:55:53 |
|
李某人
|
39ms |
760 KiB |
|
379 Bytes |
2022-3-6 16:16:45 |
|
吴俊成 (wujuncheng)
|
39ms |
1.4 MiB |
|
467 Bytes |
2022-7-11 11:23:35 |
|
赵彬鸿
|
39ms |
760 KiB |
|
270 Bytes |
2022-8-13 16:01:05 |
|
你爹 (郭铠嘉)
|
39ms |
904 KiB |
|
333 Bytes |
2022-2-10 19:55:36 |
|
芒苒忧 (廖迦南)
|
39ms |
392 KiB |
|
227 Bytes |
2022-8-15 14:29:41 |
|
德克萨斯做的到吗 (liyangbao)
|
39ms |
1.4 MiB |
|
348 Bytes |
2022-11-20 11:24:51 |
|
郑之策
|
39ms |
688 KiB |
|
377 Bytes |
2022-2-13 9:55:03 |
|
陈杰晟
|
39ms |
732 KiB |
|
274 Bytes |
2022-2-13 15:30:35 |
|
时代二校+马嘉宸 (majiachen)
|
39ms |
760 KiB |
|
354 Bytes |
2023-4-8 17:46:32 |
|
赵彬鸿
|
39ms |
780 KiB |
|
270 Bytes |
2022-8-13 16:01:01 |
|
赵彬鸿
|
39ms |
728 KiB |
|
270 Bytes |
2022-8-13 16:01:04 |
|
CK (李弘毅)
|
39ms |
6.9 MiB |
|
289 Bytes |
2023-11-4 12:15:07 |
|
李某人
|
39ms |
760 KiB |
|
379 Bytes |
2022-3-6 16:14:04 |
|
李某人
|
39ms |
760 KiB |
|
377 Bytes |
2022-3-6 16:11:10 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
39ms |
868 KiB |
|
349 Bytes |
2022-6-5 18:22:31 |
|
赵彬鸿
|
39ms |
796 KiB |
|
270 Bytes |
2022-8-13 16:01:05 |
|
陈骏逸 (chenjunyi)
|
39ms |
740 KiB |
|
326 Bytes |
2022-10-6 22:02:09 |
|
赵彬鸿
|
39ms |
760 KiB |
|
270 Bytes |
2022-8-13 16:01:00 |
|
朱老师 (zyp)
|
39ms |
772 KiB |
|
304 Bytes |
2022-8-7 11:35:57 |
|
王涵熙 (水煮大肠)
|
39ms |
1.4 MiB |
|
243 Bytes |
2022-3-5 16:36:05 |
|
李某人
|
39ms |
720 KiB |
|
379 Bytes |
2022-3-6 16:14:05 |
|
马渝杭 (mayuhang)
|
39ms |
1.1 MiB |
|
308 Bytes |
2023-3-20 19:32:40 |
|
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)
|
39ms |
6.9 MiB |
|
327 Bytes |
2023-8-12 15:44:12 |
|
赵彬鸿
|
39ms |
684 KiB |
|
270 Bytes |
2022-8-13 16:01:02 |
|
SYC0226
|
39ms |
384 KiB |
|
266 Bytes |
2022-3-20 13:59:43 |
|
赵彬鸿
|
39ms |
716 KiB |
|
270 Bytes |
2022-8-13 16:01:04 |
|
11451254188 (22029-mjh)
|
40ms |
1.3 MiB |
|
435 Bytes |
2022-11-29 13:26:02 |
|
疯神芭芭脱丝 (李卓修)
|
40ms |
744 KiB |
|
371 Bytes |
2022-1-23 20:19:06 |
|
LUKHE (LukeHu)
|
40ms |
1.1 MiB |
|
348 Bytes |
2022-1-25 20:04:03 |
|
徐正旺 (xzw)
|
40ms |
1.3 MiB |
|
274 Bytes |
2022-7-31 21:49:23 |
|
赵彬鸿
|
40ms |
760 KiB |
|
270 Bytes |
2022-8-13 16:01:03 |
|
赵彬鸿
|
40ms |
760 KiB |
|
270 Bytes |
2022-8-13 16:01:02 |
|
罗翌珂 (dangdang)
|
40ms |
1.4 MiB |
|
330 Bytes |
2022-9-7 22:12:18 |
|
郑岐蔚
|
40ms |
2.9 MiB |
|
282 Bytes |
2023-1-26 14:38:27 |
|
叶哲宇 (yzy)
|
40ms |
6.8 MiB |
|
269 Bytes |
2023-6-23 10:45:39 |
|
赵彬鸿
|
40ms |
760 KiB |
|
270 Bytes |
2022-8-13 16:01:00 |
|
赵彬鸿
|
40ms |
688 KiB |
|
270 Bytes |
2022-8-13 16:01:00 |
|
李某人
|
40ms |
764 KiB |
|
379 Bytes |
2022-3-6 16:14:02 |
|
Yangshenxin (𝒲𝒶𝓉𝑒𝓇)
|
40ms |
704 KiB |
|
352 Bytes |
2022-1-23 18:41:54 |
|
luozixi
|
40ms |
760 KiB |
|
237 Bytes |
2023-2-15 20:08:58 |
|
手搓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)
|
41ms |
1.3 MiB |
|
414 Bytes |
2022-11-27 10:30:41 |
|
赵彬鸿
|
41ms |
724 KiB |
|
270 Bytes |
2022-8-13 16:00:58 |
|
傅博涛
|
41ms |
760 KiB |
|
297 Bytes |
2022-1-22 11:17:35 |
|
李某人
|
41ms |
752 KiB |
|
379 Bytes |
2022-3-6 16:13:15 |
|
luoluonuoya
|
41ms |
432 KiB |
|
360 Bytes |
2022-1-26 16:41:30 |
|
赵彬鸿
|
41ms |
712 KiB |
|
270 Bytes |
2022-8-13 16:00:59 |
|
赵彬鸿
|
41ms |
760 KiB |
|
270 Bytes |
2022-8-13 16:01:00 |
|
杨瀚霖 (yanghanlin)
|
41ms |
1.1 MiB |
|
351 Bytes |
2023-2-11 11:31:49 |
|
许炜铭 (xuweiming)
|
41ms |
1.3 MiB |
|
297 Bytes |
2023-4-17 21:45:15 |
|
ganlin1
|
42ms |
6.9 MiB |
|
229 Bytes |
2023-7-29 10:43:03 |
|
赵彬鸿
|
42ms |
696 KiB |
|
270 Bytes |
2022-8-13 16:01:04 |
|
李彭 宋代诗人 (ljy123456)
|
42ms |
1.1 MiB |
|
307 Bytes |
2023-4-12 21:38:36 |
|
黄梓桐 (HuangZiTong)
|
42ms |
1 MiB |
|
245 Bytes |
2022-8-13 21:24:37 |
|
繁星 (05c35-zzm)
|
43ms |
708 KiB |
|
276 Bytes |
2022-12-4 9:51:20 |
|
陈红恺 (chk)
|
43ms |
1.4 MiB |
|
338 Bytes |
2022-8-26 16:06:44 |
|
张雯皓 (zhangwenhao)
|
44ms |
7 MiB |
|
316 Bytes |
2023-12-23 11:23:07 |
|
周琪渃
|
47ms |
4.3 MiB |
|
388 Bytes |
2022-11-24 17:53:26 |
|
时代二校+王吕棪 (wanglvyan)
|
49ms |
404 KiB |
|
209 Bytes |
2023-4-8 17:49:57 |
|
马渝杭 (mayuhang)
|
50ms |
1.1 MiB |
|
307 Bytes |
2023-3-20 19:31:49 |
|
yuhaodi
|
51ms |
1.4 MiB |
|
226 Bytes |
2023-5-17 13:16:55 |
|
wuzhenghan
|
52ms |
760 KiB |
|
210 Bytes |
2023-2-9 19:03:45 |
|
wangruibo20xh
|
53ms |
760 KiB |
|
160 Bytes |
2022-1-20 21:19:08 |
|
zyl
|
69ms |
7.3 MiB |
|
348 Bytes |
2024-1-5 15:28:01 |
|
贾博涵
|
71ms |
7.2 MiB |
|
265 Bytes |
2023-12-1 11:25:21 |
|
炸鱼4000+ (dxc)
|
72ms |
7.2 MiB |
|
241 Bytes |
2023-11-29 21:55:21 |
|
胡瀚文
|
79ms |
1.1 MiB |
|
192 Bytes |
2022-7-18 11:56:04 |
|
吃小孩的viv_
|
82ms |
7.1 MiB |
|
272 Bytes |
2023-12-10 15:29:47 |
|
fcxin
|
82ms |
20.8 MiB |
Python 3 |
88 Bytes |
2024-8-14 11:27:55 |
|
fjx
|
96ms |
788 KiB |
|
295 Bytes |
2024-3-8 20:01:21 |
|
zhangyouze (张佑泽)
|
100ms |
1.3 MiB |
|
344 Bytes |
2024-2-26 15:50:51 |
|
陈诺
|
100ms |
916 KiB |
|
293 Bytes |
2024-2-4 22:42:21 |
|
新壹街校区-冉睦阳 (冉睦阳)
|
101ms |
1.1 MiB |
|
341 Bytes |
2024-3-10 10:17:19 |
|
没有此人 (akm)
|
102ms |
544 KiB |
C++14 |
224 Bytes |
2024-9-28 15:16:29 |
|
拥抱幸福小熊(吴沛篪)
|
103ms |
1.3 MiB |
|
289 Bytes |
2024-3-30 8:41:28 |
|
jdy
|
103ms |
1.3 MiB |
|
301 Bytes |
2024-3-12 20:12:58 |
|
时代2校+施皓宬 (shihaocheng)
|
103ms |
832 KiB |
C++11 |
264 Bytes |
2024-10-27 11:30:21 |
|
My name is Man (钟卓劭)
|
103ms |
1 MiB |
|
222 Bytes |
2024-3-17 14:10:39 |
|
杨淇瑞 (杨淇瑞29)
|
105ms |
1.3 MiB |
C++98 |
364 Bytes |
2024-10-25 22:12:46 |
|
liushiqi
|
106ms |
1 MiB |
C++11(O2) |
306 Bytes |
2024-9-3 15:38:52 |
|
stehpen_zuo
|
107ms |
532 KiB |
C++20 |
283 Bytes |
2024-9-18 13:34:52 |
|
安闵煜 (anzai)
|
107ms |
884 KiB |
C++11 |
361 Bytes |
2024-9-29 14:19:14 |
|
廖祥富
|
107ms |
1.3 MiB |
C++17 |
248 Bytes |
2024-11-18 10:33:28 |
|
梨冻亿 (wiueh)
|
112ms |
14.5 MiB |
Python 3 |
100 Bytes |
2022-1-23 18:16:05 |
|
19598
|
116ms |
20.2 MiB |
Python 3 |
84 Bytes |
2023-9-29 11:29:24 |
|
谢润轩
|
118ms |
14.5 MiB |
Python 3 |
63 Bytes |
2022-4-7 20:02:57 |
|
高俊
|
120ms |
20.1 MiB |
Python 3 |
175 Bytes |
2023-10-27 16:40:37 |
|
可爱酱 (张可忻)
|
122ms |
20.2 MiB |
Python 3 |
183 Bytes |
2023-10-11 15:28:37 |
|
cola
|
123ms |
15.2 MiB |
Python 3 |
74 Bytes |
2022-12-21 20:44:24 |
|
kongql
|
129ms |
11.9 MiB |
Python 3 |
111 Bytes |
2022-7-22 17:18:38 |