|
赵沛喆
|
6ms |
320 KiB |
|
119 Bytes |
2022-5-12 22:01:12 |
|
汪致卉 (wangzh)
|
7ms |
256 KiB |
|
92 Bytes |
2022-2-27 14:55:19 |
|
肖添宇
|
7ms |
384 KiB |
|
138 Bytes |
2022-4-23 17:25:00 |
|
1396013295
|
7ms |
316 KiB |
|
119 Bytes |
2022-3-4 18:27:12 |
|
杨坤霖 (steven)
|
9ms |
384 KiB |
|
105 Bytes |
2023-1-19 16:46:36 |
|
诸禹吉 (zhuyuji)
|
13ms |
384 KiB |
|
189 Bytes |
2022-5-14 15:57:42 |
|
林小博
|
13ms |
392 KiB |
|
147 Bytes |
2022-5-19 21:11:15 |
|
11111
|
13ms |
384 KiB |
|
128 Bytes |
2022-3-13 11:28:49 |
|
草||草 (陈星佑)
|
13ms |
384 KiB |
|
131 Bytes |
2022-6-1 11:13:02 |
|
杜俊宏
|
13ms |
424 KiB |
|
129 Bytes |
2022-6-9 19:08:58 |
|
李树崑 (lishukun)
|
13ms |
512 KiB |
|
155 Bytes |
2022-8-5 15:09:44 |
|
杨淇瑞 (杨淇瑞29)
|
13ms |
7.2 MiB |
C++98 |
122 Bytes |
2024-5-15 20:40:17 |
|
草||草 (陈星佑)
|
13ms |
512 KiB |
|
131 Bytes |
2022-6-1 11:13:03 |
|
Randy Marsh (杨子腾)
|
13ms |
392 KiB |
|
129 Bytes |
2022-6-12 18:51:49 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
13ms |
392 KiB |
|
123 Bytes |
2022-7-4 10:16:12 |
|
高致远 (GZY)
|
13ms |
392 KiB |
|
143 Bytes |
2022-3-12 9:00:06 |
|
赵泳鑫 (zhaoyongxin)
|
13ms |
512 KiB |
|
122 Bytes |
2022-4-28 6:55:25 |
|
xiangsiyu
|
13ms |
512 KiB |
|
178 Bytes |
2022-7-3 22:05:47 |
|
樊竣熠 (lft1114)
|
14ms |
384 KiB |
|
140 Bytes |
2022-3-1 18:32:59 |
|
huyinuo
|
14ms |
440 KiB |
|
117 Bytes |
2022-5-31 22:18:47 |
|
草||草 (陈星佑)
|
14ms |
384 KiB |
|
131 Bytes |
2022-6-1 11:13:01 |
|
何锦宸熙
|
14ms |
7.2 MiB |
C++98 |
116 Bytes |
2024-4-27 13:42:05 |
|
胡澜之 (666hlz666)
|
14ms |
6.9 MiB |
C++11 |
116 Bytes |
2024-8-17 10:05:13 |
|
张瑞博
|
14ms |
7.1 MiB |
C++11 |
115 Bytes |
2024-4-20 23:33:35 |
|
赵鑫宸 (xiaoxiao721)
|
14ms |
512 KiB |
|
142 Bytes |
2022-3-12 16:54:08 |
|
RanHao
|
14ms |
6.8 MiB |
|
195 Bytes |
2023-10-3 22:18:49 |
|
TBB (杜昊燃)
|
14ms |
440 KiB |
|
126 Bytes |
2022-4-9 23:06:51 |
|
Tang
|
14ms |
424 KiB |
|
121 Bytes |
2022-3-9 20:04:59 |
|
我推的乱破 (贺俊楠)
|
14ms |
7 MiB |
C++98 |
153 Bytes |
2024-5-5 11:34:02 |
|
LUKHE (LukeHu)
|
14ms |
448 KiB |
|
199 Bytes |
2022-4-16 17:06:02 |
|
江子墨
|
14ms |
7 MiB |
C++98 |
119 Bytes |
2024-6-27 10:04:57 |
|
罗伟杰 (13308275065)
|
14ms |
424 KiB |
|
120 Bytes |
2022-11-30 22:22:08 |
|
Guest
|
14ms |
6.8 MiB |
C++20 |
128 Bytes |
2024-8-9 18:51:45 |
|
姚宏逸
|
14ms |
384 KiB |
|
175 Bytes |
2022-3-1 17:09:38 |
|
ywh
|
14ms |
440 KiB |
|
135 Bytes |
2022-6-25 13:51:49 |
|
zhanghaoran
|
14ms |
384 KiB |
|
122 Bytes |
2022-3-9 20:12:12 |
|
周琪渃
|
14ms |
432 KiB |
|
120 Bytes |
2023-3-5 12:22:41 |
|
邹曜丞 (13983097018)
|
14ms |
6.9 MiB |
|
122 Bytes |
2023-7-12 19:05:42 |
|
MoonLight ( aaa)
|
14ms |
436 KiB |
|
127 Bytes |
2022-8-11 10:55:59 |
|
曹埊睿 (caodirui)
|
14ms |
420 KiB |
|
118 Bytes |
2023-3-24 23:02:31 |
|
22029-lyh
|
15ms |
444 KiB |
|
123 Bytes |
2022-12-3 10:00:52 |
|
疯神芭芭脱丝 (李卓修)
|
15ms |
436 KiB |
|
122 Bytes |
2022-7-12 11:43:37 |
|
源著校区-宋昊成 (马冬梅)
|
15ms |
440 KiB |
|
108 Bytes |
2023-2-26 19:50:19 |
|
colin1112 (墙凌可)
|
15ms |
6.7 MiB |
|
195 Bytes |
2023-9-7 19:08:43 |
|
罗翌珂 (dangdang)
|
15ms |
436 KiB |
|
127 Bytes |
2022-9-30 17:32:02 |
|
dmh (丁墨涵)
|
15ms |
444 KiB |
|
118 Bytes |
2022-3-26 14:41:24 |
|
希蒙 (zhengxingya)
|
15ms |
6.8 MiB |
|
208 Bytes |
2023-10-18 17:18:34 |
|
王祎辰 (wangyichen)
|
16ms |
420 KiB |
|
123 Bytes |
2023-3-26 21:17:50 |
|
杜是贤 (dushixian)
|
16ms |
428 KiB |
|
129 Bytes |
2023-5-28 10:47:20 |
|
李彭 宋代诗人 (ljy123456)
|
16ms |
512 KiB |
|
123 Bytes |
2023-4-6 16:17:06 |
|
王晨志 (wangchenzhi)
|
16ms |
444 KiB |
|
340 Bytes |
2022-7-22 15:03:04 |
|
yangbinyu
|
16ms |
432 KiB |
|
146 Bytes |
2022-10-18 10:04:34 |
|
zlx (xiao)
|
16ms |
436 KiB |
|
140 Bytes |
2022-11-26 21:23:13 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
16ms |
512 KiB |
|
122 Bytes |
2022-11-25 11:52:28 |
|
新壹街校区-杨轩懿 (杨轩懿1)
|
16ms |
6.9 MiB |
|
103 Bytes |
2023-7-24 13:53:59 |
|
马渝杭 (mayuhang)
|
16ms |
436 KiB |
|
116 Bytes |
2023-3-6 19:19:13 |
|
朱泽晟
|
16ms |
436 KiB |
|
96 Bytes |
2022-12-10 22:23:38 |
|
11111
|
16ms |
444 KiB |
|
128 Bytes |
2022-3-13 11:28:49 |
|
金沙校区-蓝祥与 (蓝祥与)
|
17ms |
6.9 MiB |
|
117 Bytes |
2023-8-10 17:21:56 |
|
Error404sans (焦阳浩云)
|
17ms |
6.9 MiB |
|
116 Bytes |
2023-7-12 19:05:04 |
|
孙烽轶 (sfy)
|
17ms |
436 KiB |
|
115 Bytes |
2022-10-27 16:37:59 |
|
手搓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 |
6.9 MiB |
|
110 Bytes |
2023-8-9 17:14:00 |
|
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)
|
18ms |
8.1 MiB |
|
162 Bytes |
2023-8-23 18:08:26 |
|
ysf.wlanwq.ZJSWL 1922~1991 (韦舒豪)
|
23ms |
6.8 MiB |
|
181 Bytes |
2023-12-2 9:18:47 |
|
梁家畅
|
54ms |
768 KiB |
C++11(O2) |
140 Bytes |
2024-11-23 19:56:09 |
|
爱琴海校区-程墨竹-江政含 (jiangzhenghan)
|
66ms |
764 KiB |
|
116 Bytes |
2024-4-2 19:17:18 |
|
没有此人 (akm)
|
67ms |
764 KiB |
|
122 Bytes |
2024-3-13 22:06:00 |
|
cainuoyan
|
70ms |
536 KiB |
|
104 Bytes |
2024-3-9 15:41:56 |
|
时代一校-赵彦博 (zyb)
|
70ms |
768 KiB |
|
142 Bytes |
2024-3-14 21:18:32 |
|
唐一航
|
72ms |
552 KiB |
C++11 |
116 Bytes |
2024-9-29 20:31:38 |
|
马化腾 * 4 (zhanlan)
|
73ms |
764 KiB |
C++11 |
103 Bytes |
2024-9-22 18:55:07 |
|
majinhui
|
197ms |
4 MiB |
Python 3 |
33 Bytes |
2022-8-6 15:18:00 |
|
梨冻亿 (wiueh)
|
208ms |
3.9 MiB |
Python 3 |
284 Bytes |
2022-4-4 10:07:01 |
|
爱琴海校区-刁钲洋 (刁钲洋)
|
212ms |
4 MiB |
Python 3 |
32 Bytes |
2022-3-12 12:16:26 |
|
火爆肥肠(杨弘毅) (火爆肥肠)
|
226ms |
3.9 MiB |
Python 3 |
33 Bytes |
2022-2-27 11:56:10 |