|
拥抱幸福小熊(吴沛篪)
|
- |
7 MiB |
|
168 Bytes |
2024-1-20 15:05:41 |
|
陈诺
|
- |
7.1 MiB |
|
173 Bytes |
2024-1-13 13:23:02 |
|
赵沛喆
|
2ms |
256 KiB |
|
155 Bytes |
2022-5-8 11:11:53 |
|
姚宏逸
|
2ms |
256 KiB |
|
142 Bytes |
2022-5-29 9:53:39 |
|
1396013295
|
2ms |
256 KiB |
|
139 Bytes |
2022-1-23 17:26:08 |
|
jop
|
3ms |
384 KiB |
|
112 Bytes |
2022-1-19 11:18:45 |
|
王韵淮
|
3ms |
384 KiB |
|
97 Bytes |
2022-5-28 14:47:36 |
|
肖添宇
|
3ms |
492 KiB |
|
132 Bytes |
2022-5-14 16:52:38 |
|
zhangyh (张育菡)
|
3ms |
384 KiB |
|
140 Bytes |
2022-6-13 22:12:31 |
|
汪致卉 (wangzh)
|
4ms |
392 KiB |
|
142 Bytes |
2022-4-22 18:46:17 |
|
Ronnie
|
4ms |
384 KiB |
|
129 Bytes |
2022-1-19 11:21:21 |
|
经常消失 (小萝卜)
|
4ms |
384 KiB |
|
139 Bytes |
2022-7-6 15:57:53 |
|
侯治鋆
|
4ms |
384 KiB |
|
98 Bytes |
2022-5-27 20:25:34 |
|
luoluonuoya
|
4ms |
384 KiB |
|
184 Bytes |
2022-1-26 16:31:07 |
|
梨冻亿 (wiueh)
|
4ms |
384 KiB |
|
129 Bytes |
2022-1-23 18:43:06 |
|
喻兴诚 (Brian)
|
4ms |
384 KiB |
|
122 Bytes |
2022-1-19 11:36:47 |
|
🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕 (bro)
|
4ms |
392 KiB |
|
135 Bytes |
2022-1-28 15:15:56 |
|
ycy
|
4ms |
384 KiB |
|
120 Bytes |
2022-6-18 15:59:21 |
|
赵泳鑫 (zhaoyongxin)
|
4ms |
384 KiB |
|
154 Bytes |
2022-3-31 19:39:54 |
|
时代二校-焦雨齐 (Angel)
|
4ms |
388 KiB |
|
101 Bytes |
2023-5-18 20:05:45 |
|
Ronnie
|
4ms |
384 KiB |
|
129 Bytes |
2022-1-19 11:21:25 |
|
zzy
|
4ms |
436 KiB |
|
115 Bytes |
2023-4-13 20:19:00 |
|
Ronnie
|
4ms |
384 KiB |
|
129 Bytes |
2022-1-19 11:21:26 |
|
AC[谭赫奕] (tanheyi)
|
4ms |
408 KiB |
|
127 Bytes |
2023-4-2 10:04:10 |
|
徐子恩 (Cow)
|
4ms |
384 KiB |
|
159 Bytes |
2022-1-19 11:17:45 |
|
陈骏逸 (chenjunyi)
|
4ms |
384 KiB |
|
113 Bytes |
2022-7-21 10:36:57 |
|
XYZ303
|
4ms |
384 KiB |
|
135 Bytes |
2022-1-19 11:22:46 |
|
李山水
|
4ms |
384 KiB |
|
116 Bytes |
2022-2-20 14:49:48 |
|
Ronnie
|
4ms |
384 KiB |
|
129 Bytes |
2022-1-19 11:21:26 |
|
Randy Marsh (杨子腾)
|
4ms |
396 KiB |
|
134 Bytes |
2022-5-26 19:45:47 |
|
05c05-hzy
|
4ms |
384 KiB |
|
116 Bytes |
2022-6-30 15:42:30 |
|
CK (李弘毅)
|
4ms |
384 KiB |
|
114 Bytes |
2022-10-29 14:26:40 |
|
吴佳智 (AWM)
|
4ms |
384 KiB |
|
135 Bytes |
2023-5-9 20:35:42 |
|
. (Pig)
|
4ms |
384 KiB |
|
126 Bytes |
2022-1-19 11:17:37 |
|
wangruibo20xh
|
4ms |
392 KiB |
|
98 Bytes |
2022-1-20 21:20:40 |
|
草||草 (陈星佑)
|
4ms |
384 KiB |
|
140 Bytes |
2022-6-12 11:31:09 |
|
黄相茗
|
4ms |
384 KiB |
|
154 Bytes |
2022-4-12 18:24:27 |
|
我很6 (zjj22031)
|
4ms |
384 KiB |
|
109 Bytes |
2022-12-18 10:21:06 |
|
草||草 (陈星佑)
|
4ms |
384 KiB |
|
140 Bytes |
2022-6-12 11:31:04 |
|
Yuan (Zongzi1)
|
4ms |
6.6 MiB |
C++17(O2) |
119 Bytes |
2024-7-21 15:28:31 |
|
陈骏逸 (chenjunyi)
|
4ms |
384 KiB |
|
113 Bytes |
2022-7-21 10:36:32 |
|
原著校区 巫映秋 (巫映秋1a)
|
4ms |
7 MiB |
C++98 |
131 Bytes |
2024-6-28 22:55:16 |
|
疯神芭芭脱丝 (李卓修)
|
4ms |
384 KiB |
|
125 Bytes |
2022-1-23 21:16:07 |
|
huyinuo
|
4ms |
512 KiB |
|
116 Bytes |
2022-4-14 18:34:54 |
|
11111
|
4ms |
392 KiB |
|
119 Bytes |
2022-5-22 10:19:13 |
|
李树崑 (lishukun)
|
4ms |
428 KiB |
|
185 Bytes |
2022-6-26 12:25:16 |
|
任希贤
|
4ms |
436 KiB |
|
109 Bytes |
2023-2-25 19:13:49 |
|
胡瀚文
|
4ms |
436 KiB |
|
101 Bytes |
2022-7-15 17:29:05 |
|
马渝杭 (mayuhang)
|
4ms |
384 KiB |
|
131 Bytes |
2022-12-6 20:11:09 |
|
Ronnie
|
4ms |
384 KiB |
|
129 Bytes |
2022-1-19 11:21:26 |
|
曹元明
|
4ms |
384 KiB |
|
127 Bytes |
2022-6-11 11:41:43 |
|
火爆肥肠(杨弘毅) (火爆肥肠)
|
4ms |
384 KiB |
|
230 Bytes |
2022-3-24 21:49:41 |
|
中岛敦 (黄麒瑞)
|
4ms |
6.8 MiB |
|
113 Bytes |
2023-10-3 11:28:43 |
|
xmw318046
|
4ms |
6.4 MiB |
C++98 |
133 Bytes |
2024-7-6 13:50:06 |
|
05c05-zjk
|
4ms |
384 KiB |
|
117 Bytes |
2022-5-25 22:37:19 |
|
极为的好van的 (lyq)
|
4ms |
384 KiB |
|
111 Bytes |
2022-6-25 9:02:46 |
|
张祖名
|
4ms |
6.4 MiB |
C++98(O2) |
134 Bytes |
2024-7-5 22:13:18 |
|
罗宇凡 (吴彦祖)
|
4ms |
384 KiB |
|
124 Bytes |
2022-1-19 11:21:23 |
|
朱老师 (zyp)
|
4ms |
440 KiB |
|
128 Bytes |
2022-8-16 18:30:23 |
|
手搓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)
|
4ms |
440 KiB |
|
125 Bytes |
2023-4-8 9:01:52 |
|
喻兴诚 (Brian)
|
4ms |
384 KiB |
|
122 Bytes |
2022-1-19 11:36:34 |
|
MoonLight ( aaa)
|
4ms |
384 KiB |
|
144 Bytes |
2022-1-22 9:54:53 |
|
Steven (王梓丞)
|
4ms |
384 KiB |
|
122 Bytes |
2022-4-23 16:00:15 |
|
王晨志 (wangchenzhi)
|
4ms |
392 KiB |
|
142 Bytes |
2022-6-19 13:07:53 |
|
杜是贤 (dushixian)
|
4ms |
384 KiB |
|
107 Bytes |
2022-6-12 9:40:57 |
|
yaokaixuan
|
4ms |
408 KiB |
|
154 Bytes |
2022-1-19 11:22:46 |
|
爱琴海校区jzn (jzn)
|
4ms |
384 KiB |
|
100 Bytes |
2023-3-25 10:47:14 |
|
李晨希
|
4ms |
384 KiB |
|
124 Bytes |
2023-3-25 10:42:39 |
|
罗晨睿 (luochenrui)
|
4ms |
512 KiB |
|
118 Bytes |
2022-6-29 14:24:34 |
|
yaokaixin
|
4ms |
384 KiB |
|
127 Bytes |
2022-1-19 11:36:05 |
|
金海童1
|
4ms |
7 MiB |
|
109 Bytes |
2023-12-31 14:22:09 |
|
zhengjiaxiang
|
4ms |
392 KiB |
|
100 Bytes |
2023-2-17 20:51:51 |
|
MacrozClick_ (蒋淞霖)
|
4ms |
384 KiB |
|
162 Bytes |
2022-4-17 11:38:33 |
|
执剑人罗辑 (Jasson)
|
4ms |
6.7 MiB |
|
113 Bytes |
2023-9-2 19:09:13 |
|
Ronnie
|
4ms |
384 KiB |
|
129 Bytes |
2022-1-19 11:21:24 |
|
杜启苇 (duqiwei)
|
4ms |
384 KiB |
|
130 Bytes |
2022-6-25 10:26:03 |
|
付博plus
|
4ms |
384 KiB |
|
126 Bytes |
2022-8-28 19:40:15 |
|
文硕 (文硕1)
|
4ms |
512 KiB |
|
154 Bytes |
2022-7-12 11:53:58 |
|
吴恩子
|
4ms |
6.8 MiB |
|
109 Bytes |
2023-10-10 18:48:56 |
|
吴俊成 (wujuncheng)
|
4ms |
424 KiB |
|
122 Bytes |
2022-7-11 11:24:26 |
|
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)
|
4ms |
6.7 MiB |
|
180 Bytes |
2023-9-4 19:36:58 |
|
Yangshenxin (𝒲𝒶𝓉𝑒𝓇)
|
4ms |
384 KiB |
|
126 Bytes |
2022-1-23 20:08:05 |
|
罗元邑2
|
4ms |
384 KiB |
|
118 Bytes |
2023-3-29 20:30:17 |
|
郭人瑀作业号
|
4ms |
512 KiB |
|
157 Bytes |
2022-8-2 15:32:59 |
|
傅博涛
|
4ms |
404 KiB |
|
132 Bytes |
2022-3-13 10:52:32 |
|
xyc (谢雨宸)
|
4ms |
6.7 MiB |
|
117 Bytes |
2023-9-27 20:23:51 |
|
朱泽晟
|
4ms |
432 KiB |
|
124 Bytes |
2022-8-22 17:56:08 |
|
我和赵梓晴之间不是一般的亲密 (fengyuanzheng)
|
4ms |
384 KiB |
|
143 Bytes |
2022-2-26 18:12:39 |
|
xuniaoyin (徐袅音)
|
4ms |
6.6 MiB |
|
118 Bytes |
2023-8-30 16:09:48 |
|
胡澜之 (666hlz666)
|
4ms |
384 KiB |
|
135 Bytes |
2023-5-9 20:36:27 |
|
朱老师 (zyp)
|
4ms |
6.8 MiB |
|
148 Bytes |
2023-10-2 18:39:42 |
|
Ronnie
|
4ms |
384 KiB |
|
129 Bytes |
2022-1-19 11:21:25 |
|
李卓燃 (李卓燃1)
|
4ms |
392 KiB |
|
107 Bytes |
2023-2-17 20:54:34 |
|
LUKHE (LukeHu)
|
4ms |
436 KiB |
|
229 Bytes |
2022-2-20 13:44:43 |
|
Ronnie
|
4ms |
428 KiB |
|
129 Bytes |
2022-1-19 11:21:26 |
|
爱琴海校区-胡靖欢 (胡靖欢1)
|
4ms |
392 KiB |
|
118 Bytes |
2023-3-25 10:51:29 |
|
罗翌珂 (dangdang)
|
4ms |
420 KiB |
|
137 Bytes |
2022-8-31 13:24:58 |
|
欧俊阳
|
4ms |
6.9 MiB |
|
119 Bytes |
2023-8-9 10:57:09 |
|
叶雨昊 (yeyuhao22006)
|
4ms |
392 KiB |
|
127 Bytes |
2022-5-24 19:01:59 |
|
17779
|
4ms |
400 KiB |
|
154 Bytes |
2022-4-11 14:39:50 |