|
赵沛喆
|
7ms |
256 KiB |
|
143 Bytes |
2022-6-20 22:03:09 |
|
zvt_132 (任子轩)
|
8ms |
7 MiB |
|
126 Bytes |
2023-12-23 16:14:47 |
|
经常消失 (小萝卜)
|
12ms |
384 KiB |
|
161 Bytes |
2022-6-25 14:23:38 |
|
呵 (mohaoran)
|
13ms |
512 KiB |
|
134 Bytes |
2022-6-17 22:25:15 |
|
汪致卉 (wangzh)
|
13ms |
384 KiB |
|
187 Bytes |
2022-6-17 17:42:59 |
|
黄梓桐 (HuangZiTong)
|
13ms |
384 KiB |
|
135 Bytes |
2022-6-12 12:55:19 |
|
杜俊宏
|
13ms |
404 KiB |
|
133 Bytes |
2022-6-16 18:59:00 |
|
huyinuo
|
13ms |
384 KiB |
|
152 Bytes |
2022-6-12 15:55:08 |
|
新壹街——陈学彬 (BUG)
|
13ms |
444 KiB |
|
140 Bytes |
2022-6-19 9:06:29 |
|
luoluonuoya
|
13ms |
392 KiB |
|
160 Bytes |
2022-6-18 16:04:27 |
|
Randy Marsh (杨子腾)
|
13ms |
384 KiB |
|
181 Bytes |
2022-6-12 11:15:19 |
|
ywh
|
13ms |
384 KiB |
|
141 Bytes |
2022-6-18 19:35:28 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
13ms |
384 KiB |
|
175 Bytes |
2022-6-26 16:18:40 |
|
NJL (NJlL)
|
13ms |
392 KiB |
|
148 Bytes |
2022-6-19 16:35:38 |
|
任瑞 的 学生 (jiangyadong)
|
13ms |
384 KiB |
|
139 Bytes |
2022-6-16 13:50:10 |
|
AC[谭赫奕] (tanheyi)
|
13ms |
392 KiB |
|
150 Bytes |
2023-4-1 20:54:18 |
|
凌肯 (lingken22006)
|
13ms |
384 KiB |
|
167 Bytes |
2022-7-4 21:15:04 |
|
胡瀚文
|
13ms |
392 KiB |
|
139 Bytes |
2022-7-16 14:49:37 |
|
凌肯 (lingken22006)
|
13ms |
392 KiB |
|
167 Bytes |
2022-7-4 21:15:08 |
|
新一街校区Jason_LuoYouZheng (罗友峥)
|
13ms |
384 KiB |
|
152 Bytes |
2022-7-2 20:55:45 |
|
xiangsiyu
|
13ms |
384 KiB |
|
165 Bytes |
2022-6-25 20:01:35 |
|
谢博文
|
13ms |
384 KiB |
|
150 Bytes |
2022-6-25 9:06:51 |
|
杜是贤 (dushixian)
|
13ms |
384 KiB |
|
138 Bytes |
2022-6-16 20:25:44 |
|
cheers 戴 (daizhuorun)
|
13ms |
512 KiB |
|
146 Bytes |
2022-6-18 16:06:51 |
|
李彭 宋代诗人 (ljy123456)
|
13ms |
512 KiB |
|
195 Bytes |
2023-4-5 21:22:52 |
|
Tang
|
13ms |
384 KiB |
|
150 Bytes |
2022-6-25 9:07:42 |
|
李树崑 (lishukun)
|
13ms |
384 KiB |
|
191 Bytes |
2022-8-21 11:43:02 |
|
杨皓然(X) (yanghaoran12)
|
13ms |
432 KiB |
|
154 Bytes |
2022-7-9 15:28:21 |
|
金沙-文豪 (wenhao)
|
14ms |
6.9 MiB |
C++98(O2) |
169 Bytes |
2024-8-16 15:30:42 |
|
胡澜之 (666hlz666)
|
14ms |
6.9 MiB |
C++11 |
148 Bytes |
2024-8-23 10:27:46 |
|
张瑞博
|
14ms |
7 MiB |
C++11 |
149 Bytes |
2024-5-31 21:09:52 |
|
张泰凌 (ztl)
|
14ms |
384 KiB |
|
157 Bytes |
2022-6-25 14:33:32 |
|
longhao
|
14ms |
388 KiB |
|
147 Bytes |
2022-6-18 16:06:11 |
|
阮 (媚狐不吃道旁李)
|
14ms |
7.2 MiB |
C++98 |
146 Bytes |
2024-5-18 20:39:58 |
|
姚宏逸
|
14ms |
384 KiB |
|
148 Bytes |
2022-6-12 19:09:15 |
|
赵耘毅
|
14ms |
7.1 MiB |
|
161 Bytes |
2023-11-11 18:56:38 |
|
啊...这 (炼狱杏寿郎)
|
14ms |
384 KiB |
|
143 Bytes |
2022-7-2 11:27:35 |
|
1396013295
|
14ms |
436 KiB |
|
206 Bytes |
2022-8-11 21:33:38 |
|
时代一校-赵彦博 (zyb)
|
14ms |
7.2 MiB |
C++98 |
138 Bytes |
2024-4-24 20:39:58 |
|
关博源
|
14ms |
512 KiB |
|
156 Bytes |
2023-4-9 16:00:25 |
|
黄皓源
|
14ms |
7 MiB |
C++98 |
141 Bytes |
2024-5-25 13:56:51 |
|
吴恩子
|
14ms |
6.8 MiB |
|
133 Bytes |
2023-10-12 18:25:46 |
|
王晨志 (wangchenzhi)
|
14ms |
512 KiB |
|
103 Bytes |
2022-7-17 3:14:53 |
|
huangxinyun
|
14ms |
384 KiB |
|
130 Bytes |
2022-7-24 17:29:16 |
|
徐正旺 (xzw)
|
14ms |
7 MiB |
|
210 Bytes |
2023-7-15 15:56:02 |
|
陈骏逸 (chenjunyi)
|
14ms |
420 KiB |
|
154 Bytes |
2022-10-16 11:31:10 |
|
Guest
|
14ms |
7 MiB |
C++98(O2) |
140 Bytes |
2024-8-24 15:13:02 |
|
小忙果 (王昱杰)
|
14ms |
7.5 MiB |
|
144 Bytes |
2023-7-18 9:35:20 |
|
徐子恩 (Cow)
|
14ms |
444 KiB |
|
181 Bytes |
2022-7-7 20:05:19 |
|
(张洛诚)
|
15ms |
432 KiB |
|
160 Bytes |
2023-4-22 21:32:45 |
|
贾鑫豪 (Mr Sam)
|
15ms |
412 KiB |
|
141 Bytes |
2022-10-15 14:19:17 |
|
吴俊成 (wujuncheng)
|
15ms |
436 KiB |
|
134 Bytes |
2022-7-11 20:15:43 |
|
樊竣熠 (lft1114)
|
15ms |
432 KiB |
|
138 Bytes |
2022-8-5 16:32:22 |
|
11111
|
15ms |
440 KiB |
|
150 Bytes |
2022-6-26 13:17:45 |
|
李哲 (lizhe)
|
15ms |
512 KiB |
|
128 Bytes |
2022-8-17 16:12:48 |
|
纪承熙 (jcx001)
|
15ms |
6.9 MiB |
|
152 Bytes |
2023-7-17 10:13:24 |
|
huangxinyun
|
15ms |
432 KiB |
|
130 Bytes |
2022-7-24 17:29:03 |
|
11451254188 (22029-mjh)
|
15ms |
440 KiB |
|
152 Bytes |
2023-2-21 22:02:11 |
|
时代一校 - 冯隆浩 (冯隆浩)
|
15ms |
428 KiB |
|
193 Bytes |
2023-3-18 21:21:23 |
|
我推的乱破 (贺俊楠)
|
15ms |
440 KiB |
|
142 Bytes |
2023-4-16 9:23:25 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
15ms |
7.1 MiB |
|
131 Bytes |
2023-11-11 18:35:41 |
|
疯神芭芭脱丝 (李卓修)
|
15ms |
436 KiB |
|
150 Bytes |
2022-7-12 14:44:27 |
|
colin1112 (墙凌可)
|
16ms |
440 KiB |
|
398 Bytes |
2023-3-20 21:08:03 |
|
易锦程 (sky)
|
16ms |
7.2 MiB |
|
156 Bytes |
2024-1-19 10:24:45 |
|
李晨希
|
16ms |
7 MiB |
|
150 Bytes |
2023-7-19 11:41:19 |
|
LukeDid
|
16ms |
492 KiB |
|
174 Bytes |
2023-4-21 22:24:21 |
|
黄梓轩 (huangzixuan)
|
16ms |
440 KiB |
|
195 Bytes |
2023-3-29 19:00:29 |
|
周米骐 (zsb)
|
16ms |
7 MiB |
|
136 Bytes |
2023-7-15 13:58:29 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
16ms |
392 KiB |
|
145 Bytes |
2022-12-14 8:55:02 |
|
罗翌珂 (dangdang)
|
16ms |
436 KiB |
|
151 Bytes |
2022-8-28 10:50:13 |
|
马渝杭 (mayuhang)
|
16ms |
392 KiB |
|
188 Bytes |
2023-3-31 19:13: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)
|
16ms |
7.9 MiB |
|
155 Bytes |
2023-7-15 14:26:57 |
|
手搓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)
|
16ms |
6.8 MiB |
|
163 Bytes |
2023-6-11 10:01:19 |
|
新壹街陈科言 (cky)
|
17ms |
7 MiB |
|
141 Bytes |
2023-7-19 18:59:24 |
|
胡宸华 (huchenhua)
|
17ms |
6.9 MiB |
|
149 Bytes |
2023-7-29 23:04:20 |
|
罗伟杰 (13308275065)
|
17ms |
436 KiB |
|
151 Bytes |
2022-11-30 22:31:31 |
|
任童(rentong)
|
18ms |
512 KiB |
|
148 Bytes |
2022-9-3 13:11:16 |
|
鲜榨大肠汁
|
18ms |
6.7 MiB |
|
134 Bytes |
2023-8-10 15:34:20 |
|
杜俊宏
|
19ms |
444 KiB |
|
133 Bytes |
2023-1-23 18:06:26 |
|
xuniaoyin (徐袅音)
|
22ms |
7 MiB |
|
207 Bytes |
2023-7-19 15:49:57 |
|
ysf.wlanwq.ZJSWL 1922~1991 (韦舒豪)
|
26ms |
7.2 MiB |
|
140 Bytes |
2023-12-30 10:49:16 |
|
伍行念 (wuxingnian)
|
27ms |
6.9 MiB |
|
143 Bytes |
2023-11-29 13:33:44 |
|
孙烽轶 (sfy)
|
30ms |
440 KiB |
|
142 Bytes |
2022-12-25 11:03:40 |
|
陈诺
|
69ms |
764 KiB |
|
133 Bytes |
2024-2-5 15:59:20 |
|
小刘同学
|
72ms |
768 KiB |
C++11(O2) |
176 Bytes |
2024-10-2 16:17:38 |
|
马化腾 * 4 (zhanlan)
|
73ms |
536 KiB |
C++11 |
124 Bytes |
2024-9-24 18:55:28 |
|
小白白
|
191ms |
9.2 MiB |
Python 3 |
72 Bytes |
2023-6-23 20:08:43 |
|
坏蛋宝宝 (王俊峰)
|
204ms |
4.1 MiB |
Python 3 |
62 Bytes |
2023-4-8 20:09:46 |
|
黄琛轩
|
204ms |
4.1 MiB |
Python 3 |
65 Bytes |
2022-6-21 20:56:40 |
|
代老师01号
|
205ms |
9.2 MiB |
Python 3 |
72 Bytes |
2023-6-23 20:07:17 |
|
胡宸瑞
|
207ms |
4 MiB |
Python 3 |
70 Bytes |
2023-6-2 20:24:26 |
|
majinhui
|
208ms |
4.1 MiB |
Python 3 |
102 Bytes |
2022-6-15 21:06:51 |
|
一个小白
|
211ms |
4.1 MiB |
Python 3 |
70 Bytes |
2023-6-2 20:24:43 |
|
黄彦熹 (AK-203)
|
211ms |
4.1 MiB |
Python 3 |
67 Bytes |
2022-6-15 21:40:12 |
|
大萌新
|
211ms |
4.1 MiB |
Python 3 |
70 Bytes |
2023-6-2 20:30:04 |
|
大萌新
|
212ms |
4.1 MiB |
Python 3 |
70 Bytes |
2023-6-2 20:41:12 |
|
scallway1
|
212ms |
4 MiB |
Python 3 |
62 Bytes |
2023-4-8 20:09:45 |
|
大萌新
|
213ms |
4.1 MiB |
Python 3 |
70 Bytes |
2023-6-2 20:41:12 |
|
陈致远Lynn
|
214ms |
4.1 MiB |
Python 3 |
60 Bytes |
2023-4-8 20:09:37 |
|
大萌新
|
215ms |
4.1 MiB |
Python 3 |
70 Bytes |
2023-6-2 20:41:11 |