|
zlx (xiao)
|
861ms |
2.6 MiB |
|
1.5 KiB |
2022-11-26 19:33:33 |
|
MoonLight ( aaa)
|
893ms |
2.7 MiB |
|
569 Bytes |
2022-4-28 21:01:04 |
|
My name is Man (钟卓劭)
|
915ms |
6.8 MiB |
C++98 |
261 Bytes |
2024-8-9 14:47:23 |
|
RanHao
|
970ms |
8.2 MiB |
|
453 Bytes |
2023-8-23 17:23:29 |
|
何晟瑞 (hsr01)
|
979ms |
6.9 MiB |
|
693 Bytes |
2023-9-23 20:17:15 |
|
wangruibo20xh
|
986ms |
6.9 MiB |
|
241 Bytes |
2023-8-1 20:40:24 |
|
Tender. (05c05-zhou)
|
1029ms |
6.7 MiB |
|
453 Bytes |
2023-8-25 9:34:47 |
|
黄彬栩
|
1092ms |
7 MiB |
C++20(O2) |
241 Bytes |
2024-6-2 16:30:57 |
|
tongxiao
|
1106ms |
6.9 MiB |
C++20(O2) |
228 Bytes |
2024-6-10 19:25:31 |
|
Yuan (Zongzi1)
|
1212ms |
6.6 MiB |
C++17(O2) |
632 Bytes |
2024-7-25 12:41:50 |
|
刘老师 (图书管理员)
|
1217ms |
7.2 MiB |
C++11 |
835 Bytes |
2024-5-16 15:06:36 |
|
新壹街 朱启航 (zhuqihang)
|
1301ms |
7.2 MiB |
C++98 |
585 Bytes |
2024-5-1 8:14:22 |
|
scallway
|
1340ms |
6.6 MiB |
C++11 |
876 Bytes |
2024-7-6 18:11:27 |
|
刘老师 (图书管理员)
|
1343ms |
7.2 MiB |
C++11 |
570 Bytes |
2024-5-16 15:09:16 |
|
刘老师 (图书管理员)
|
1348ms |
7.2 MiB |
C++11 |
602 Bytes |
2024-5-16 15:08:29 |
|
刘老师 (图书管理员)
|
1356ms |
7.2 MiB |
C++11 |
587 Bytes |
2024-5-16 15:08:54 |
|
何昊宇 (22016-hhy)
|
1359ms |
7.1 MiB |
|
303 Bytes |
2023-9-24 11:08:03 |
|
胡澜之 (666hlz666)
|
1369ms |
6.9 MiB |
C++11 |
575 Bytes |
2024-6-12 20:14:10 |
|
新壹街-曾浩坤 (曾浩坤)
|
1378ms |
7.2 MiB |
|
654 Bytes |
2023-9-23 10:38:33 |
|
Jose (反恐皮蛋)
|
1411ms |
7.1 MiB |
|
749 Bytes |
2023-9-23 10:35:05 |
|
ShenChuan
|
1435ms |
7.1 MiB |
|
512 Bytes |
2023-9-24 11:09:09 |
|
樊竣熠 (lft1114)
|
1444ms |
2.6 MiB |
|
580 Bytes |
2022-8-16 22:34:15 |
|
Jack
|
1454ms |
7.1 MiB |
|
618 Bytes |
2023-9-23 10:36:53 |
|
曹埊睿 (caodirui)
|
1457ms |
6.7 MiB |
|
770 Bytes |
2023-9-23 20:14:37 |
|
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)
|
1463ms |
6.7 MiB |
|
219 Bytes |
2023-9-10 16:58:14 |
|
x0l0x
|
1464ms |
6.8 MiB |
|
243 Bytes |
2023-10-9 16:05:07 |
|
林凡童 (lft)
|
1472ms |
6.7 MiB |
|
508 Bytes |
2023-9-23 20:15:59 |
|
ShenChuan
|
1483ms |
6.7 MiB |
|
533 Bytes |
2023-9-24 10:40:02 |
|
王晨志 (wangchenzhi)
|
1485ms |
2.6 MiB |
|
426 Bytes |
2022-7-1 15:52:31 |
|
zhm123
|
1489ms |
6.7 MiB |
|
680 Bytes |
2023-9-1 14:15:40 |
|
杜是贤 (dushixian)
|
1494ms |
2.6 MiB |
|
220 Bytes |
2023-5-28 10:55:05 |
|
爱琴海校区-刁钲洋 (刁钲洋)
|
1499ms |
6.9 MiB |
|
342 Bytes |
2023-8-4 20:45:13 |
|
汪致卉 (wangzh)
|
1500ms |
2.6 MiB |
|
503 Bytes |
2022-2-25 17:22:37 |
|
何昊宇 (22016-hhy)
|
1513ms |
7.1 MiB |
|
288 Bytes |
2023-9-24 11:07:46 |
|
luoluonuoya
|
1513ms |
2.6 MiB |
|
661 Bytes |
2022-8-12 15:55:13 |
|
胡瀚文
|
1515ms |
3.3 MiB |
|
212 Bytes |
2022-7-17 12:00:57 |
|
我推的乱破 (贺俊楠)
|
1522ms |
6.7 MiB |
|
263 Bytes |
2023-9-3 10:18:58 |
|
姚宏逸
|
1528ms |
2.6 MiB |
|
844 Bytes |
2022-3-2 19:45:53 |
|
时代二校-陈天成 (鸭缩毛巾)
|
1528ms |
6.7 MiB |
|
198 Bytes |
2023-9-9 16:18:16 |
|
colin1112 (墙凌可)
|
1530ms |
2.6 MiB |
|
400 Bytes |
2023-3-20 21:09:10 |
|
郑岐蔚
|
1536ms |
3.2 MiB |
|
438 Bytes |
2023-1-26 14:55:51 |
|
姚宏逸
|
1537ms |
1.5 MiB |
|
685 Bytes |
2022-3-11 20:18:59 |
|
huyinuo
|
1563ms |
1.6 MiB |
|
264 Bytes |
2022-8-25 19:30:42 |
|
zhangzhixiong
|
1566ms |
7.1 MiB |
|
247 Bytes |
2023-7-6 16:09:44 |
|
wuzhenghan
|
1577ms |
1.6 MiB |
|
209 Bytes |
2023-2-15 22:10:39 |
|
renqiumo
|
1587ms |
2.6 MiB |
|
378 Bytes |
2022-11-13 13:51:55 |
|
zzzrrrxxx
|
1593ms |
6.8 MiB |
|
250 Bytes |
2023-10-19 21:59:27 |
|
马渝杭 (mayuhang)
|
1593ms |
3.2 MiB |
|
214 Bytes |
2023-3-15 20:02:41 |
|
wangjunhan
|
1600ms |
3.3 MiB |
|
266 Bytes |
2022-8-9 14:37:30 |
|
姚宏逸
|
1608ms |
2.7 MiB |
|
685 Bytes |
2022-3-9 19:35:02 |
|
手搓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)
|
1613ms |
3.3 MiB |
|
235 Bytes |
2023-6-3 11:40:53 |
|
GYZ
|
1614ms |
1.6 MiB |
|
339 Bytes |
2022-5-26 13:16:08 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
1625ms |
3.1 MiB |
|
270 Bytes |
2022-11-3 21:24:20 |
|
疯神芭芭脱丝 (李卓修)
|
1634ms |
2.6 MiB |
|
259 Bytes |
2022-6-9 18:59:32 |
|
wuzhenghan
|
1638ms |
1.2 MiB |
|
209 Bytes |
2023-2-15 22:10:56 |
|
杜俊宏
|
1645ms |
1.2 MiB |
|
240 Bytes |
2022-7-15 9:03:46 |
|
没有此人 (akm)
|
1646ms |
6.7 MiB |
|
312 Bytes |
2023-9-16 13:36:50 |
|
关博源
|
1653ms |
1.2 MiB |
|
367 Bytes |
2023-3-31 20:20:22 |
|
1396013295
|
1681ms |
3.5 MiB |
|
741 Bytes |
2022-1-23 18:52:00 |
|
朱老师 (zyp)
|
1682ms |
1.7 MiB |
|
594 Bytes |
2022-9-29 1:18:36 |
|
zyl
|
1693ms |
7.1 MiB |
|
937 Bytes |
2024-1-21 14:21:41 |
|
姚宏逸
|
1695ms |
1.2 MiB |
|
685 Bytes |
2022-3-2 19:46:58 |
|
李树崑 (lishukun)
|
1704ms |
1.2 MiB |
|
280 Bytes |
2022-8-20 12:30:22 |
|
wuzhenghan
|
1716ms |
1.3 MiB |
|
209 Bytes |
2023-2-15 22:10:46 |
|
李彭 宋代诗人 (ljy123456)
|
1727ms |
1.7 MiB |
|
510 Bytes |
2023-3-29 20:51:54 |
|
文硕 (文硕1)
|
1760ms |
1.2 MiB |
|
276 Bytes |
2022-7-12 13:38:33 |
|
赵泳鑫 (zhaoyongxin)
|
1774ms |
2.7 MiB |
|
276 Bytes |
2022-7-12 11:33:21 |
|
huanglu
|
2308ms |
2.5 MiB |
C++98 |
833 Bytes |
2024-10-2 10:41:56 |
|
希蒙 (zhengxingya)
|
2492ms |
3.3 MiB |
|
849 Bytes |
2024-3-9 10:35:13 |
|
希蒙 (zhengxingya)
|
2532ms |
3.3 MiB |
|
849 Bytes |
2024-3-9 10:35:42 |
|
Accepted (周芷乐)
|
3047ms |
2.6 MiB |
C++11(O2) |
681 Bytes |
2024-10-29 20:38:18 |
|
嘿嘿
|
3311ms |
2.6 MiB |
|
533 Bytes |
2024-3-31 16:59:51 |
|
周浩楠 (开朗的周好难)
|
3321ms |
7.2 MiB |
|
658 Bytes |
2024-1-13 11:16:29 |
|
小码王高新校区—刘晨皓 (shishen)
|
3388ms |
2.6 MiB |
C++98 |
493 Bytes |
2024-11-2 17:22:13 |
|
sunsihan
|
3443ms |
3.2 MiB |
|
711 Bytes |
2024-3-16 10:38:09 |
|
嘿嘿
|
3462ms |
3.4 MiB |
|
700 Bytes |
2024-3-31 16:38:37 |
|
李彦臻
|
3467ms |
3.9 MiB |
|
692 Bytes |
2024-3-24 10:17:12 |
|
时代二校-王盼兮 (wangpanxi)
|
3537ms |
2.5 MiB |
|
565 Bytes |
2024-3-30 16:47:03 |
|
Turorany (郑浩然)
|
3549ms |
4.5 MiB |
C++98 |
642 Bytes |
2024-9-19 19:56:31 |
|
岳鑫正
|
3589ms |
3 MiB |
|
549 Bytes |
2024-3-23 10:38:09 |
|
Jose (反恐皮蛋)
|
3605ms |
2.5 MiB |
|
845 Bytes |
2024-3-23 17:46:43 |
|
张智洋
|
3609ms |
4 MiB |
C++98 |
1.5 KiB |
2024-9-7 15:55:01 |
|
超级管理员 (root)
|
3614ms |
3.9 MiB |
|
613 Bytes |
2024-3-22 23:03:36 |
|
谭红中 (不知道)
|
3620ms |
22.9 MiB |
Python 3 |
102 Bytes |
2022-4-17 21:19:38 |
|
zyl
|
3623ms |
3.7 MiB |
|
543 Bytes |
2024-3-28 17:50:21 |
|
新壹街—熊轩杭 (xiongxuanhang)
|
3630ms |
3.4 MiB |
|
270 Bytes |
2024-3-16 16:42:30 |
|
新壹街校区-冉睦阳 (冉睦阳)
|
3658ms |
2.5 MiB |
|
517 Bytes |
2024-3-31 10:00:28 |
|
zyl
|
3663ms |
2.4 MiB |
|
543 Bytes |
2024-3-30 16:37:58 |
|
zvt_132 (任子轩)
|
3730ms |
3.5 MiB |
C++98 |
521 Bytes |
2024-10-13 11:06:37 |
|
牟淳雅
|
3732ms |
4.1 MiB |
|
503 Bytes |
2024-3-31 9:58:00 |
|
jdy
|
3743ms |
3.5 MiB |
|
214 Bytes |
2024-3-10 14:42:08 |
|
爱情海校区—沙天一 (沙天一)
|
3745ms |
7.2 MiB |
|
278 Bytes |
2023-12-30 9:33:18 |
|
希蒙 (zhengxingya)
|
3760ms |
2.5 MiB |
|
356 Bytes |
2024-3-9 9:31:07 |
|
ReFly (NKZKY)
|
3779ms |
2.6 MiB |
|
219 Bytes |
2024-3-23 20:12:28 |
|
时代二校-焦雨齐 (Angel)
|
3781ms |
4.1 MiB |
|
523 Bytes |
2024-4-6 16:20:07 |
|
时代2校-程俊燃 (chengjunran)
|
3817ms |
2.5 MiB |
|
220 Bytes |
2024-4-5 16:37:28 |
|
赵沛喆
|
3831ms |
2.3 MiB |
|
271 Bytes |
2022-8-17 15:36:39 |
|
小忙果 (王昱杰)
|
3834ms |
3.3 MiB |
C++98 |
749 Bytes |
2024-9-5 10:50:24 |
|
cainuoyan
|
3886ms |
2.6 MiB |
C++98 |
223 Bytes |
2024-10-16 20:53:13 |
|
张瑞博
|
3993ms |
3.9 MiB |
C++11 |
214 Bytes |
2024-9-12 11:59:36 |