|
樊竣熠 (lft1114)
|
14ms |
444 KiB |
|
322 Bytes |
2022-8-3 13:33:15 |
|
中岛敦 (黄麒瑞)
|
14ms |
6.8 MiB |
|
422 Bytes |
2023-10-3 11:32:48 |
|
爱琴海校区-刁钲洋 (刁钲洋)
|
14ms |
444 KiB |
|
417 Bytes |
2023-2-15 17:48:49 |
|
error_sans
|
14ms |
388 KiB |
|
363 Bytes |
2022-2-12 18:38:03 |
|
炸鱼4000+ (dxc)
|
14ms |
6.7 MiB |
|
366 Bytes |
2023-9-21 16:59:41 |
|
胡宸华 (huchenhua)
|
14ms |
6.9 MiB |
|
370 Bytes |
2023-7-18 10:10:31 |
|
王涵熙 (水煮大肠)
|
14ms |
512 KiB |
|
363 Bytes |
2022-3-5 16:42:44 |
|
Tang
|
15ms |
432 KiB |
|
375 Bytes |
2022-4-23 15:23:05 |
|
wangruibo20xh
|
15ms |
6.8 MiB |
|
241 Bytes |
2023-11-7 16:20:56 |
|
郑之策
|
15ms |
428 KiB |
|
435 Bytes |
2022-2-14 10:39:48 |
|
小忙果 (王昱杰)
|
15ms |
7 MiB |
|
320 Bytes |
2023-7-18 9:04:12 |
|
我推的乱破 (贺俊楠)
|
15ms |
384 KiB |
|
422 Bytes |
2023-4-14 20:38:00 |
|
爱琴海校区-胡靖欢 (胡靖欢1)
|
15ms |
384 KiB |
|
349 Bytes |
2023-4-1 11:38:44 |
|
李晨希
|
15ms |
384 KiB |
|
298 Bytes |
2023-4-1 11:43:28 |
|
Tender. (05c05-zhou)
|
15ms |
420 KiB |
|
385 Bytes |
2022-10-19 21:55:51 |
|
江科毅 (jky)
|
15ms |
448 KiB |
|
299 Bytes |
2023-3-30 20:10:39 |
|
LUKHE (LukeHu)
|
15ms |
440 KiB |
|
472 Bytes |
2022-2-20 13:41:57 |
|
胡宸华 (huchenhua)
|
15ms |
6.9 MiB |
|
389 Bytes |
2023-7-18 10:09:13 |
|
何欣洋
|
15ms |
392 KiB |
|
317 Bytes |
2023-4-1 11:35:49 |
|
朱老师 (zyp)
|
15ms |
412 KiB |
|
353 Bytes |
2023-1-1 9:16:56 |
|
zzy
|
15ms |
512 KiB |
|
363 Bytes |
2023-4-13 20:31:52 |
|
新壹街.曾祥睿 (zxr)
|
15ms |
6.8 MiB |
|
335 Bytes |
2023-10-21 13:09:09 |
|
wzzjnb2012
|
15ms |
512 KiB |
|
481 Bytes |
2022-10-6 12:25:20 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
15ms |
7 MiB |
|
367 Bytes |
2023-12-19 19:28:28 |
|
爱琴海校区jzn (jzn)
|
15ms |
384 KiB |
|
347 Bytes |
2023-4-1 11:51:14 |
|
新壹街校区-杨轩懿 (杨轩懿1)
|
15ms |
6.9 MiB |
|
280 Bytes |
2023-7-25 11:38:22 |
|
SHY20091224
|
15ms |
512 KiB |
|
300 Bytes |
2022-8-28 12:17:51 |
|
CK (李弘毅)
|
15ms |
440 KiB |
|
363 Bytes |
2022-11-8 19:16:28 |
|
陈于硕(我™的) (chenyu)
|
15ms |
420 KiB |
|
392 Bytes |
2023-4-1 11:43:16 |
|
邹曜丞 (13983097018)
|
15ms |
6.9 MiB |
|
279 Bytes |
2023-7-16 14:20:46 |
|
繁星 (05c35-zzm)
|
15ms |
420 KiB |
|
422 Bytes |
2022-12-4 10:03:51 |
|
代老师01号
|
15ms |
6.9 MiB |
|
287 Bytes |
2023-7-23 18:06:44 |
|
朱老师 (zyp)
|
15ms |
432 KiB |
|
319 Bytes |
2022-8-16 18:08:15 |
|
新壹街校区-陈琬舒 (空空大师)
|
15ms |
6.7 MiB |
|
312 Bytes |
2023-9-10 16:13:13 |
|
黄梓轩 (huangzixuan)
|
15ms |
384 KiB |
|
372 Bytes |
2022-11-28 17:40:13 |
|
yuandingyang22031
|
15ms |
512 KiB |
|
314 Bytes |
2023-1-2 12:21:51 |
|
wangzihang
|
15ms |
7 MiB |
C++98 |
782 Bytes |
2024-5-29 22:06:55 |
|
周琪渃
|
15ms |
384 KiB |
|
485 Bytes |
2022-12-10 22:41:21 |
|
许嘉恩 (xje22031)
|
15ms |
476 KiB |
|
299 Bytes |
2023-1-1 9:16:38 |
|
时代二校-焦雨齐 (Angel)
|
15ms |
7.1 MiB |
|
333 Bytes |
2023-7-16 16:11:47 |
|
爱情海校区—沙天一 (沙天一)
|
15ms |
392 KiB |
|
317 Bytes |
2023-4-1 11:33:18 |
|
林凡童 (lft)
|
15ms |
432 KiB |
|
530 Bytes |
2022-9-15 20:06:14 |
|
关博源
|
15ms |
512 KiB |
|
294 Bytes |
2023-3-7 18:47:03 |
|
zlx (xiao)
|
15ms |
440 KiB |
|
345 Bytes |
2022-11-26 18:40:22 |
|
李卓燃 (李卓燃1)
|
15ms |
440 KiB |
|
337 Bytes |
2023-2-24 20:55:26 |
|
新壹街——陈学彬 (BUG)
|
15ms |
6.9 MiB |
|
292 Bytes |
2023-7-8 19:45:17 |
|
谭懿轩 (yanyixuan)
|
16ms |
432 KiB |
|
253 Bytes |
2022-8-23 18:58:43 |
|
11451254188 (22029-mjh)
|
16ms |
512 KiB |
|
447 Bytes |
2022-12-21 13:47:48 |
|
RanHao
|
16ms |
6.9 MiB |
|
430 Bytes |
2023-7-26 13:19:21 |
|
^_^ (ctc)
|
16ms |
512 KiB |
|
324 Bytes |
2022-12-28 19:45:03 |
|
陈雨泽1
|
16ms |
424 KiB |
|
439 Bytes |
2023-2-18 11:36:12 |
|
极为的好van的 (lyq)
|
16ms |
444 KiB |
|
277 Bytes |
2023-1-11 20:57:03 |
|
陈家齐 (陈家齐1)
|
16ms |
7.3 MiB |
|
254 Bytes |
2023-7-6 14:13:15 |
|
刘锦航
|
16ms |
512 KiB |
|
337 Bytes |
2023-3-18 18:27:21 |
|
杜是贤 (dushixian)
|
16ms |
424 KiB |
|
246 Bytes |
2023-5-28 10:52:02 |
|
zcx
|
16ms |
384 KiB |
|
422 Bytes |
2022-12-21 19:43:02 |
|
没有此人 (akm)
|
16ms |
7.2 MiB |
|
361 Bytes |
2023-7-6 16:27:25 |
|
胡程禹
|
16ms |
6.9 MiB |
|
385 Bytes |
2023-7-7 9:39:41 |
|
缥 (王硕2012)
|
16ms |
512 KiB |
|
432 Bytes |
2022-12-22 18:31:14 |
|
zhangxiushi
|
16ms |
436 KiB |
|
291 Bytes |
2023-3-18 18:59:56 |
|
邵冠铖 (shaoguancheng22031)
|
16ms |
512 KiB |
|
253 Bytes |
2023-1-1 9:23:30 |
|
张子轩 (zhangzixuana)
|
16ms |
512 KiB |
|
274 Bytes |
2023-5-3 13:59:06 |
|
陈风亦 (chenfengyi)
|
16ms |
436 KiB |
|
328 Bytes |
2023-1-18 16:52:26 |
|
胡澜之 (666hlz666)
|
16ms |
7 MiB |
|
415 Bytes |
2024-1-11 19:23:21 |
|
缥 (王硕2012)
|
16ms |
436 KiB |
|
402 Bytes |
2023-1-1 9:36:23 |
|
杨坤霖 (steven)
|
16ms |
384 KiB |
|
519 Bytes |
2023-1-15 15:43:03 |
|
郑岐蔚
|
16ms |
512 KiB |
|
305 Bytes |
2023-1-26 14:49:57 |
|
laiyouming22031
|
16ms |
512 KiB |
|
306 Bytes |
2022-12-25 10:54:19 |
|
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)
|
17ms |
7.2 MiB |
|
401 Bytes |
2023-12-17 16:05:45 |
|
葛琮扬
|
17ms |
6.9 MiB |
|
370 Bytes |
2023-8-2 15:48:39 |
|
ttt123
|
17ms |
432 KiB |
|
421 Bytes |
2022-12-17 22:11:27 |
|
时代一校-赵彦博 (zyb)
|
17ms |
6.9 MiB |
|
282 Bytes |
2023-8-7 13:46:00 |
|
22029-lsl
|
17ms |
436 KiB |
|
452 Bytes |
2023-1-6 20:45:02 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
17ms |
512 KiB |
|
299 Bytes |
2022-12-18 14:37:41 |
|
杨颂恩 (yangsongen)
|
17ms |
6.9 MiB |
|
311 Bytes |
2023-8-19 19:22:32 |
|
没有此人 (akm)
|
17ms |
7.1 MiB |
|
361 Bytes |
2023-7-7 16:21:40 |
|
dream
|
17ms |
7.3 MiB |
|
381 Bytes |
2023-7-9 10:06:00 |
|
chaikexu
|
18ms |
512 KiB |
|
271 Bytes |
2022-10-28 21:01:39 |
|
22029-lyh
|
18ms |
440 KiB |
|
434 Bytes |
2022-12-22 16:27:58 |
|
zyl
|
18ms |
7 MiB |
|
608 Bytes |
2024-1-6 14:43:33 |
|
手搓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)
|
18ms |
512 KiB |
|
426 Bytes |
2022-12-18 17:49:54 |
|
杨坤霖 (steven)
|
18ms |
428 KiB |
|
519 Bytes |
2023-1-15 15:43:02 |
|
欧俊阳
|
18ms |
6.9 MiB |
|
264 Bytes |
2023-8-9 11:01:29 |
|
何星震 (Jacob)
|
18ms |
436 KiB |
|
296 Bytes |
2022-8-29 10:30:35 |
|
10255
|
18ms |
512 KiB |
|
261 Bytes |
2023-1-11 20:52:21 |
|
黄立信
|
18ms |
7.2 MiB |
|
457 Bytes |
2024-1-14 21:59:15 |
|
重庆龙湖源著校区+杨聆暄 (杨聆暄)
|
18ms |
512 KiB |
|
436 Bytes |
2023-1-18 15:04:33 |
|
新壹街陈科言 (cky)
|
19ms |
7 MiB |
|
348 Bytes |
2023-7-19 16:20:21 |
|
李彦臻
|
24ms |
7 MiB |
|
451 Bytes |
2023-12-3 20:59:11 |
|
新壹街 朱启航 (zhuqihang)
|
26ms |
7.1 MiB |
|
373 Bytes |
2024-1-23 8:38:59 |
|
新壹街—熊轩杭 (xiongxuanhang)
|
27ms |
7 MiB |
|
274 Bytes |
2023-12-23 16:39:29 |
|
yuchenyi23017
|
58ms |
536 KiB |
|
266 Bytes |
2024-1-28 15:31:11 |
|
赵奕铭
|
64ms |
532 KiB |
|
276 Bytes |
2024-3-10 19:28:11 |
|
阮 (媚狐不吃道旁李)
|
66ms |
764 KiB |
|
342 Bytes |
2024-4-13 10:30:20 |
|
( ) (李恺伦)
|
69ms |
540 KiB |
|
352 Bytes |
2024-3-24 13:38:15 |
|
新壹街校区-冉睦阳 (冉睦阳)
|
69ms |
544 KiB |
C++98 |
289 Bytes |
2024-9-28 14:55:15 |
|
jdy
|
69ms |
536 KiB |
|
339 Bytes |
2024-3-12 19:43:14 |
|
安闵煜 (anzai)
|
70ms |
764 KiB |
C++11 |
351 Bytes |
2024-8-31 10:09:56 |
|
LittleHair
|
70ms |
764 KiB |
C++11 |
260 Bytes |
2024-11-23 11:01:04 |
|
My name is Man (钟卓劭)
|
70ms |
532 KiB |
|
237 Bytes |
2024-4-4 13:32:06 |