|
张梓浩 (zhangzihao)
|
6ms |
7.2 MiB |
|
277 Bytes |
2023-12-16 9:33:31 |
|
zhangyouze (张佑泽)
|
7ms |
7 MiB |
|
259 Bytes |
2023-12-16 18:36:14 |
|
MoonLight ( aaa)
|
8ms |
256 KiB |
|
253 Bytes |
2022-1-25 12:13:53 |
|
曹埊睿 (caodirui)
|
9ms |
312 KiB |
|
253 Bytes |
2023-4-22 13:17:34 |
|
陌生人 (涂玉龙)
|
14ms |
7 MiB |
|
298 Bytes |
2024-1-14 15:28:27 |
|
Jose (反恐皮蛋)
|
14ms |
6.8 MiB |
C++98 |
409 Bytes |
2024-7-3 11:34:35 |
|
17779
|
14ms |
396 KiB |
|
259 Bytes |
2022-4-4 15:03:16 |
|
xmw318046
|
15ms |
6.4 MiB |
C++98 |
323 Bytes |
2024-7-5 15:32:58 |
|
stehpen_zuo
|
15ms |
6.4 MiB |
C++20 |
392 Bytes |
2024-7-6 7:29:50 |
|
wangjun
|
15ms |
6.9 MiB |
|
272 Bytes |
2023-11-26 15:39:58 |
|
Yuan (Zongzi1)
|
15ms |
6.6 MiB |
C++17(O2) |
305 Bytes |
2024-7-20 19:13:51 |
|
ShenChuan
|
15ms |
468 KiB |
|
280 Bytes |
2023-5-20 16:53:35 |
|
杜是贤 (dushixian)
|
15ms |
384 KiB |
|
259 Bytes |
2022-3-27 10:45:38 |
|
芒苒忧 (廖迦南)
|
15ms |
384 KiB |
|
280 Bytes |
2022-8-3 15:03:33 |
|
李哲 (lizhe)
|
15ms |
392 KiB |
|
307 Bytes |
2022-9-7 21:27:41 |
|
李树崑 (lishukun)
|
15ms |
512 KiB |
|
438 Bytes |
2022-8-16 12:04:49 |
|
ycy
|
15ms |
384 KiB |
|
317 Bytes |
2022-6-18 16:15:10 |
|
谢延灏 (xeiyanhao---a handsome boy)
|
15ms |
440 KiB |
|
239 Bytes |
2022-8-1 14:57:10 |
|
肖添宇
|
15ms |
384 KiB |
|
252 Bytes |
2022-4-16 20:21:07 |
|
陈杰晟
|
15ms |
392 KiB |
|
255 Bytes |
2022-5-20 19:58:11 |
|
王晨志 (wangchenzhi)
|
16ms |
384 KiB |
|
310 Bytes |
2022-6-19 12:54:46 |
|
宋金龙 (songjl0421)
|
16ms |
384 KiB |
|
295 Bytes |
2022-3-5 13:57:24 |
|
李山水
|
16ms |
384 KiB |
|
352 Bytes |
2022-2-20 9:31:24 |
|
张祖名
|
16ms |
6.8 MiB |
C++98(O2) |
419 Bytes |
2024-7-1 10:44:17 |
|
1396013295
|
16ms |
384 KiB |
|
307 Bytes |
2022-1-23 17:21:09 |
|
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 MiB |
|
723 Bytes |
2023-12-17 16:55:10 |
|
laoyang
|
16ms |
384 KiB |
|
292 Bytes |
2022-5-19 20:19:24 |
|
Erin
|
16ms |
7 MiB |
C++98 |
253 Bytes |
2024-6-12 16:32:07 |
|
我推的乱破 (贺俊楠)
|
16ms |
384 KiB |
|
352 Bytes |
2023-4-12 20:47:57 |
|
姚宏逸
|
16ms |
384 KiB |
|
370 Bytes |
2022-1-30 20:27:35 |
|
韩正墨 (xmw05)
|
16ms |
512 KiB |
|
352 Bytes |
2022-7-13 9:26:21 |
|
赵鑫宸 (xiaoxiao721)
|
16ms |
512 KiB |
|
401 Bytes |
2022-3-5 16:13:49 |
|
马渝杭 (mayuhang)
|
16ms |
444 KiB |
|
226 Bytes |
2022-9-12 20:01:14 |
|
朱泽晟
|
16ms |
392 KiB |
|
303 Bytes |
2022-1-26 11:41:23 |
|
zhangyh (张育菡)
|
16ms |
392 KiB |
|
255 Bytes |
2022-6-13 22:11:43 |
|
汪致卉 (wangzh)
|
16ms |
384 KiB |
|
362 Bytes |
2022-1-23 20:04:37 |
|
李铭瀚 (liminghan)
|
16ms |
392 KiB |
|
458 Bytes |
2022-9-11 19:10:21 |
|
张峻瑞
|
16ms |
384 KiB |
|
243 Bytes |
2022-9-7 21:39:01 |
|
何昊宇 (22016-hhy)
|
16ms |
384 KiB |
|
226 Bytes |
2023-5-20 17:11:59 |
|
杜俊宏
|
16ms |
384 KiB |
|
285 Bytes |
2022-4-9 15:33:42 |
|
heyuzhe
|
16ms |
6.9 MiB |
C++98 |
253 Bytes |
2024-8-21 9:28:07 |
|
王胤钦 (wangyinqin)
|
16ms |
7.1 MiB |
C++11 |
323 Bytes |
2024-4-19 20:07:54 |
|
yu (赵子瑜)
|
16ms |
392 KiB |
|
271 Bytes |
2022-2-27 19:19:56 |
|
什蒂尔布 (吴东航)
|
16ms |
6.9 MiB |
C++98 |
230 Bytes |
2024-5-20 17:03:49 |
|
黄相茗
|
16ms |
412 KiB |
|
298 Bytes |
2022-4-6 21:37:53 |
|
我和赵梓晴之间不是一般的亲密 (fengyuanzheng)
|
16ms |
384 KiB |
|
425 Bytes |
2022-3-4 23:27:03 |
|
程子杰 (05c41-czj)
|
16ms |
512 KiB |
|
291 Bytes |
2022-7-27 11:11:22 |
|
NJL (NJlL)
|
16ms |
384 KiB |
|
329 Bytes |
2022-2-27 19:05:03 |
|
没有此人 (akm)
|
16ms |
512 KiB |
|
350 Bytes |
2022-9-5 15:46:17 |
|
Accepted (周芷乐)
|
16ms |
6.7 MiB |
C++14 |
253 Bytes |
2024-7-20 12:36:23 |
|
我谢谢你全家
|
16ms |
392 KiB |
|
279 Bytes |
2022-2-27 19:18:16 |
|
luosifu22006
|
16ms |
384 KiB |
|
246 Bytes |
2022-8-18 17:41:01 |
|
ylc
|
16ms |
7.1 MiB |
C++98 |
301 Bytes |
2024-5-18 15:34:40 |
|
ddz
|
16ms |
400 KiB |
|
602 Bytes |
2022-3-6 18:35:06 |
|
王韵淮
|
16ms |
384 KiB |
|
193 Bytes |
2022-5-20 21:45:06 |
|
樊竣熠 (lft1114)
|
16ms |
440 KiB |
|
297 Bytes |
2022-8-3 13:46:30 |
|
魏楚浔 (shawn)
|
16ms |
444 KiB |
|
289 Bytes |
2022-3-5 20:26:39 |
|
(张洛诚)
|
16ms |
384 KiB |
|
406 Bytes |
2023-4-20 20:20:20 |
|
何昊宇 (22016-hhy)
|
16ms |
392 KiB |
|
244 Bytes |
2023-5-20 17:12:11 |
|
chen (peter)
|
16ms |
384 KiB |
|
261 Bytes |
2022-2-27 19:12:45 |
|
杨坤霖 (steven)
|
16ms |
512 KiB |
|
421 Bytes |
2023-2-3 11:14:45 |
|
12345
|
16ms |
384 KiB |
|
265 Bytes |
2022-3-19 15:31:12 |
|
张玉坚 (zhangyuian)
|
16ms |
384 KiB |
|
217 Bytes |
2022-10-30 15:37:54 |
|
张瑞博
|
16ms |
7 MiB |
C++11 |
288 Bytes |
2024-6-9 17:51:54 |
|
朱老师 (zyp)
|
16ms |
384 KiB |
|
268 Bytes |
2022-8-15 16:54:19 |
|
文硕 (文硕1)
|
16ms |
512 KiB |
|
298 Bytes |
2022-7-12 11:51:33 |
|
赵泳鑫 (zhaoyongxin)
|
16ms |
384 KiB |
|
298 Bytes |
2022-4-6 19:10:15 |
|
唐梓竣
|
16ms |
512 KiB |
|
608 Bytes |
2023-5-7 18:08:56 |
|
wangxingyue
|
16ms |
512 KiB |
|
409 Bytes |
2022-3-26 16:57:04 |
|
wangruibo20xh
|
16ms |
436 KiB |
|
335 Bytes |
2022-2-11 18:47:05 |
|
中岛敦 (黄麒瑞)
|
16ms |
6.8 MiB |
|
352 Bytes |
2023-10-3 11:30:47 |
|
SYC0226
|
16ms |
384 KiB |
|
364 Bytes |
2022-3-20 14:26:22 |
|
郭人瑀作业号
|
16ms |
440 KiB |
|
274 Bytes |
2022-8-2 15:28:35 |
|
手搓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 |
392 KiB |
|
362 Bytes |
2022-12-31 10:11:16 |
|
zhanghaoran
|
16ms |
384 KiB |
|
286 Bytes |
2022-3-12 10:35:50 |
|
zjz
|
16ms |
384 KiB |
|
272 Bytes |
2022-2-27 19:43:52 |
|
laiyouming22031
|
16ms |
384 KiB |
|
223 Bytes |
2022-12-18 11:19:45 |
|
zhangheyi22006
|
17ms |
384 KiB |
|
272 Bytes |
2023-2-15 18:57:58 |
|
ddz
|
17ms |
384 KiB |
|
602 Bytes |
2022-3-6 18:35:07 |
|
时代一校林星宇 (lxy)
|
17ms |
432 KiB |
|
563 Bytes |
2023-2-3 19:42:54 |
|
朱泽晟
|
17ms |
384 KiB |
|
279 Bytes |
2022-1-26 11:41:37 |
|
冒牌陈杰晟【MOD】 (wed)
|
17ms |
444 KiB |
|
296 Bytes |
2022-2-27 19:04:11 |
|
邹智吉
|
17ms |
6.8 MiB |
C++98 |
325 Bytes |
2024-8-25 14:20:46 |
|
贾鑫豪 (Mr Sam)
|
17ms |
384 KiB |
|
291 Bytes |
2022-10-29 11:34:20 |
|
代尚函 笛卡尔 (daishanghan)
|
17ms |
384 KiB |
|
244 Bytes |
2022-10-30 15:36:57 |
|
吴思谛 (wusidi)
|
17ms |
512 KiB |
|
271 Bytes |
2022-6-11 11:25:34 |
|
原著校区 巫映秋 (巫映秋1a)
|
17ms |
7 MiB |
C++98 |
422 Bytes |
2024-6-28 23:00:05 |
|
(金沙天街)严皓月 (严皓月)
|
17ms |
6.8 MiB |
|
181 Bytes |
2023-9-29 10:54:02 |
|
12345
|
17ms |
392 KiB |
|
265 Bytes |
2022-3-19 15:31:18 |
|
zhoumingze23017
|
17ms |
6.7 MiB |
|
240 Bytes |
2023-9-5 17:50:32 |
|
12345
|
17ms |
384 KiB |
|
265 Bytes |
2022-3-19 15:31:13 |
|
我是个s* (lijinze)
|
17ms |
396 KiB |
|
245 Bytes |
2023-3-24 20:34:59 |
|
Tang
|
17ms |
424 KiB |
|
286 Bytes |
2022-3-12 10:33:00 |
|
zzzrrrxxx
|
17ms |
7 MiB |
|
217 Bytes |
2023-12-17 16:59:32 |
|
ddz
|
17ms |
436 KiB |
|
292 Bytes |
2022-3-21 20:54:05 |
|
qinyi
|
17ms |
436 KiB |
|
302 Bytes |
2022-2-26 18:41:28 |
|
刘煜轩
|
17ms |
6.7 MiB |
|
297 Bytes |
2023-9-30 10:58:50 |
|
超级管理员 (root)
|
17ms |
396 KiB |
|
298 Bytes |
2022-12-31 20:47:35 |
|
周浩楠 (开朗的周好难)
|
17ms |
6.8 MiB |
|
188 Bytes |
2023-9-30 11:07:16 |
|
希蒙 (zhengxingya)
|
17ms |
6.8 MiB |
|
421 Bytes |
2023-10-18 17:37:54 |