|
胡宸华 (huchenhua)
|
13ms |
384 KiB |
|
167 Bytes |
2022-12-1 23:21:22 |
|
綰綰(HHYT)
|
24ms |
7.1 MiB |
C++11 |
165 Bytes |
2024-4-18 20:28:39 |
|
赵沛喆
|
24ms |
384 KiB |
|
230 Bytes |
2022-5-26 21:30:20 |
|
Yuan (Zongzi1)
|
24ms |
6.7 MiB |
C++20 |
275 Bytes |
2024-7-18 17:01:11 |
|
颐和园呵呵一盒一盒一盒你呢他已经儿童节 (高晨曦)
|
25ms |
6.9 MiB |
C++98 |
203 Bytes |
2024-7-2 15:14:36 |
|
UsMt1 (jiangyuan)
|
25ms |
6.6 MiB |
C++98 |
149 Bytes |
2024-7-29 14:18:47 |
|
任童(rentong)
|
26ms |
384 KiB |
|
229 Bytes |
2022-6-4 14:24:35 |
|
张祖名
|
26ms |
6.9 MiB |
C++98(O2) |
248 Bytes |
2024-6-10 22:03:27 |
|
黄梓桐 (HuangZiTong)
|
26ms |
384 KiB |
|
204 Bytes |
2022-6-18 20:24:51 |
|
郑尧 (zhengyao)
|
26ms |
6.7 MiB |
C++98 |
237 Bytes |
2024-8-2 20:32:55 |
|
1396013295
|
26ms |
384 KiB |
|
200 Bytes |
2022-1-22 19:03:31 |
|
zcx
|
26ms |
512 KiB |
|
193 Bytes |
2023-2-7 20:28:41 |
|
贾博涵
|
26ms |
6.6 MiB |
|
182 Bytes |
2023-11-22 10:49:51 |
|
赵泳鑫 (zhaoyongxin)
|
26ms |
404 KiB |
|
238 Bytes |
2022-7-14 11:30:03 |
|
汪致卉 (wangzh)
|
26ms |
396 KiB |
|
269 Bytes |
2022-1-28 23:59:23 |
|
阮 (媚狐不吃道旁李)
|
26ms |
7 MiB |
C++98 |
173 Bytes |
2024-5-25 16:36:49 |
|
MoonLight ( aaa)
|
26ms |
384 KiB |
|
294 Bytes |
2022-1-26 20:32:59 |
|
蒋晟睿
|
26ms |
6.7 MiB |
C++98 |
194 Bytes |
2024-7-2 15:09:56 |
|
刘锦航
|
26ms |
512 KiB |
|
204 Bytes |
2022-5-17 19:07:45 |
|
谢博文
|
26ms |
384 KiB |
|
236 Bytes |
2022-2-26 9:39:13 |
|
yuhaodi
|
26ms |
384 KiB |
|
304 Bytes |
2023-5-17 12:54:13 |
|
曾御城(现用名) (Jason)
|
27ms |
384 KiB |
|
294 Bytes |
2022-3-20 17:54:31 |
|
kongql
|
27ms |
7.2 MiB |
C++11 |
249 Bytes |
2024-5-16 15:27:48 |
|
姚宏逸
|
27ms |
392 KiB |
|
211 Bytes |
2022-1-25 22:46:33 |
|
杜俊宏
|
27ms |
444 KiB |
|
640 Bytes |
2022-5-22 13:05:21 |
|
叶哲宇 (yzy)
|
27ms |
7.2 MiB |
C++11 |
237 Bytes |
2024-5-5 10:34:59 |
|
Erin
|
27ms |
7 MiB |
C++98 |
221 Bytes |
2024-5-11 17:46:34 |
|
kcs007
|
27ms |
384 KiB |
|
234 Bytes |
2023-4-8 15:21:25 |
|
付博plus
|
27ms |
384 KiB |
|
224 Bytes |
2023-4-8 15:22:37 |
|
李树崑 (lishukun)
|
27ms |
512 KiB |
|
196 Bytes |
2022-4-18 20:27:44 |
|
heyuzhe
|
27ms |
6.9 MiB |
C++98 |
187 Bytes |
2024-8-16 8:51:23 |
|
希蒙 (zhengxingya)
|
27ms |
7 MiB |
|
301 Bytes |
2023-12-20 17:18:11 |
|
罗兰(漆黑襟默) (zhangxiaoci)
|
27ms |
384 KiB |
|
244 Bytes |
2023-4-8 15:22:47 |
|
hnd (陈皓洋)
|
27ms |
512 KiB |
|
189 Bytes |
2023-4-8 15:08:23 |
|
罗竣瀚
|
27ms |
384 KiB |
|
208 Bytes |
2023-4-8 15:23:24 |
|
dmh (丁墨涵)
|
27ms |
512 KiB |
|
226 Bytes |
2022-2-14 21:28:10 |
|
444444444 (唐跃元)
|
27ms |
384 KiB |
|
211 Bytes |
2023-4-8 14:55:18 |
|
胡瀚文
|
27ms |
384 KiB |
|
204 Bytes |
2022-7-18 11:39:57 |
|
zhanghaoran
|
27ms |
512 KiB |
|
236 Bytes |
2022-3-12 10:23:48 |
|
maomao
|
27ms |
384 KiB |
|
226 Bytes |
2022-6-1 18:44:29 |
|
疯神芭芭脱丝 (李卓修)
|
27ms |
512 KiB |
|
199 Bytes |
2022-7-13 19:17:34 |
|
童艺涵
|
28ms |
512 KiB |
|
209 Bytes |
2023-4-8 15:22:38 |
|
金沙校区-蓝祥与 (蓝祥与)
|
28ms |
392 KiB |
|
226 Bytes |
2023-4-8 15:24:31 |
|
陈杰晟
|
28ms |
512 KiB |
|
200 Bytes |
2022-3-24 15:14:17 |
|
谭懿轩 (yanyixuan)
|
28ms |
512 KiB |
|
249 Bytes |
2022-2-26 15:38:01 |
|
无尽的想象 (谭仕高)
|
28ms |
512 KiB |
|
161 Bytes |
2022-7-29 17:54:00 |
|
heyi
|
28ms |
6.8 MiB |
C++98(O2) |
233 Bytes |
2024-8-10 18:48:53 |
|
程子杰 (05c41-czj)
|
28ms |
512 KiB |
|
187 Bytes |
2022-7-27 10:49:48 |
|
周靖松 (ZhouJS)
|
28ms |
384 KiB |
|
251 Bytes |
2023-4-8 15:04:36 |
|
赵鑫宸 (xiaoxiao721)
|
28ms |
512 KiB |
|
194 Bytes |
2022-2-18 18:39:55 |
|
05c35-hzh
|
28ms |
436 KiB |
|
217 Bytes |
2022-2-13 12:36:04 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
28ms |
392 KiB |
|
218 Bytes |
2022-11-21 16:43:23 |
|
17779
|
28ms |
448 KiB |
|
216 Bytes |
2022-3-17 16:09:30 |
|
wangzihang
|
28ms |
512 KiB |
C++ |
269 Bytes |
2022-8-5 14:39:26 |
|
张瑞博
|
28ms |
7.2 MiB |
C++11 |
731 Bytes |
2024-4-20 23:30:00 |
|
吴俊成 (wujuncheng)
|
28ms |
444 KiB |
|
216 Bytes |
2022-7-11 10:28:15 |
|
文硕 (文硕1)
|
28ms |
420 KiB |
|
217 Bytes |
2023-2-1 8:45:20 |
|
luoluonuoya
|
28ms |
512 KiB |
|
607 Bytes |
2022-8-13 15:17:36 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
28ms |
512 KiB |
|
249 Bytes |
2023-4-26 21:33:24 |
|
zhangzixuanaa
|
29ms |
512 KiB |
|
234 Bytes |
2023-4-8 14:16:50 |
|
曹埊睿 (caodirui)
|
29ms |
512 KiB |
|
217 Bytes |
2023-4-15 23:22:10 |
|
陈雨泽1
|
29ms |
512 KiB |
|
242 Bytes |
2023-2-18 11:27:33 |
|
Tang
|
29ms |
512 KiB |
|
236 Bytes |
2022-2-26 9:37:25 |
|
yanglang
|
29ms |
436 KiB |
|
191 Bytes |
2023-2-12 8:28:17 |
|
黄立信
|
29ms |
6.8 MiB |
|
266 Bytes |
2023-10-17 20:28:48 |
|
偽艺術家 (chenyanchi22006)
|
29ms |
512 KiB |
|
257 Bytes |
2023-3-5 16:34:27 |
|
Tender. (05c05-zhou)
|
29ms |
512 KiB |
|
231 Bytes |
2023-2-17 20:10:31 |
|
huyinuo
|
29ms |
512 KiB |
|
260 Bytes |
2022-3-3 20:57:15 |
|
王乐仪
|
29ms |
512 KiB |
|
163 Bytes |
2022-2-19 17:24:20 |
|
SYC0226
|
29ms |
432 KiB |
|
221 Bytes |
2022-3-20 13:22:15 |
|
李某人
|
29ms |
444 KiB |
|
236 Bytes |
2022-2-11 15:13:06 |
|
zzl
|
29ms |
6.8 MiB |
|
332 Bytes |
2023-11-7 1:10:58 |
|
Aphrode
|
29ms |
6.7 MiB |
|
299 Bytes |
2023-8-26 20:06:14 |
|
伍行念 (wuxingnian)
|
30ms |
6.8 MiB |
|
247 Bytes |
2023-10-8 10:23:49 |
|
周琪渃
|
30ms |
384 KiB |
|
312 Bytes |
2023-1-3 22:11:54 |
|
时代2校-程俊燃 (chengjunran)
|
30ms |
6.7 MiB |
|
206 Bytes |
2023-8-25 9:07:39 |
|
纪承熙 (jcx001)
|
30ms |
7.2 MiB |
|
237 Bytes |
2023-7-11 11:40:07 |
|
朱老师 (zyp)
|
31ms |
512 KiB |
|
222 Bytes |
2022-8-7 10:36:20 |
|
chen (peter)
|
31ms |
436 KiB |
|
333 Bytes |
2023-4-22 11:20:56 |
|
曹元明
|
31ms |
436 KiB |
|
260 Bytes |
2022-8-17 11:48:55 |
|
RanHao
|
31ms |
6.9 MiB |
|
206 Bytes |
2023-7-22 18:47:29 |
|
huanglu
|
31ms |
6.9 MiB |
|
174 Bytes |
2023-7-18 14:09:28 |
|
新壹街校区--税崇峻 (税崇峻)
|
32ms |
6.9 MiB |
|
203 Bytes |
2023-8-17 16:12:05 |
|
Jack
|
32ms |
7.5 MiB |
|
175 Bytes |
2023-7-12 16:16:24 |
|
蒲梓勋 (puzixun)
|
32ms |
6.9 MiB |
|
289 Bytes |
2023-6-9 19:47:39 |
|
colin1112 (墙凌可)
|
32ms |
436 KiB |
|
220 Bytes |
2023-3-18 15:02:37 |
|
wangyueru
|
32ms |
6.8 MiB |
|
178 Bytes |
2023-6-9 20:02:51 |
|
时代二校-陈天成 (鸭缩毛巾)
|
32ms |
6.9 MiB |
|
597 Bytes |
2023-7-31 22:54:19 |
|
Nico
|
33ms |
6.8 MiB |
|
200 Bytes |
2023-6-22 11:18:55 |
|
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)
|
33ms |
6.9 MiB |
|
286 Bytes |
2023-8-12 15:52:50 |
|
时代一校-赵彦博 (zyb)
|
33ms |
6.9 MiB |
|
201 Bytes |
2023-8-5 20:34:10 |
|
新壹街陈科言 (cky)
|
34ms |
7.3 MiB |
|
354 Bytes |
2023-7-20 14:40:07 |
|
ganlin1
|
34ms |
6.9 MiB |
|
159 Bytes |
2023-7-27 12:33:21 |
|
炸鱼4000+ (dxc)
|
34ms |
7.1 MiB |
|
228 Bytes |
2023-11-14 21:51:00 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
36ms |
7.1 MiB |
|
205 Bytes |
2023-12-3 15:24: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 |
432 KiB |
|
213 Bytes |
2023-5-27 11:32:11 |
|
wangruibo20xh
|
40ms |
7.1 MiB |
|
187 Bytes |
2023-12-18 19:18:35 |
|
zyl
|
43ms |
7.3 MiB |
|
302 Bytes |
2024-1-4 10:56:02 |
|
杨馨涵
|
44ms |
7 MiB |
|
173 Bytes |
2023-12-20 19:58:14 |
|
没有此人 (akm)
|
53ms |
7 MiB |
|
169 Bytes |
2023-12-16 14:49:39 |