|
Erin
|
22ms |
7 MiB |
C++98 |
546 Bytes |
2024-5-30 16:32:46 |
|
canna
|
22ms |
6.8 MiB |
|
803 Bytes |
2023-10-17 12:35:19 |
|
Yuan (Zongzi1)
|
23ms |
6.6 MiB |
C++17(O2) |
976 Bytes |
2024-7-19 18:23:47 |
|
MoonLight ( aaa)
|
23ms |
8.2 MiB |
|
552 Bytes |
2022-1-26 20:25:40 |
|
赵沛喆
|
23ms |
8.2 MiB |
|
715 Bytes |
2023-3-26 15:10:39 |
|
时代一校 - 冯隆浩 (冯隆浩)
|
23ms |
6.7 MiB |
|
586 Bytes |
2023-7-18 11:35:48 |
|
芒苒忧 (廖迦南)
|
24ms |
8.2 MiB |
|
525 Bytes |
2023-4-9 13:59:48 |
|
罗莎莎
|
24ms |
7.3 MiB |
|
1.4 KiB |
2023-10-1 18:05:28 |
|
贾博涵
|
24ms |
7 MiB |
|
562 Bytes |
2023-12-19 14:05:15 |
|
Nico
|
25ms |
6.8 MiB |
|
751 Bytes |
2023-10-3 17:59:48 |
|
yxj
|
25ms |
8.2 MiB |
|
638 Bytes |
2022-11-24 19:34:32 |
|
张雯皓 (zhangwenhao)
|
25ms |
7 MiB |
|
489 Bytes |
2023-12-23 11:27:22 |
|
张瑞博
|
25ms |
6.8 MiB |
C++11 |
443 Bytes |
2024-6-29 17:29:24 |
|
安闵煜 (anzai)
|
25ms |
6.8 MiB |
C++11 |
581 Bytes |
2024-8-14 11:26:23 |
|
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)
|
26ms |
8.2 MiB |
|
653 Bytes |
2023-8-23 18:00:15 |
|
ycy
|
26ms |
8.2 MiB |
|
594 Bytes |
2022-10-24 22:43:33 |
|
xiangsiyu
|
26ms |
8.2 MiB |
|
660 Bytes |
2022-8-5 10:37:15 |
|
ganlin1
|
26ms |
8.2 MiB |
|
458 Bytes |
2023-8-4 15:42:18 |
|
无尽的想象 (谭仕高)
|
27ms |
8.2 MiB |
|
502 Bytes |
2022-12-14 13:37:13 |
|
ycy
|
27ms |
8.2 MiB |
|
595 Bytes |
2022-10-24 22:43:27 |
|
ycy
|
27ms |
8.2 MiB |
|
587 Bytes |
2022-10-24 22:50:17 |
|
xiongxinyao
|
27ms |
8.2 MiB |
|
714 Bytes |
2022-12-4 10:01:22 |
|
ycy
|
27ms |
8.2 MiB |
|
596 Bytes |
2022-10-24 22:40:57 |
|
10255
|
27ms |
8.2 MiB |
|
445 Bytes |
2023-3-20 20:43:57 |
|
谢延灏 (xeiyanhao---a handsome boy)
|
27ms |
8.2 MiB |
|
1.4 KiB |
2022-7-31 14:05:13 |
|
王乐仪
|
28ms |
8.2 MiB |
|
571 Bytes |
2022-3-1 19:30:46 |
|
甄一阳 (22016-zyy)
|
28ms |
8.2 MiB |
|
535 Bytes |
2022-11-24 19:42:25 |
|
1396013295
|
28ms |
8.2 MiB |
|
638 Bytes |
2022-5-29 9:07:45 |
|
1396013295
|
28ms |
8.2 MiB |
|
638 Bytes |
2022-5-29 9:08:03 |
|
蒲梓勋 (puzixun)
|
28ms |
8.2 MiB |
|
596 Bytes |
2022-10-24 22:39:41 |
|
杜是贤 (dushixian)
|
28ms |
8.2 MiB |
|
525 Bytes |
2022-12-4 9:32:26 |
|
xmw318046
|
28ms |
6.9 MiB |
C++98 |
491 Bytes |
2024-7-3 16:18:58 |
|
(张洛诚)
|
28ms |
8.2 MiB |
|
710 Bytes |
2023-5-26 20:57:47 |
|
枉哲锐
|
28ms |
8.2 MiB |
|
540 Bytes |
2022-1-26 20:04:52 |
|
王晴萱
|
28ms |
8.2 MiB |
|
428 Bytes |
2023-7-18 14:34:15 |
|
ycy
|
29ms |
8.2 MiB |
|
592 Bytes |
2022-10-24 22:43:39 |
|
胡宸华 (huchenhua)
|
29ms |
8.2 MiB |
|
571 Bytes |
2023-8-20 20:20:17 |
|
张祖名
|
29ms |
6.8 MiB |
C++98(O2) |
507 Bytes |
2024-6-15 16:52:42 |
|
刘致言
|
30ms |
8.2 MiB |
|
565 Bytes |
2023-3-11 10:22:48 |
|
chen (peter)
|
30ms |
8.2 MiB |
|
1.1 KiB |
2023-6-17 9:32:30 |
|
Jack
|
30ms |
8.2 MiB |
|
646 Bytes |
2023-1-11 9:35:27 |
|
dlskdff (huenjie)
|
30ms |
6.8 MiB |
|
422 Bytes |
2023-10-9 20:38:08 |
|
huanglu
|
30ms |
8.2 MiB |
|
714 Bytes |
2022-11-4 16:39:20 |
|
爱琴海校区-刁钲洋 (刁钲洋)
|
31ms |
7 MiB |
|
708 Bytes |
2023-11-12 13:03:58 |
|
林凡童 (lft)
|
31ms |
8.2 MiB |
|
638 Bytes |
2022-9-15 19:57:38 |
|
安闵煜 (anzai)
|
32ms |
6.8 MiB |
C++11 |
491 Bytes |
2024-8-14 11:21:32 |
|
任凌薇
|
32ms |
8.2 MiB |
|
465 Bytes |
2023-8-23 18:27:45 |
|
爱琴海校区-DYT (DYT)
|
32ms |
8.2 MiB |
|
462 Bytes |
2023-8-23 18:31:24 |
|
zlx (xiao)
|
33ms |
8.2 MiB |
|
714 Bytes |
2022-6-5 18:58:13 |
|
微风将至 (李睿轩)
|
33ms |
8.2 MiB |
|
537 Bytes |
2022-6-5 19:56:53 |
|
陈杰晟
|
33ms |
8.2 MiB |
|
594 Bytes |
2022-9-11 15:57:31 |
|
强奸肾[冷漠] (05c41-zjb)
|
34ms |
8.2 MiB |
|
506 Bytes |
2023-6-30 19:58:39 |
|
11111
|
34ms |
8.2 MiB |
|
449 Bytes |
2022-6-1 13:41:09 |
|
胡澜之 (666hlz666)
|
34ms |
8.2 MiB |
|
426 Bytes |
2023-6-23 10:10:15 |
|
scallway
|
34ms |
6.8 MiB |
|
567 Bytes |
2023-10-19 10:30:33 |
|
谭懿轩 (yanyixuan)
|
34ms |
8.2 MiB |
|
417 Bytes |
2022-8-9 15:46:27 |
|
姚宏逸
|
34ms |
8.2 MiB |
|
449 Bytes |
2022-2-2 22:25:43 |
|
yiqiuyu23002
|
34ms |
8.2 MiB |
|
459 Bytes |
2023-7-27 11:44:47 |
|
文硕 (文硕1)
|
35ms |
8.2 MiB |
|
449 Bytes |
2023-2-1 8:31:20 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
35ms |
8.2 MiB |
|
585 Bytes |
2023-2-4 11:14:17 |
|
赵泳鑫 (zhaoyongxin)
|
36ms |
8.2 MiB |
|
487 Bytes |
2022-7-17 8:47:05 |
|
22029-lsl
|
36ms |
8.2 MiB |
|
446 Bytes |
2023-2-4 11:18:51 |
|
欧俊阳
|
36ms |
6.8 MiB |
|
447 Bytes |
2023-8-24 15:26:18 |
|
Jose (反恐皮蛋)
|
36ms |
8.2 MiB |
|
516 Bytes |
2023-8-23 18:22:09 |
|
朱泽晟
|
36ms |
8.2 MiB |
|
560 Bytes |
2022-8-31 17:36:22 |
|
何晟瑞 (hsr01)
|
36ms |
8.2 MiB |
|
442 Bytes |
2022-6-11 12:08:24 |
|
林小博
|
36ms |
8.2 MiB |
|
1.1 KiB |
2023-2-11 9:56:04 |
|
RanHao
|
36ms |
8.2 MiB |
|
635 Bytes |
2023-7-25 14:48:25 |
|
Tender. (05c05-zhou)
|
37ms |
8.2 MiB |
|
486 Bytes |
2022-10-18 11:47:56 |
|
scallway
|
37ms |
8.2 MiB |
|
562 Bytes |
2023-6-27 13:29:31 |
|
scallway
|
37ms |
6.8 MiB |
|
565 Bytes |
2023-10-19 10:31:58 |
|
zhangzhimo
|
37ms |
8.2 MiB |
|
1.1 KiB |
2022-12-3 17:10: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)
|
37ms |
8.2 MiB |
|
616 Bytes |
2023-2-4 11:18:44 |
|
_PXY_
|
37ms |
8.2 MiB |
|
515 Bytes |
2022-1-23 11:54:36 |
|
zhangyh (张育菡)
|
38ms |
8.2 MiB |
|
456 Bytes |
2022-6-13 22:08:41 |
|
Tang
|
38ms |
8.2 MiB |
|
526 Bytes |
2022-5-14 11:21:30 |
|
22029-lsl
|
38ms |
8.2 MiB |
|
446 Bytes |
2023-2-4 11:01:05 |
|
chaikexu
|
38ms |
8.2 MiB |
|
1.1 KiB |
2022-11-27 9:47:16 |
|
huenjun
|
38ms |
6.8 MiB |
|
439 Bytes |
2023-10-9 20:38:40 |
|
马渝杭 (mayuhang)
|
38ms |
8.2 MiB |
|
502 Bytes |
2022-9-29 18:31:55 |
|
源著校区-宋昊成 (马冬梅)
|
38ms |
8.2 MiB |
|
584 Bytes |
2023-2-26 19:16:35 |
|
神秘黑客
|
38ms |
8.2 MiB |
|
587 Bytes |
2022-3-6 10:26:45 |
|
iLansensei (hjs(Caster))
|
38ms |
8.2 MiB |
|
496 Bytes |
2022-6-15 17:11:12 |
|
潘光瑞 (NB牛牛大师)
|
38ms |
8.2 MiB |
|
460 Bytes |
2022-6-12 19:36:15 |
|
疯神芭芭脱丝 (李卓修)
|
38ms |
8.2 MiB |
|
1.1 KiB |
2022-7-15 16:06:53 |
|
zcx
|
39ms |
8.2 MiB |
|
495 Bytes |
2023-2-3 20:25:09 |
|
22029-hqh
|
39ms |
8.2 MiB |
|
502 Bytes |
2023-2-4 11:30:03 |
|
XYZ303
|
39ms |
8.2 MiB |
|
555 Bytes |
2022-6-5 19:33:41 |
|
没有此人 (akm)
|
39ms |
8.2 MiB |
|
455 Bytes |
2023-2-2 16:35:06 |
|
22029-hqh
|
39ms |
8.2 MiB |
|
502 Bytes |
2023-2-4 11:30:44 |
|
孙烽轶 (sfy)
|
39ms |
8.2 MiB |
|
435 Bytes |
2023-7-9 11:30:18 |
|
朱老师 (zyp)
|
39ms |
8.2 MiB |
|
562 Bytes |
2022-8-5 10:18:52 |
|
李树崑 (lishukun)
|
39ms |
8.2 MiB |
|
622 Bytes |
2022-3-26 13:22:02 |
|
11451254188 (22029-mjh)
|
39ms |
8.2 MiB |
|
464 Bytes |
2023-2-4 11:44:47 |
|
小忙果 (王昱杰)
|
40ms |
8.2 MiB |
|
431 Bytes |
2023-7-18 9:23:38 |
|
谁陪訫牞 (杀手) (22029-zys)
|
40ms |
8.2 MiB |
|
597 Bytes |
2023-2-3 20:39:34 |
|
周琪渃
|
40ms |
8.2 MiB |
|
989 Bytes |
2023-3-9 16:58:27 |
|
22029-hqh
|
40ms |
8.2 MiB |
|
502 Bytes |
2023-2-4 11:30:43 |
|
22029-hqh
|
40ms |
8.2 MiB |
|
502 Bytes |
2023-2-4 11:30:44 |
|
SYC0226
|
40ms |
8.2 MiB |
|
574 Bytes |
2022-3-20 14:13:42 |