|
郑之策
|
12ms |
384 KiB |
|
190 Bytes |
2022-5-15 11:34:21 |
|
梅子楠 (22016-mzn)
|
12ms |
400 KiB |
|
183 Bytes |
2023-5-25 21:24:54 |
|
曾御城(现用名) (Jason)
|
12ms |
392 KiB |
|
171 Bytes |
2022-1-26 17:00:32 |
|
朱老师 (zyp)
|
12ms |
384 KiB |
|
193 Bytes |
2022-10-30 18:41:16 |
|
赵泳鑫 (zhaoyongxin)
|
12ms |
512 KiB |
|
207 Bytes |
2022-6-6 20:51:03 |
|
时代二校-焦雨齐 (Angel)
|
12ms |
6.9 MiB |
|
233 Bytes |
2023-10-14 18:04:41 |
|
欧俊阳
|
12ms |
6.9 MiB |
|
233 Bytes |
2023-11-4 16:22:17 |
|
郑之策
|
12ms |
512 KiB |
|
190 Bytes |
2022-5-15 11:34:19 |
|
郑之策
|
12ms |
392 KiB |
|
190 Bytes |
2022-5-15 11:33:07 |
|
1396013295
|
12ms |
384 KiB |
|
217 Bytes |
2022-1-25 16:52:47 |
|
郑之策
|
12ms |
392 KiB |
|
190 Bytes |
2022-5-15 11:34:20 |
|
yucaoluyang22006
|
12ms |
384 KiB |
|
200 Bytes |
2023-2-26 11:59:22 |
|
汪致卉 (wangzh)
|
12ms |
512 KiB |
|
270 Bytes |
2022-2-18 18:27:30 |
|
赵鑫宸 (xiaoxiao721)
|
12ms |
512 KiB |
|
217 Bytes |
2022-3-12 17:26:57 |
|
陈风亦 (chenfengyi)
|
12ms |
412 KiB |
|
221 Bytes |
2022-12-3 13:46:46 |
|
李树崑 (lishukun)
|
12ms |
384 KiB |
|
238 Bytes |
2022-6-25 20:35:28 |
|
MacrozClick_ (蒋淞霖)
|
12ms |
392 KiB |
|
172 Bytes |
2022-5-15 11:28:04 |
|
luosifu22006
|
12ms |
384 KiB |
|
207 Bytes |
2022-10-30 18:41:13 |
|
谢佳辰
|
12ms |
384 KiB |
|
184 Bytes |
2022-5-15 11:27:23 |
|
甄一阳 (22016-zyy)
|
12ms |
436 KiB |
|
153 Bytes |
2023-2-26 11:35:30 |
|
郑之策
|
12ms |
412 KiB |
|
190 Bytes |
2022-5-15 11:34:19 |
|
疯神芭芭脱丝 (李卓修)
|
12ms |
440 KiB |
|
207 Bytes |
2022-7-12 11:34:51 |
|
樊竣熠 (lft1114)
|
12ms |
436 KiB |
|
187 Bytes |
2022-2-28 18:51:18 |
|
谢博文
|
12ms |
384 KiB |
|
186 Bytes |
2022-6-25 11:19:38 |
|
﹢•﹡🕉☽✝⚜Halanfus⚜✝☾⚔⚝﹡﹢• (黄子瑞)
|
12ms |
6.9 MiB |
C++98 |
144 Bytes |
2024-8-20 13:22:34 |
|
郑之策
|
12ms |
384 KiB |
|
190 Bytes |
2022-5-15 11:34:06 |
|
嘉宝 (王淳恺)
|
12ms |
6.9 MiB |
C++98 |
182 Bytes |
2024-6-1 14:33:42 |
|
李金珂
|
13ms |
444 KiB |
|
144 Bytes |
2022-8-12 13:52:46 |
|
dmh (丁墨涵)
|
13ms |
512 KiB |
|
146 Bytes |
2022-2-26 13:28:37 |
|
郑之策
|
13ms |
420 KiB |
|
190 Bytes |
2022-5-15 11:34:07 |
|
zcx
|
13ms |
512 KiB |
|
226 Bytes |
2023-5-15 19:48:11 |
|
我推的乱破 (贺俊楠)
|
13ms |
392 KiB |
|
151 Bytes |
2023-4-13 20:11:57 |
|
王晨志 (wangchenzhi)
|
13ms |
384 KiB |
|
431 Bytes |
2022-2-1 1:57:20 |
|
某某 (xuhaotian)
|
13ms |
384 KiB |
|
191 Bytes |
2022-2-28 21:16:44 |
|
(张洛诚)
|
13ms |
384 KiB |
|
272 Bytes |
2023-4-16 21:24:31 |
|
偽艺術家 (chenyanchi22006)
|
13ms |
384 KiB |
|
187 Bytes |
2022-10-30 18:43:06 |
|
陈风亦 (chenfengyi)
|
13ms |
384 KiB |
|
221 Bytes |
2022-12-3 13:46:50 |
|
22016-yzq
|
13ms |
392 KiB |
|
186 Bytes |
2023-2-26 11:37:23 |
|
05c05-hzy
|
13ms |
420 KiB |
|
201 Bytes |
2023-2-26 11:58:01 |
|
jdy
|
13ms |
400 KiB |
|
178 Bytes |
2022-12-3 13:09:04 |
|
luoluonuoya
|
13ms |
432 KiB |
|
242 Bytes |
2022-4-26 18:45:53 |
|
scallway
|
13ms |
384 KiB |
|
236 Bytes |
2023-3-25 14:12:44 |
|
Yuan (Zongzi1)
|
13ms |
6.6 MiB |
C++17(O2) |
181 Bytes |
2024-7-27 19:33:24 |
|
12345
|
13ms |
512 KiB |
|
219 Bytes |
2022-6-29 16:05:21 |
|
李山水
|
13ms |
436 KiB |
|
224 Bytes |
2022-7-30 11:47:59 |
|
李禹衡 (liyuheng22006)
|
13ms |
384 KiB |
|
178 Bytes |
2022-10-30 18:41:14 |
|
蒋青峰
|
13ms |
452 KiB |
|
165 Bytes |
2023-5-7 20:48:47 |
|
watcc
|
13ms |
512 KiB |
|
183 Bytes |
2023-5-24 19:15:09 |
|
陈雨泽1
|
13ms |
512 KiB |
|
181 Bytes |
2023-4-22 10:01:54 |
|
大马猴 (周琳竣)
|
13ms |
6.9 MiB |
|
161 Bytes |
2023-8-15 11:00:34 |
|
LUKHE (LukeHu)
|
13ms |
512 KiB |
|
190 Bytes |
2022-3-18 20:21:53 |
|
芒苒忧 (廖迦南)
|
13ms |
440 KiB |
|
256 Bytes |
2022-3-1 19:26:26 |
|
zhuqiwei22006
|
13ms |
440 KiB |
|
171 Bytes |
2022-10-30 18:42:23 |
|
RanHao
|
13ms |
8.1 MiB |
|
177 Bytes |
2023-8-25 17:03:00 |
|
刘致言
|
13ms |
464 KiB |
|
189 Bytes |
2022-10-21 18:40:32 |
|
唐良瑞 (22016-tlr01)
|
13ms |
512 KiB |
|
198 Bytes |
2023-2-26 12:06:16 |
|
林小博
|
13ms |
440 KiB |
|
232 Bytes |
2022-12-3 13:54:20 |
|
陈风亦 (chenfengyi)
|
13ms |
384 KiB |
|
221 Bytes |
2022-12-3 13:46:50 |
|
陈风亦 (chenfengyi)
|
13ms |
392 KiB |
|
221 Bytes |
2022-12-3 13:46:47 |
|
xiangsiyu
|
13ms |
520 KiB |
|
150 Bytes |
2022-7-12 22:04:31 |
|
许炜铭 (xuweiming)
|
13ms |
7.2 MiB |
|
177 Bytes |
2023-7-18 13:51:40 |
|
没有此人 (akm)
|
13ms |
392 KiB |
|
218 Bytes |
2023-4-22 18:20:28 |
|
陈风亦 (chenfengyi)
|
13ms |
384 KiB |
|
221 Bytes |
2022-12-3 13:46:51 |
|
胡宸华 (huchenhua)
|
13ms |
6.9 MiB |
|
189 Bytes |
2023-8-20 21:07:51 |
|
新壹街校区-杨轩懿 (杨轩懿1)
|
13ms |
6.7 MiB |
|
139 Bytes |
2023-8-28 9:40:23 |
|
陈风亦 (chenfengyi)
|
13ms |
420 KiB |
|
221 Bytes |
2022-12-3 13:46:48 |
|
新壹街校区-陈琬舒 (空空大师)
|
13ms |
6.9 MiB |
|
189 Bytes |
2023-7-27 14:58:04 |
|
付博plus
|
13ms |
428 KiB |
|
140 Bytes |
2022-10-22 13:05:25 |
|
Tender. (05c05-zhou)
|
13ms |
6.7 MiB |
|
175 Bytes |
2023-8-25 10:40:42 |
|
陈风亦 (chenfengyi)
|
13ms |
392 KiB |
|
221 Bytes |
2022-12-3 13:46:49 |
|
时代二校-陈天成 (鸭缩毛巾)
|
13ms |
6.8 MiB |
|
137 Bytes |
2023-10-21 15:09:05 |
|
86想要钱 (twt)
|
13ms |
396 KiB |
|
199 Bytes |
2023-1-8 19:14:45 |
|
22016-lyj
|
13ms |
512 KiB |
|
171 Bytes |
2023-2-26 12:22:53 |
|
徐康景 (dcm)
|
13ms |
384 KiB |
|
184 Bytes |
2022-12-10 9:23:38 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
13ms |
384 KiB |
|
193 Bytes |
2022-9-25 17:04:50 |
|
陈风亦 (chenfengyi)
|
13ms |
392 KiB |
|
221 Bytes |
2022-12-3 13:46:52 |
|
陈风亦 (chenfengyi)
|
13ms |
384 KiB |
|
221 Bytes |
2022-12-3 11:46:36 |
|
陈风亦 (chenfengyi)
|
13ms |
392 KiB |
|
221 Bytes |
2022-12-3 13:46:46 |
|
陈风亦 (chenfengyi)
|
13ms |
392 KiB |
|
221 Bytes |
2022-12-3 13:46:51 |
|
10255
|
13ms |
444 KiB |
|
180 Bytes |
2022-11-25 20:06:06 |
|
王义苇 (wangyiwei)
|
13ms |
6.7 MiB |
|
210 Bytes |
2023-6-11 15:21:07 |
|
陈风亦 (chenfengyi)
|
13ms |
384 KiB |
|
221 Bytes |
2022-12-3 13:46:51 |
|
zlx (xiao)
|
13ms |
432 KiB |
|
253 Bytes |
2022-11-26 19:57:08 |
|
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 |
|
263 Bytes |
2023-8-25 15:07:55 |
|
陈风亦 (chenfengyi)
|
14ms |
392 KiB |
|
221 Bytes |
2022-12-3 13:46:49 |
|
我推的乱破 (贺俊楠)
|
14ms |
6.9 MiB |
|
240 Bytes |
2023-10-22 18:45:04 |
|
钟京润
|
14ms |
420 KiB |
|
221 Bytes |
2022-12-3 13:54:46 |
|
新壹街校区-周士杰 (zsj)
|
14ms |
7.4 MiB |
|
182 Bytes |
2023-7-18 17:59:31 |
|
CYT
|
14ms |
432 KiB |
|
138 Bytes |
2023-3-22 12:05:17 |
|
曾龙兮
|
14ms |
436 KiB |
|
192 Bytes |
2023-1-8 19:14:13 |
|
zhangheyi22006
|
14ms |
384 KiB |
|
206 Bytes |
2022-11-7 20:24:21 |
|
朱老师 (zyp)
|
14ms |
432 KiB |
|
228 Bytes |
2022-10-1 19:59:51 |
|
zhm123
|
14ms |
512 KiB |
|
175 Bytes |
2023-1-13 18:07:15 |
|
陈风亦 (chenfengyi)
|
14ms |
384 KiB |
|
221 Bytes |
2022-12-3 13:46:46 |
|
时代校区-刘臣原 (微笑王子)
|
14ms |
440 KiB |
|
145 Bytes |
2022-10-17 20:02:12 |
|
手搓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)
|
14ms |
424 KiB |
|
174 Bytes |
2023-5-12 19:31:43 |
|
jdy
|
14ms |
440 KiB |
|
255 Bytes |
2022-12-3 13:52:41 |
|
yucaoluyang22006
|
14ms |
432 KiB |
|
200 Bytes |
2023-3-5 9:57:25 |
|
胡澜之 (666hlz666)
|
14ms |
6.7 MiB |
|
162 Bytes |
2023-8-25 10:39:49 |
|
周琪渃
|
14ms |
384 KiB |
|
255 Bytes |
2023-1-6 14:50:09 |