|
tsc_ (杨悦堃)
|
- |
6.9 MiB |
|
132 Bytes |
2023-12-9 18:28:04 |
|
杨馨涵
|
- |
6.8 MiB |
|
121 Bytes |
2023-12-14 19:10:58 |
|
Him (李俊熙)
|
- |
7 MiB |
|
125 Bytes |
2024-1-7 16:05:33 |
|
李豪 (Hao_pp)
|
- |
6.8 MiB |
|
142 Bytes |
2023-11-18 0:05:02 |
|
wanghuaiying
|
- |
7 MiB |
|
129 Bytes |
2023-11-18 10:45:13 |
|
你干嘛 (唐世睿)
|
- |
7 MiB |
|
206 Bytes |
2023-11-18 10:58:26 |
|
yuqihao
|
- |
6.8 MiB |
|
137 Bytes |
2023-11-18 10:43:30 |
|
77777777
|
2ms |
6.2 MiB |
C++17 |
130 Bytes |
2024-7-26 22:33:30 |
|
张瑞博
|
2ms |
7.1 MiB |
C++11 |
125 Bytes |
2024-5-25 11:27:21 |
|
美术猫映画 (mkh)
|
2ms |
6.9 MiB |
C++98 |
132 Bytes |
2024-8-16 15:37:02 |
|
希蒙 (zhengxingya)
|
2ms |
6.8 MiB |
|
229 Bytes |
2023-10-18 17:26:22 |
|
张月恒
|
2ms |
6.9 MiB |
C++98(O2) |
123 Bytes |
2024-8-23 15:13:28 |
|
时代二校-杨林老师-黄浦轩 (黄px)
|
2ms |
6.9 MiB |
C++11 |
117 Bytes |
2024-8-18 13:16:23 |
|
胡澜之 (666hlz666)
|
2ms |
6.8 MiB |
C++11 |
130 Bytes |
2024-8-14 19:36:47 |
|
05c41-xyt
|
2ms |
384 KiB |
|
138 Bytes |
2023-3-18 19:48:26 |
|
RanHao
|
2ms |
6.7 MiB |
|
123 Bytes |
2023-10-11 18:26:34 |
|
wangziji
|
2ms |
512 KiB |
|
123 Bytes |
2023-4-15 10:29:10 |
|
Tender. (05c05-zhou)
|
2ms |
384 KiB |
|
147 Bytes |
2022-12-1 20:04:11 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:12 |
|
Error404sans (焦阳浩云)
|
2ms |
6.7 MiB |
|
129 Bytes |
2023-6-30 21:31:14 |
|
Guest
|
2ms |
7 MiB |
|
137 Bytes |
2023-11-18 10:44:38 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:10 |
|
BJ6180C8CTD (Fan)
|
2ms |
6.8 MiB |
|
136 Bytes |
2023-9-16 14:18:53 |
|
游智棋
|
2ms |
6.7 MiB |
|
126 Bytes |
2023-7-18 19:18:30 |
|
关博源
|
2ms |
384 KiB |
|
134 Bytes |
2023-5-27 10:25:21 |
|
马渝杭 (mayuhang)
|
2ms |
384 KiB |
|
122 Bytes |
2023-3-7 21:20:30 |
|
新壹街校区-杨轩懿 (杨轩懿1)
|
2ms |
6.7 MiB |
|
110 Bytes |
2023-7-25 12:30:55 |
|
没有此人 (akm)
|
2ms |
6.9 MiB |
|
164 Bytes |
2023-7-4 16:25:54 |
|
colin1112 (墙凌可)
|
2ms |
7.3 MiB |
|
165 Bytes |
2023-4-20 14:11:19 |
|
黄诗童 (hst01)
|
2ms |
384 KiB |
|
132 Bytes |
2023-3-18 20:24:23 |
|
miku (阳沐珊)
|
2ms |
6.5 MiB |
|
123 Bytes |
2023-9-19 18:01:05 |
|
姚宏逸
|
2ms |
384 KiB |
|
131 Bytes |
2022-12-1 19:17:36 |
|
何洋名 (heyangming)
|
2ms |
6.9 MiB |
|
163 Bytes |
2023-7-3 19:14:35 |
|
崔欧辰
|
2ms |
6.9 MiB |
C++11 |
206 Bytes |
2024-8-22 10:04:16 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:16 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:20 |
|
ycy
|
2ms |
384 KiB |
|
123 Bytes |
2022-12-30 17:11:47 |
|
六 (江智昕)
|
2ms |
392 KiB |
|
148 Bytes |
2023-2-9 19:28:20 |
|
何昊宇 (22016-hhy)
|
2ms |
6.7 MiB |
|
144 Bytes |
2023-8-13 10:34:37 |
|
黄梓轩 (huangzixuan)
|
2ms |
384 KiB |
|
125 Bytes |
2023-4-30 9:32:33 |
|
时代一校 - 冯隆浩 (冯隆浩)
|
2ms |
7 MiB |
|
150 Bytes |
2023-7-18 10:57:15 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:14 |
|
张玉坚 (zhangyuian)
|
2ms |
384 KiB |
|
118 Bytes |
2022-12-11 14:04:07 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:12 |
|
22029-zjs
|
2ms |
384 KiB |
|
128 Bytes |
2023-3-24 18:24:45 |
|
繁星 (05c35-zzm)
|
2ms |
384 KiB |
|
140 Bytes |
2023-4-26 19:31:40 |
|
贾博涵
|
2ms |
384 KiB |
|
161 Bytes |
2023-3-29 19:47:11 |
|
时代一校 蒋帛希 (13983392730)
|
2ms |
384 KiB |
|
135 Bytes |
2023-3-30 20:32:20 |
|
ycy
|
2ms |
384 KiB |
|
170 Bytes |
2022-12-1 16:37:29 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:16 |
|
何星震 (Jacob)
|
2ms |
384 KiB |
|
148 Bytes |
2023-3-17 21:13:16 |
|
wuqi
|
2ms |
6.7 MiB |
|
125 Bytes |
2023-8-3 14:24:31 |
|
源著校区-宋昊成 (马冬梅)
|
2ms |
384 KiB |
|
139 Bytes |
2023-4-8 18:18:56 |
|
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)
|
2ms |
384 KiB |
|
125 Bytes |
2023-4-23 21:26:33 |
|
阮 (媚狐不吃道旁李)
|
2ms |
384 KiB |
|
114 Bytes |
2023-4-25 21:22:23 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
2ms |
384 KiB |
|
121 Bytes |
2022-12-2 9:09:57 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:20 |
|
纪承熙 (jcx001)
|
2ms |
384 KiB |
|
141 Bytes |
2023-3-18 19:55:05 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
2ms |
384 KiB |
|
122 Bytes |
2023-1-8 11:14:27 |
|
邹曜丞 (13983097018)
|
2ms |
384 KiB |
|
125 Bytes |
2023-4-30 13:52:19 |
|
李彭 宋代诗人 (ljy123456)
|
2ms |
384 KiB |
|
129 Bytes |
2023-4-5 21:24:45 |
|
zhangyh (张育菡)
|
2ms |
384 KiB |
|
116 Bytes |
2023-4-29 21:02:03 |
|
六 (江智昕)
|
2ms |
428 KiB |
|
148 Bytes |
2023-2-9 19:28:14 |
|
手搓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)
|
2ms |
436 KiB |
|
119 Bytes |
2023-3-25 10:33:09 |
|
赵沛喆
|
2ms |
384 KiB |
|
98 Bytes |
2023-1-7 20:54:37 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:20 |
|
22029-lsl
|
2ms |
352 KiB |
|
117 Bytes |
2023-1-8 11:11:28 |
|
huyinuo
|
2ms |
384 KiB |
|
130 Bytes |
2022-12-1 18:47:57 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:18 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:15 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:12 |
|
何星震 (Jacob)
|
2ms |
384 KiB |
|
148 Bytes |
2023-3-2 21:39:09 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:17 |
|
李树崑 (lishukun)
|
2ms |
384 KiB |
|
190 Bytes |
2023-1-2 14:48:01 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:13 |
|
六 (江智昕)
|
2ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:17 |
|
程子杰 (05c41-czj)
|
2ms |
440 KiB |
|
167 Bytes |
2023-3-18 20:41:05 |
|
六 (江智昕)
|
3ms |
376 KiB |
|
148 Bytes |
2023-2-9 19:28:17 |
|
Randy Marsh (杨子腾)
|
3ms |
384 KiB |
|
130 Bytes |
2022-12-3 14:09:30 |
|
杜俊宏
|
3ms |
384 KiB |
|
138 Bytes |
2023-1-12 11:40:00 |
|
黄梓桐 (HuangZiTong)
|
3ms |
384 KiB |
|
114 Bytes |
2022-12-11 14:41:47 |
|
樊竣熠 (lft1114)
|
3ms |
384 KiB |
|
127 Bytes |
2023-2-8 18:04:13 |
|
六 (江智昕)
|
3ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:15 |
|
六 (江智昕)
|
3ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:16 |
|
周琪渃
|
3ms |
384 KiB |
|
137 Bytes |
2023-3-9 20:09:16 |
|
六 (江智昕)
|
3ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:19 |
|
杨瀚霖 (yanghanlin)
|
3ms |
384 KiB |
|
117 Bytes |
2022-12-30 16:59:35 |
|
六 (江智昕)
|
3ms |
428 KiB |
|
148 Bytes |
2023-2-9 19:28:11 |
|
马兴宇 (mxy01)
|
3ms |
384 KiB |
|
150 Bytes |
2023-3-18 19:54:10 |
|
朱泽晟
|
3ms |
384 KiB |
|
141 Bytes |
2022-12-10 22:37:06 |
|
六 (江智昕)
|
3ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:14 |
|
SB (mfy01)
|
3ms |
384 KiB |
|
132 Bytes |
2023-3-18 20:32:34 |
|
六 (江智昕)
|
3ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:15 |
|
六 (江智昕)
|
3ms |
384 KiB |
|
148 Bytes |
2023-2-9 19:28:14 |
|
爱琴海校区-刁钲洋 (刁钲洋)
|
3ms |
400 KiB |
|
151 Bytes |
2023-4-2 12:09:04 |
|
六 (江智昕)
|
3ms |
368 KiB |
|
148 Bytes |
2023-2-9 19:28:19 |
|
陈红恺 (chk)
|
3ms |
384 KiB |
|
125 Bytes |
2023-3-18 19:52:12 |
|
孙烽轶 (sfy)
|
3ms |
384 KiB |
|
123 Bytes |
2022-12-3 16:45:42 |
|
22029-hqh
|
3ms |
384 KiB |
|
110 Bytes |
2023-1-8 11:14:32 |
|
六 (江智昕)
|
3ms |
392 KiB |
|
148 Bytes |
2023-2-9 19:28:13 |