|
zyl
|
- |
7.1 MiB |
|
281 Bytes |
2024-1-7 10:50:59 |
|
姚宏逸
|
1ms |
384 KiB |
|
356 Bytes |
2022-5-29 10:23:17 |
|
wangruibo20xh
|
1ms |
316 KiB |
|
350 Bytes |
2022-2-11 19:14:32 |
|
肖添宇
|
2ms |
392 KiB |
|
335 Bytes |
2022-5-14 17:56:56 |
|
陈杰晟
|
2ms |
512 KiB |
|
340 Bytes |
2022-5-31 17:48:28 |
|
朱老师 (zyp)
|
2ms |
392 KiB |
|
330 Bytes |
2022-5-23 22:27:08 |
|
高致远 (GZY)
|
2ms |
384 KiB |
|
434 Bytes |
2022-3-26 10:17:36 |
|
xiongxinyao
|
2ms |
384 KiB |
|
378 Bytes |
2022-3-26 10:21:28 |
|
时代一校 - 冯隆浩 (冯隆浩)
|
2ms |
384 KiB |
|
291 Bytes |
2022-7-3 19:36:48 |
|
杜俊宏
|
2ms |
392 KiB |
|
296 Bytes |
2022-3-26 17:33:41 |
|
lch (凌昌瀚)
|
2ms |
392 KiB |
|
332 Bytes |
2022-7-5 18:41:05 |
|
ywh
|
2ms |
392 KiB |
|
319 Bytes |
2022-3-26 10:22:44 |
|
谢博文
|
2ms |
384 KiB |
|
317 Bytes |
2022-3-26 10:22:19 |
|
王晨志 (wangchenzhi)
|
2ms |
512 KiB |
|
336 Bytes |
2022-6-19 13:10:08 |
|
miku (阳沐珊)
|
2ms |
384 KiB |
|
327 Bytes |
2023-4-29 20:26:03 |
|
zhanghaoran
|
2ms |
392 KiB |
|
264 Bytes |
2022-3-26 10:21:55 |
|
原著校区 巫映秋 (巫映秋1a)
|
2ms |
7 MiB |
C++98 |
317 Bytes |
2024-6-28 22:52:40 |
|
zhangyh (张育菡)
|
2ms |
384 KiB |
|
323 Bytes |
2022-6-13 22:13:29 |
|
火爆肥肠(杨弘毅) (火爆肥肠)
|
2ms |
384 KiB |
|
316 Bytes |
2022-4-20 21:13:19 |
|
17779
|
2ms |
424 KiB |
|
254 Bytes |
2022-4-23 17:13:59 |
|
经常消失 (小萝卜)
|
2ms |
436 KiB |
|
274 Bytes |
2022-7-15 17:27:19 |
|
赵沛喆
|
2ms |
384 KiB |
|
314 Bytes |
2022-5-8 11:12: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)
|
2ms |
6.8 MiB |
|
340 Bytes |
2023-10-22 16:33:23 |
|
冒牌陈杰晟【MOD】 (wed)
|
2ms |
392 KiB |
|
208 Bytes |
2022-3-8 13:30:52 |
|
luoluonuoya
|
2ms |
384 KiB |
|
403 Bytes |
2022-3-20 15:07:39 |
|
郭人瑀作业号
|
3ms |
444 KiB |
|
312 Bytes |
2022-8-2 15:34:50 |
|
张祖名
|
3ms |
6.4 MiB |
C++98(O2) |
279 Bytes |
2024-7-5 22:21:33 |
|
汪致卉 (wangzh)
|
3ms |
436 KiB |
|
265 Bytes |
2022-1-23 20:15:54 |
|
1396013295
|
3ms |
436 KiB |
|
340 Bytes |
2022-1-23 17:41:26 |
|
我推的乱破 (贺俊楠)
|
3ms |
7.1 MiB |
C++98(O2) |
293 Bytes |
2024-5-6 20:59:36 |
|
文硕 (文硕1)
|
3ms |
440 KiB |
|
326 Bytes |
2022-7-12 11:56:37 |
|
时代一校 蒋帛希 (13983392730)
|
3ms |
384 KiB |
|
253 Bytes |
2023-3-30 19:48:14 |
|
黄彦熹 (AK-203)
|
3ms |
448 KiB |
|
324 Bytes |
2023-2-26 19:48:10 |
|
赵泳鑫 (zhaoyongxin)
|
3ms |
384 KiB |
|
326 Bytes |
2022-4-6 21:32:56 |
|
张泰凌 (ztl)
|
3ms |
384 KiB |
|
342 Bytes |
2022-3-26 10:19:36 |
|
xmw318046
|
3ms |
6.5 MiB |
C++98 |
283 Bytes |
2024-7-6 17:43:40 |
|
阮 (媚狐不吃道旁李)
|
3ms |
7.2 MiB |
C++98 |
332 Bytes |
2024-5-2 16:40:02 |
|
胡宸华 (huchenhua)
|
3ms |
6.9 MiB |
|
295 Bytes |
2023-8-20 21:04:26 |
|
11111
|
3ms |
384 KiB |
|
285 Bytes |
2022-5-8 9:33:15 |
|
啊...这 (炼狱杏寿郎)
|
3ms |
432 KiB |
|
291 Bytes |
2022-8-10 14:19:25 |
|
芒苒忧 (廖迦南)
|
3ms |
440 KiB |
|
315 Bytes |
2022-8-3 15:08:35 |
|
任童(rentong)
|
3ms |
432 KiB |
|
311 Bytes |
2022-7-2 15:07:59 |
|
王乐仪
|
3ms |
428 KiB |
|
295 Bytes |
2022-2-6 16:24:54 |
|
林凡童 (lft)
|
3ms |
432 KiB |
|
476 Bytes |
2022-9-15 19:20:34 |
|
huyinuo
|
3ms |
436 KiB |
|
394 Bytes |
2022-4-13 18:02:35 |
|
杨瀚霖 (yanghanlin)
|
3ms |
384 KiB |
|
345 Bytes |
2023-3-4 10:18:47 |
|
陈家齐 (陈家齐1)
|
3ms |
7 MiB |
|
270 Bytes |
2023-7-5 16:48:49 |
|
周琪渃
|
3ms |
384 KiB |
|
413 Bytes |
2022-12-17 19:03:05 |
|
郑岐蔚
|
3ms |
448 KiB |
|
316 Bytes |
2023-2-11 12:47:11 |
|
疯神芭芭脱丝 (李卓修)
|
3ms |
448 KiB |
|
287 Bytes |
2022-6-9 19:46:44 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
3ms |
436 KiB |
|
301 Bytes |
2023-1-7 13:02:44 |
|
ycy
|
3ms |
444 KiB |
|
294 Bytes |
2022-9-8 13:56:03 |
|
zlx (xiao)
|
3ms |
440 KiB |
|
349 Bytes |
2022-11-26 18:42:59 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
3ms |
384 KiB |
|
308 Bytes |
2022-9-8 20:04:32 |
|
lby_joey
|
3ms |
6.7 MiB |
C++98(O2) |
268 Bytes |
2024-7-23 15:44:33 |
|
wangzihang
|
3ms |
7 MiB |
C++98 |
507 Bytes |
2024-6-9 14:31:39 |
|
手搓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)
|
3ms |
432 KiB |
|
282 Bytes |
2023-5-27 12:00:40 |
|
张瑞博
|
3ms |
7 MiB |
C++11 |
240 Bytes |
2024-6-15 21:44:44 |
|
林小博
|
3ms |
384 KiB |
|
297 Bytes |
2023-2-1 17:06:39 |
|
时代校区-刘臣原 (微笑王子)
|
3ms |
432 KiB |
|
279 Bytes |
2022-9-10 15:00:46 |
|
龚信丞
|
3ms |
6.8 MiB |
|
354 Bytes |
2023-6-15 21:09:56 |
|
谭懿轩 (yanyixuan)
|
3ms |
436 KiB |
|
221 Bytes |
2022-8-24 15:08:12 |
|
SYC0226
|
3ms |
436 KiB |
|
264 Bytes |
2022-4-10 10:40:53 |
|
胡程禹
|
3ms |
7 MiB |
|
296 Bytes |
2023-7-7 9:49:09 |
|
Yuan (Zongzi1)
|
3ms |
6.6 MiB |
C++17(O2) |
344 Bytes |
2024-7-21 15:45:26 |
|
RanHao
|
3ms |
6.9 MiB |
|
235 Bytes |
2023-7-30 11:40:16 |
|
邵冠铖 (shaoguancheng22031)
|
3ms |
428 KiB |
|
267 Bytes |
2023-1-15 17:40:21 |
|
李禹衡 (liyuheng22006)
|
3ms |
444 KiB |
|
243 Bytes |
2023-3-20 19:23:45 |
|
拥抱幸福小熊(吴沛篪)
|
3ms |
7.3 MiB |
|
307 Bytes |
2024-1-20 15:46:30 |
|
李树崑 (lishukun)
|
3ms |
420 KiB |
|
341 Bytes |
2022-8-11 12:20:28 |
|
欧俊阳
|
3ms |
6.9 MiB |
|
251 Bytes |
2023-8-9 11:40:39 |
|
偽艺術家 (chenyanchi22006)
|
3ms |
440 KiB |
|
234 Bytes |
2022-8-24 10:36:16 |
|
Tender. (05c05-zhou)
|
3ms |
6.7 MiB |
|
295 Bytes |
2023-8-24 10:31:00 |
|
wangjun
|
4ms |
7.2 MiB |
|
292 Bytes |
2023-11-30 12:36:02 |
|
wanghuaiying
|
6ms |
7.1 MiB |
|
264 Bytes |
2024-1-18 20:29:01 |
|
田开蕊
|
8ms |
7.1 MiB |
|
247 Bytes |
2024-1-20 16:22:02 |
|
Guest
|
9ms |
7 MiB |
|
247 Bytes |
2024-1-20 16:21:32 |
|
heyuzhe
|
10ms |
532 KiB |
C++98 |
287 Bytes |
2024-9-8 18:28:45 |
|
jdy
|
12ms |
532 KiB |
|
281 Bytes |
2024-3-6 15:28:03 |
|
安闵煜 (anzai)
|
13ms |
532 KiB |
C++11 |
309 Bytes |
2024-9-1 18:36:00 |
|
My name is Man (钟卓劭)
|
14ms |
764 KiB |
|
233 Bytes |
2024-4-6 14:43:51 |
|
褚博艺
|
14ms |
532 KiB |
|
263 Bytes |
2024-3-30 16:19:27 |
|
yuchenyi23017
|
15ms |
532 KiB |
|
303 Bytes |
2024-1-28 15:32:05 |
|
赵奕铭
|
15ms |
532 KiB |
|
243 Bytes |
2024-3-2 0:16:25 |
|
stehpen_zuo
|
15ms |
532 KiB |
C++20 |
237 Bytes |
2024-9-18 15:54:25 |
|
叶令子
|
16ms |
764 KiB |
C++98 |
344 Bytes |
2024-10-22 20:16:01 |
|
kongql
|
34ms |
8.8 MiB |
Python 3 |
131 Bytes |
2023-7-23 14:33:07 |
|
杨坤霖 (steven)
|
35ms |
3.9 MiB |
Python 3 |
47 Bytes |
2022-6-18 21:23:29 |
|
樊竣熠 (lft1114)
|
35ms |
3.9 MiB |
Python 3 |
49 Bytes |
2022-2-27 17:59:46 |
|
赵鑫宸 (xiaoxiao721)
|
35ms |
3.9 MiB |
Python 3 |
35 Bytes |
2022-3-12 15:42:19 |
|
詹宇航 (zyh7)
|
36ms |
3.9 MiB |
Python 3 |
37 Bytes |
2022-1-14 20:29:33 |
|
戴玉彤
|
36ms |
3.9 MiB |
Python 3 |
30 Bytes |
2022-2-27 10:38:40 |
|
majinhui
|
42ms |
3.9 MiB |
Python 3 |
35 Bytes |
2022-7-12 11:07:53 |
|
爱琴海校区-刁钲洋 (刁钲洋)
|
44ms |
3.9 MiB |
Python 3 |
29 Bytes |
2022-2-15 20:45:12 |
|
陈年保宁醋 (dengboren)
|
44ms |
3.9 MiB |
Python 3 |
105 Bytes |
2022-2-19 10:56:22 |
|
苗润昊
|
45ms |
3.9 MiB |
Python 3 |
30 Bytes |
2022-1-25 17:18:47 |
|
梨冻亿 (wiueh)
|
45ms |
3.8 MiB |
Python 3 |
32 Bytes |
2022-1-23 18:47:29 |