|
ttt123
|
7ms |
392 KiB |
|
401 Bytes |
2023-4-20 20:30:04 |
|
GYZ
|
7ms |
392 KiB |
|
275 Bytes |
2022-5-18 19:30:59 |
|
黄立信
|
7ms |
6.8 MiB |
|
229 Bytes |
2023-10-10 22:04:27 |
|
贾博涵
|
7ms |
6.8 MiB |
|
184 Bytes |
2023-11-6 15:48:54 |
|
韩思辰 (hansichen)
|
7ms |
384 KiB |
|
461 Bytes |
2022-12-3 10:35:54 |
|
蒲梓勋 (puzixun)
|
7ms |
512 KiB |
|
186 Bytes |
2022-9-4 10:35:46 |
|
zzl
|
7ms |
6.8 MiB |
|
253 Bytes |
2023-11-6 21:03:49 |
|
longhao
|
7ms |
384 KiB |
|
327 Bytes |
2022-1-24 10:10:30 |
|
况奕辛 (KYX_yyds)
|
7ms |
392 KiB |
|
566 Bytes |
2022-1-2 19:26:18 |
|
zzt
|
7ms |
384 KiB |
|
212 Bytes |
2022-3-26 22:47:51 |
|
yang
|
7ms |
444 KiB |
|
379 Bytes |
2022-8-14 18:11:07 |
|
Tang
|
7ms |
512 KiB |
|
287 Bytes |
2022-2-19 11:19:53 |
|
星野 光 (Hoshino Hikari)
|
7ms |
6.8 MiB |
|
277 Bytes |
2023-10-21 12:56:46 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
7ms |
384 KiB |
|
171 Bytes |
2022-12-29 8:50:43 |
|
朱泽晟
|
7ms |
436 KiB |
|
197 Bytes |
2022-2-11 19:27:25 |
|
李清城 (朱瀚文集训号)
|
7ms |
448 KiB |
|
411 Bytes |
2023-2-2 17:22:53 |
|
张子轩 (zhangzixuana)
|
7ms |
384 KiB |
|
358 Bytes |
2022-11-17 16:19:44 |
|
_PXY_
|
7ms |
384 KiB |
|
347 Bytes |
2022-1-25 14:06:07 |
|
zzzrrrxxx
|
7ms |
6.7 MiB |
|
150 Bytes |
2023-9-17 19:24:34 |
|
李山水
|
7ms |
384 KiB |
|
571 Bytes |
2022-2-23 19:54:51 |
|
heyuzhe
|
7ms |
6.9 MiB |
C++98 |
232 Bytes |
2024-8-16 8:34:51 |
|
kkksc03 (彭士锋)
|
7ms |
444 KiB |
|
483 Bytes |
2022-3-5 14:54:48 |
|
金锦泽 (jinjinze)
|
7ms |
6.8 MiB |
|
178 Bytes |
2023-10-3 10:23:16 |
|
荣耀
|
7ms |
6.7 MiB |
|
162 Bytes |
2023-8-30 11:16:56 |
|
heyi
|
7ms |
6.8 MiB |
C++98(O2) |
226 Bytes |
2024-8-8 18:31:53 |
|
杨坤霖 (steven)
|
7ms |
512 KiB |
|
262 Bytes |
2023-1-10 16:17:51 |
|
朱老师 (zyp)
|
7ms |
440 KiB |
|
172 Bytes |
2022-7-27 10:11:04 |
|
樊竣熠 (lft1114)
|
7ms |
384 KiB |
|
251 Bytes |
2022-4-5 18:45:45 |
|
张子扬
|
7ms |
512 KiB |
|
986 Bytes |
2022-3-1 21:43:20 |
|
关博源
|
7ms |
384 KiB |
|
182 Bytes |
2023-2-11 9:51:53 |
|
wuzhenghan
|
7ms |
392 KiB |
|
227 Bytes |
2022-11-21 21:20:04 |
|
UsMt1 (jiangyuan)
|
7ms |
6.9 MiB |
|
428 Bytes |
2023-7-27 10:46:31 |
|
huanglu
|
7ms |
7.1 MiB |
|
588 Bytes |
2023-7-15 14:37:18 |
|
zcx
|
7ms |
440 KiB |
|
239 Bytes |
2023-4-20 19:42:00 |
|
黄梓桐 (HuangZiTong)
|
7ms |
432 KiB |
|
157 Bytes |
2022-12-19 11:15:50 |
|
SYC0226
|
7ms |
432 KiB |
|
520 Bytes |
2022-3-13 13:11:35 |
|
暗蛆突围 (lzh)
|
7ms |
6.9 MiB |
|
259 Bytes |
2023-11-9 20:51:27 |
|
缥 (王硕2012)
|
7ms |
392 KiB |
|
376 Bytes |
2023-3-7 20:54:16 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
432 KiB |
|
221 Bytes |
2022-11-23 9:42:07 |
|
傅博涛
|
7ms |
436 KiB |
|
273 Bytes |
2022-7-3 10:18:11 |
|
🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕 (bro)
|
7ms |
412 KiB |
|
265 Bytes |
2022-1-28 15:32:52 |
|
马渝杭 (mayuhang)
|
7ms |
436 KiB |
|
248 Bytes |
2023-3-29 18:29:54 |
|
手搓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)
|
7ms |
512 KiB |
|
187 Bytes |
2023-5-27 10:51:32 |
|
刘思齐
|
7ms |
7.3 MiB |
C++98 |
508 Bytes |
2024-6-28 16:57:58 |
|
梅子楠 (22016-mzn)
|
7ms |
6.9 MiB |
|
459 Bytes |
2023-7-20 21:34:20 |
|
黄梓轩 (huangzixuan)
|
7ms |
7 MiB |
|
186 Bytes |
2023-7-19 9:51:22 |
|
崔欧辰
|
7ms |
6.8 MiB |
C++11 |
266 Bytes |
2024-8-4 19:37:20 |
|
伍芷函
|
7ms |
512 KiB |
|
573 Bytes |
2022-11-6 12:55:03 |
|
我推的乱破 (贺俊楠)
|
7ms |
6.8 MiB |
|
501 Bytes |
2023-6-28 13:00:34 |
|
蓝色妖姬 (jiangpeiyu)
|
7ms |
440 KiB |
|
212 Bytes |
2022-11-6 15:06:21 |
|
叶哲宇 (yzy)
|
7ms |
6.9 MiB |
|
328 Bytes |
2023-8-20 17:16:58 |
|
chaikexu
|
7ms |
436 KiB |
|
392 Bytes |
2022-11-23 13:27:01 |
|
yxj
|
7ms |
512 KiB |
|
427 Bytes |
2022-10-20 15:20:38 |
|
炸鱼4000+ (dxc)
|
7ms |
6.8 MiB |
|
197 Bytes |
2023-11-22 20:37:47 |
|
经常消失 (小萝卜)
|
8ms |
440 KiB |
|
422 Bytes |
2023-3-8 15:11:30 |
|
繁星 (05c35-zzm)
|
8ms |
440 KiB |
|
182 Bytes |
2022-11-19 10:18:35 |
|
周琪渃
|
8ms |
384 KiB |
|
391 Bytes |
2022-12-24 17:38:15 |
|
LittleHair
|
8ms |
7.2 MiB |
|
458 Bytes |
2023-12-23 15:21:39 |
|
谭红中 (不知道)
|
8ms |
392 KiB |
|
556 Bytes |
2023-1-9 11:30: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)
|
8ms |
6.9 MiB |
|
247 Bytes |
2023-8-15 15:36:04 |
|
zhangzhimo
|
8ms |
428 KiB |
|
411 Bytes |
2022-12-3 16:59:09 |
|
RanHao
|
8ms |
7 MiB |
|
192 Bytes |
2023-7-20 17:10:30 |
|
德克萨斯做的到吗 (liyangbao)
|
8ms |
436 KiB |
|
193 Bytes |
2022-11-6 22:07:17 |
|
王玺懿 (wxy)
|
8ms |
512 KiB |
|
245 Bytes |
2022-8-7 11:40:56 |
|
新壹街罗田雨 (罗田雨29)
|
8ms |
7 MiB |
|
662 Bytes |
2023-12-7 22:58:42 |
|
新壹街——陈学彬 (BUG)
|
8ms |
6.9 MiB |
|
280 Bytes |
2023-6-30 10:23:05 |
|
zhangyh (张育菡)
|
8ms |
384 KiB |
|
179 Bytes |
2022-10-23 11:19:55 |
|
周琪渃
|
8ms |
392 KiB |
|
396 Bytes |
2022-12-24 17:37:54 |
|
何昊宇 (22016-hhy)
|
8ms |
6.9 MiB |
|
225 Bytes |
2023-7-29 19:55:05 |
|
李哲 (lizhe)
|
8ms |
384 KiB |
|
427 Bytes |
2022-11-7 22:02:21 |
|
scallway
|
8ms |
384 KiB |
|
227 Bytes |
2022-10-28 21:57:35 |
|
ganlin1
|
8ms |
7.7 MiB |
|
176 Bytes |
2023-7-12 17:53:35 |
|
何昊宇 (22016-hhy)
|
8ms |
6.9 MiB |
|
213 Bytes |
2023-7-29 19:54:47 |
|
wzzjnb2012
|
8ms |
512 KiB |
|
325 Bytes |
2022-9-27 16:37:35 |
|
邹曜丞 (13983097018)
|
8ms |
6.9 MiB |
|
262 Bytes |
2023-7-22 9:58:42 |
|
zvt_132 (任子轩)
|
8ms |
6.9 MiB |
|
244 Bytes |
2023-8-2 18:57:17 |
|
colin1112 (墙凌可)
|
8ms |
440 KiB |
|
572 Bytes |
2023-3-7 18:47:03 |
|
毕浩宇 (bihaoyu)
|
8ms |
7.2 MiB |
|
282 Bytes |
2023-7-14 16:54:50 |
|
xuaonan
|
8ms |
544 KiB |
|
292 Bytes |
2022-10-4 18:02:42 |
|
李彭 宋代诗人 (ljy123456)
|
8ms |
432 KiB |
|
212 Bytes |
2023-3-23 6:42:26 |
|
时代一校 蒋帛希 (13983392730)
|
8ms |
6.9 MiB |
|
396 Bytes |
2023-8-8 14:20:19 |
|
牟淳雅
|
8ms |
6.9 MiB |
|
501 Bytes |
2023-7-19 13:10:43 |
|
杜是贤 (dushixian)
|
8ms |
436 KiB |
|
196 Bytes |
2023-5-28 11:23:19 |
|
希蒙 (zhengxingya)
|
8ms |
6.9 MiB |
|
592 Bytes |
2023-8-2 15:08:43 |
|
小忙果 (王昱杰)
|
8ms |
7 MiB |
|
662 Bytes |
2023-12-7 22:57:45 |
|
罗翌珂 (dangdang)
|
8ms |
432 KiB |
|
201 Bytes |
2022-8-27 10:27:58 |
|
时代二校-陈天成 (鸭缩毛巾)
|
8ms |
6.9 MiB |
|
184 Bytes |
2023-8-1 22:20:18 |
|
新壹街陈科言 (cky)
|
8ms |
7 MiB |
|
300 Bytes |
2023-7-20 11:25:49 |
|
新一街校区Jason_LuoYouZheng (罗友峥)
|
9ms |
428 KiB |
|
297 Bytes |
2023-3-15 20:25:37 |
|
时代一校-赵彦博 (zyb)
|
9ms |
6.9 MiB |
|
472 Bytes |
2023-8-1 13:47:16 |
|
杨坤霖 (steven)
|
9ms |
444 KiB |
|
262 Bytes |
2023-1-10 16:17:50 |
|
周琪渃
|
9ms |
440 KiB |
|
396 Bytes |
2022-12-24 17:33:54 |
|
colin1112 (墙凌可)
|
9ms |
512 KiB |
|
572 Bytes |
2023-1-22 12:28:03 |
|
pandap&a王皓宸 (WANGHAOCHEN)
|
9ms |
468 KiB |
|
395 Bytes |
2022-12-17 11:40:31 |
|
56 (13883454928)
|
9ms |
420 KiB |
|
198 Bytes |
2023-4-12 18:43:00 |
|
yanglang
|
9ms |
416 KiB |
|
178 Bytes |
2022-10-21 15:17:26 |
|
JOKER (hhy)
|
9ms |
6.9 MiB |
|
347 Bytes |
2023-7-20 16:59:10 |
|
陈诺
|
11ms |
7.1 MiB |
|
461 Bytes |
2023-12-18 19:50:56 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
12ms |
7 MiB |
|
180 Bytes |
2023-12-3 16:48:14 |
|
时代一校石博文 (shibowen)
|
12ms |
7 MiB |
|
207 Bytes |
2024-1-18 20:51:58 |