|
huyinuo
|
14ms |
384 KiB |
|
248 Bytes |
2022-2-28 19:38:07 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
14ms |
440 KiB |
|
251 Bytes |
2022-8-13 17:01:27 |
|
高致远 (GZY)
|
14ms |
512 KiB |
|
275 Bytes |
2022-2-19 10:56:55 |
|
杨瀚霖 (yanghanlin)
|
14ms |
392 KiB |
|
287 Bytes |
2023-2-6 22:41:28 |
|
李山水
|
14ms |
412 KiB |
|
292 Bytes |
2022-8-31 18:23:36 |
|
贾鑫豪 (Mr Sam)
|
14ms |
384 KiB |
|
202 Bytes |
2022-3-3 22:11:27 |
|
黄立信
|
14ms |
6.8 MiB |
|
289 Bytes |
2023-10-14 13:59:48 |
|
时代校区-孔令皓 (konglinghao)
|
14ms |
7.2 MiB |
C++98 |
1.1 KiB |
2024-4-21 22:19:21 |
|
彭嘉豪 (pengjiahao)
|
14ms |
444 KiB |
|
291 Bytes |
2022-8-1 10:31:37 |
|
代尚函 笛卡尔 (daishanghan)
|
14ms |
384 KiB |
|
193 Bytes |
2022-8-27 13:20:04 |
|
程子杰 (05c41-czj)
|
14ms |
432 KiB |
|
206 Bytes |
2022-7-27 10:44:04 |
|
傅博涛
|
14ms |
512 KiB |
|
192 Bytes |
2022-2-19 21:50:04 |
|
黄梓轩 (huangzixuan)
|
14ms |
384 KiB |
|
244 Bytes |
2022-9-7 18:52:05 |
|
肖艺勋2
|
14ms |
7 MiB |
C++17 |
220 Bytes |
2024-8-24 15:59:45 |
|
时代二校-陈天成 (鸭缩毛巾)
|
14ms |
6.7 MiB |
|
184 Bytes |
2023-9-2 16:42:31 |
|
新壹街校区-冉睦阳 (冉睦阳)
|
14ms |
6.8 MiB |
C++98 |
187 Bytes |
2024-6-27 8:35:17 |
|
kapurua
|
14ms |
6.9 MiB |
|
236 Bytes |
2023-11-4 19:59:17 |
|
火爆肥肠(杨弘毅) (火爆肥肠)
|
14ms |
440 KiB |
|
291 Bytes |
2022-3-15 21:07:44 |
|
蒋青峰
|
14ms |
432 KiB |
|
171 Bytes |
2023-2-12 16:36:51 |
|
中岛敦 (黄麒瑞)
|
14ms |
6.8 MiB |
|
272 Bytes |
2023-10-3 11:24:26 |
|
heyi
|
14ms |
6.8 MiB |
C++98(O2) |
289 Bytes |
2024-8-9 13:33:31 |
|
向俊熙 (xiangjunxi23003)
|
14ms |
6.7 MiB |
|
180 Bytes |
2023-9-7 20:43:11 |
|
dmh (丁墨涵)
|
14ms |
384 KiB |
|
217 Bytes |
2022-1-28 15:35:34 |
|
周琪渃
|
14ms |
384 KiB |
|
302 Bytes |
2022-12-3 16:07:38 |
|
王晨志 (wangchenzhi)
|
14ms |
392 KiB |
|
461 Bytes |
2022-1-23 17:25:09 |
|
谭懿轩 (yanyixuan)
|
14ms |
436 KiB |
|
175 Bytes |
2022-3-17 18:09:28 |
|
soha (武夷岩)
|
14ms |
384 KiB |
|
196 Bytes |
2022-9-7 18:53:35 |
|
源著校区-宋昊成 (马冬梅)
|
14ms |
384 KiB |
|
381 Bytes |
2022-10-29 17:57:35 |
|
芒苒忧 (廖迦南)
|
14ms |
392 KiB |
|
225 Bytes |
2022-1-26 20:32:12 |
|
SYC0226
|
14ms |
444 KiB |
|
229 Bytes |
2022-3-20 11:10:46 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
14ms |
388 KiB |
|
204 Bytes |
2022-8-30 19:44:32 |
|
王乐仪
|
14ms |
512 KiB |
|
199 Bytes |
2022-2-4 16:02:57 |
|
heyuzhe
|
14ms |
7 MiB |
C++98 |
238 Bytes |
2024-6-12 17:35:41 |
|
XYZ303
|
14ms |
384 KiB |
|
233 Bytes |
2022-2-20 12:19:22 |
|
tad (OP AI)
|
14ms |
6.9 MiB |
C++98 |
202 Bytes |
2024-6-26 19:29:01 |
|
曹埊睿 (caodirui)
|
14ms |
512 KiB |
|
191 Bytes |
2023-5-2 22:44:34 |
|
renqiumo
|
14ms |
512 KiB |
|
209 Bytes |
2022-3-6 8:49:16 |
|
疯神芭芭脱丝 (李卓修)
|
14ms |
512 KiB |
|
225 Bytes |
2022-7-16 13:41:49 |
|
灿灿 (CAN)
|
14ms |
384 KiB |
|
270 Bytes |
2022-9-4 14:57:31 |
|
huyinuo
|
14ms |
512 KiB |
|
248 Bytes |
2022-3-13 21:29:11 |
|
yaokaixuan
|
14ms |
384 KiB |
|
538 Bytes |
2022-2-20 12:06:33 |
|
洛谷:AIDczy(uid:656765) (chenzeyu)
|
14ms |
432 KiB |
|
197 Bytes |
2022-3-3 19:52:55 |
|
zzl
|
14ms |
6.8 MiB |
|
214 Bytes |
2023-11-7 0:34:21 |
|
啊...这 (炼狱杏寿郎)
|
14ms |
436 KiB |
|
259 Bytes |
2022-8-14 15:13:20 |
|
qwerty
|
14ms |
440 KiB |
|
195 Bytes |
2022-3-10 7:40:23 |
|
谢延灏 (xeiyanhao---a handsome boy)
|
14ms |
512 KiB |
|
222 Bytes |
2022-2-27 19:02:18 |
|
My name is Man (钟卓劭)
|
14ms |
7 MiB |
C++98 |
212 Bytes |
2024-6-23 14:05:48 |
|
17779
|
14ms |
396 KiB |
|
194 Bytes |
2022-3-10 10:30:30 |
|
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)
|
14ms |
6.7 MiB |
|
386 Bytes |
2023-9-27 22:32:07 |
|
zhangyh (张育菡)
|
14ms |
448 KiB |
|
243 Bytes |
2022-6-10 22:28:21 |
|
易锦程 (sky)
|
14ms |
512 KiB |
|
287 Bytes |
2023-3-4 11:32:25 |
|
wangxingyue
|
14ms |
512 KiB |
|
183 Bytes |
2023-3-28 19:15:28 |
|
陈雨泽1
|
14ms |
6.7 MiB |
|
273 Bytes |
2023-8-29 17:19:12 |
|
吴俊成 (wujuncheng)
|
14ms |
444 KiB |
|
218 Bytes |
2022-7-9 22:27:01 |
|
在煎鱼的肖大总铳 (肖宇航)
|
14ms |
6.8 MiB |
|
196 Bytes |
2023-10-12 21:54:29 |
|
黄相茗
|
14ms |
512 KiB |
|
237 Bytes |
2022-4-9 18:51:33 |
|
AC[谭赫奕] (tanheyi)
|
14ms |
440 KiB |
|
248 Bytes |
2023-4-17 14:41:22 |
|
黄立信
|
14ms |
6.8 MiB |
|
289 Bytes |
2023-10-14 12:56:56 |
|
zcx
|
14ms |
384 KiB |
|
239 Bytes |
2022-12-8 18:51:05 |
|
时代一校石博文 (shibowen)
|
14ms |
7.1 MiB |
|
210 Bytes |
2023-12-28 21:03:51 |
|
朱老师 (zyp)
|
14ms |
440 KiB |
|
196 Bytes |
2022-8-6 10:07:00 |
|
源著+王新睿 (王新睿)
|
14ms |
6.9 MiB |
|
255 Bytes |
2023-7-27 9:41:19 |
|
x0l0x
|
14ms |
6.8 MiB |
|
250 Bytes |
2023-10-3 9:06:11 |
|
何星震 (Jacob)
|
14ms |
512 KiB |
|
217 Bytes |
2023-2-6 20:19:00 |
|
丛林 (conglin)
|
14ms |
384 KiB |
|
268 Bytes |
2022-12-2 21:05:43 |
|
hnd (陈皓洋)
|
14ms |
384 KiB |
|
413 Bytes |
2022-8-27 11:46:14 |
|
MoonLight ( aaa)
|
14ms |
512 KiB |
|
365 Bytes |
2022-2-19 9:39:24 |
|
我推的乱破 (贺俊楠)
|
15ms |
512 KiB |
|
272 Bytes |
2023-4-12 21:09:20 |
|
星野 光 (Hoshino Hikari)
|
15ms |
6.8 MiB |
|
359 Bytes |
2023-10-23 21:23:48 |
|
wangruibo20xh
|
15ms |
6.8 MiB |
|
207 Bytes |
2023-11-7 11:47:13 |
|
赵泳鑫 (zhaoyongxin)
|
15ms |
436 KiB |
|
237 Bytes |
2022-4-13 20:15:32 |
|
手搓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)
|
15ms |
512 KiB |
|
297 Bytes |
2022-12-4 16:33:26 |
|
胡宸华 (huchenhua)
|
15ms |
512 KiB |
|
288 Bytes |
2022-11-6 22:44:03 |
|
chaikexu
|
15ms |
424 KiB |
|
214 Bytes |
2022-12-3 20:36:44 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
15ms |
440 KiB |
|
204 Bytes |
2022-9-2 13:44:54 |
|
22029-lyh
|
15ms |
432 KiB |
|
264 Bytes |
2022-12-4 11:16:42 |
|
马渝杭 (mayuhang)
|
15ms |
436 KiB |
|
209 Bytes |
2023-3-21 19:09:23 |
|
miku (阳沐珊)
|
15ms |
392 KiB |
|
202 Bytes |
2023-5-27 21:15:05 |
|
杜是贤 (dushixian)
|
15ms |
444 KiB |
|
194 Bytes |
2022-3-13 10:59:10 |
|
Nico
|
15ms |
420 KiB |
|
306 Bytes |
2023-4-16 14:46:45 |
|
Stacy (陈妍西)
|
15ms |
6.9 MiB |
|
214 Bytes |
2023-10-28 15:58:04 |
|
王晴萱
|
15ms |
7 MiB |
|
213 Bytes |
2023-7-13 14:24:36 |
|
yanglang
|
15ms |
444 KiB |
|
199 Bytes |
2022-10-22 21:15:15 |
|
11451254188 (22029-mjh)
|
15ms |
440 KiB |
|
314 Bytes |
2022-12-8 17:37:56 |
|
小忙果 (王昱杰)
|
15ms |
6.9 MiB |
|
206 Bytes |
2023-7-18 8:37:45 |
|
杨颂恩 (yangsongen)
|
15ms |
6.8 MiB |
|
239 Bytes |
2023-11-8 18:36:06 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
15ms |
384 KiB |
|
216 Bytes |
2023-1-8 13:29:12 |
|
lizirui0501
|
15ms |
432 KiB |
|
202 Bytes |
2023-3-11 17:34:40 |
|
李安桐23025
|
15ms |
7 MiB |
|
210 Bytes |
2023-12-2 18:25:45 |
|
张月恒
|
15ms |
6.9 MiB |
C++98(O2) |
227 Bytes |
2024-8-23 17:48:01 |
|
wuqi
|
15ms |
6.9 MiB |
|
326 Bytes |
2023-7-25 15:11:44 |
|
龚铭俊 (哈哈哈)
|
15ms |
6.9 MiB |
|
225 Bytes |
2023-7-23 14:37:23 |
|
(张洛诚)
|
15ms |
432 KiB |
|
278 Bytes |
2023-4-21 21:58:20 |
|
繁星 (05c35-zzm)
|
15ms |
432 KiB |
|
286 Bytes |
2022-11-13 9:46:57 |
|
新壹街校区--税崇峻 (税崇峻)
|
15ms |
6.9 MiB |
|
172 Bytes |
2023-8-17 15:11:43 |
|
经常消失 (小萝卜)
|
15ms |
508 KiB |
|
214 Bytes |
2022-3-2 21:29:01 |
|
Randy Marsh (杨子腾)
|
15ms |
392 KiB |
|
245 Bytes |
2022-9-28 19:13:22 |
|
杨在云 (yangzaiyun001)
|
15ms |
432 KiB |
|
217 Bytes |
2022-8-28 19:04:28 |
|
许律天
|
15ms |
7 MiB |
|
205 Bytes |
2023-11-25 16:56:46 |
|
huanglu
|
15ms |
7.1 MiB |
|
239 Bytes |
2023-7-15 16:40:27 |