|
向南地
|
16ms |
420 KiB |
|
315 Bytes |
2022-2-19 16:14:24 |
|
六 (江智昕)
|
16ms |
512 KiB |
|
370 Bytes |
2022-12-30 19:05:06 |
|
zcx
|
16ms |
444 KiB |
|
195 Bytes |
2023-2-18 9:40:13 |
|
0721 (龙浩恩)
|
16ms |
6.8 MiB |
|
254 Bytes |
2023-11-3 23:29:18 |
|
王玺懿 (wxy)
|
16ms |
428 KiB |
|
198 Bytes |
2022-7-28 10:30:44 |
|
朱老师 (zyp)
|
16ms |
400 KiB |
|
225 Bytes |
2022-10-20 20:22:15 |
|
曾龙兮
|
16ms |
420 KiB |
|
232 Bytes |
2022-9-11 20:13:06 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:05:01 |
|
在煎鱼的肖大总铳 (肖宇航)
|
16ms |
7 MiB |
|
251 Bytes |
2023-9-24 10:48:20 |
|
德克萨斯做的到吗 (liyangbao)
|
16ms |
436 KiB |
|
204 Bytes |
2022-10-31 22:36:11 |
|
陈杰晟
|
16ms |
512 KiB |
|
228 Bytes |
2022-2-18 13:30:28 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:04:51 |
|
向俊熙 (xiangjunxi23003)
|
16ms |
444 KiB |
|
207 Bytes |
2023-3-1 17:09:30 |
|
新一街校区Jason_LuoYouZheng (罗友峥)
|
16ms |
392 KiB |
|
207 Bytes |
2023-3-13 21:06:20 |
|
王祎辰 (wangyichen)
|
16ms |
384 KiB |
|
176 Bytes |
2023-4-1 18:50:19 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:05:12 |
|
龙思颖 (lsy)
|
16ms |
384 KiB |
|
267 Bytes |
2023-3-7 20:28:05 |
|
11451254188 (22029-mjh)
|
16ms |
384 KiB |
|
194 Bytes |
2022-11-28 21:56:57 |
|
scallway1
|
16ms |
512 KiB |
|
208 Bytes |
2023-2-26 15:22:41 |
|
邹曜丞 (13983097018)
|
16ms |
432 KiB |
|
160 Bytes |
2023-4-15 20:30:15 |
|
余晨浩 (yuchenhao)
|
16ms |
6.7 MiB |
|
158 Bytes |
2023-8-31 14:48:56 |
|
彭崇鑫
|
16ms |
388 KiB |
|
311 Bytes |
2022-10-6 22:56:46 |
|
六 (江智昕)
|
16ms |
392 KiB |
|
370 Bytes |
2022-12-30 19:04:50 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:04:53 |
|
赵启程 (赵启程1)
|
16ms |
384 KiB |
|
258 Bytes |
2023-3-9 19:14:51 |
|
六 (江智昕)
|
16ms |
392 KiB |
|
370 Bytes |
2022-12-30 19:04:49 |
|
余晨浩 (yuchenhao)
|
16ms |
6.7 MiB |
|
172 Bytes |
2023-8-31 14:38:39 |
|
六 (江智昕)
|
16ms |
392 KiB |
|
370 Bytes |
2022-12-30 19:04:48 |
|
张峻熙
|
16ms |
392 KiB |
|
213 Bytes |
2022-10-31 20:26:37 |
|
余晨浩 (yuchenhao)
|
16ms |
6.7 MiB |
|
158 Bytes |
2023-8-31 14:49:32 |
|
ycy
|
16ms |
384 KiB |
|
308 Bytes |
2022-9-20 21:59:59 |
|
余多多29
|
16ms |
512 KiB |
|
241 Bytes |
2023-4-17 22:31:49 |
|
我全家SB!!! 我没母!!! (baijinlin)
|
16ms |
440 KiB |
|
173 Bytes |
2023-2-25 18:29:19 |
|
李禹衡 (liyuheng22006)
|
16ms |
384 KiB |
|
239 Bytes |
2022-10-25 19:42:06 |
|
10255
|
16ms |
384 KiB |
|
207 Bytes |
2022-12-25 15:25:57 |
|
§范马 · 猫羽雫™☠ (lixiaoxiang22031)
|
16ms |
384 KiB |
|
209 Bytes |
2022-10-16 10:38:52 |
|
邬文博 (wwb)
|
16ms |
392 KiB |
|
142 Bytes |
2023-5-15 20:55:19 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:05:03 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
16ms |
392 KiB |
|
197 Bytes |
2022-10-16 10:35:31 |
|
scallway1
|
16ms |
428 KiB |
|
238 Bytes |
2023-3-7 20:26:51 |
|
六 (江智昕)
|
16ms |
388 KiB |
|
370 Bytes |
2022-12-30 19:05:00 |
|
牟淳雅
|
16ms |
6.8 MiB |
|
210 Bytes |
2023-7-18 21:51:49 |
|
444444444 (唐跃元)
|
16ms |
6.7 MiB |
|
187 Bytes |
2023-8-24 16:02:13 |
|
huangkaixin
|
16ms |
384 KiB |
|
166 Bytes |
2022-9-3 16:04:13 |
|
§范马 · 猫羽雫™☠ (lixiaoxiang22031)
|
16ms |
384 KiB |
|
209 Bytes |
2022-10-16 10:38:53 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:05:07 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:05:11 |
|
§范马 · 猫羽雫™☠ (lixiaoxiang22031)
|
16ms |
384 KiB |
|
209 Bytes |
2022-10-16 10:38:53 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:05:07 |
|
我全家SB!!! 我没母!!! (baijinlin)
|
16ms |
384 KiB |
|
173 Bytes |
2023-2-25 18:29:21 |
|
余晨浩 (yuchenhao)
|
16ms |
7 MiB |
|
158 Bytes |
2023-8-31 14:51:41 |
|
yuandingyang22031
|
16ms |
392 KiB |
|
204 Bytes |
2022-10-16 10:37:00 |
|
SHY20091224
|
16ms |
392 KiB |
|
188 Bytes |
2022-8-7 11:48:14 |
|
孙天豪 (AliceSteven)
|
16ms |
444 KiB |
|
132 Bytes |
2022-7-25 19:47:50 |
|
§范马 · 猫羽雫™☠ (lixiaoxiang22031)
|
16ms |
384 KiB |
|
209 Bytes |
2022-10-16 10:38:54 |
|
cupy战士 (05c05-dkf)
|
16ms |
416 KiB |
|
220 Bytes |
2023-4-14 21:42:21 |
|
黄立信
|
16ms |
6.8 MiB |
|
136 Bytes |
2023-10-10 22:05:32 |
|
dengduxi
|
16ms |
464 KiB |
|
391 Bytes |
2022-11-13 14:09:30 |
|
tsc_ (杨悦堃)
|
16ms |
512 KiB |
|
211 Bytes |
2023-5-14 11:11:16 |
|
时代1校-杨宇轩 (杨宇轩)
|
16ms |
6.9 MiB |
|
240 Bytes |
2023-8-21 12:29:31 |
|
小翔的粉丝
|
16ms |
384 KiB |
|
208 Bytes |
2023-1-10 11:31:54 |
|
缥 (王硕2012)
|
16ms |
440 KiB |
|
275 Bytes |
2022-10-3 9:40:41 |
|
何星震 (Jacob)
|
16ms |
436 KiB |
|
193 Bytes |
2022-10-8 20:46:29 |
|
许嘉恩 (xje22031)
|
16ms |
400 KiB |
|
160 Bytes |
2022-10-16 10:38:13 |
|
六 (江智昕)
|
16ms |
504 KiB |
|
370 Bytes |
2022-12-30 19:05:10 |
|
wangyueru
|
16ms |
512 KiB |
|
236 Bytes |
2022-9-17 19:26:48 |
|
朱老师 (zyp)
|
16ms |
512 KiB |
|
222 Bytes |
2022-10-16 10:33:18 |
|
余晨浩 (yuchenhao)
|
16ms |
6.8 MiB |
|
158 Bytes |
2023-8-31 14:50:00 |
|
余晨浩 (yuchenhao)
|
16ms |
6.7 MiB |
|
158 Bytes |
2023-8-31 14:55:19 |
|
伍芷函
|
16ms |
436 KiB |
|
244 Bytes |
2022-9-5 22:05:09 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:05:08 |
|
手搓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)
|
16ms |
436 KiB |
|
193 Bytes |
2023-5-12 20:05:58 |
|
§范马 · 猫羽雫™☠ (lixiaoxiang22031)
|
16ms |
388 KiB |
|
209 Bytes |
2022-10-16 10:38:55 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:04:52 |
|
纪承熙 (jcx001)
|
16ms |
6.5 MiB |
|
135 Bytes |
2023-6-3 20:07:48 |
|
六 (江智昕)
|
16ms |
512 KiB |
|
370 Bytes |
2022-12-30 19:05:00 |
|
明哲瀚 (18580067605)
|
16ms |
384 KiB |
|
214 Bytes |
2022-9-29 21:08:09 |
|
六 (江智昕)
|
16ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:04:39 |
|
hyh22031
|
16ms |
384 KiB |
|
194 Bytes |
2022-10-20 20:27:48 |
|
§范马 · 猫羽雫™☠ (lixiaoxiang22031)
|
16ms |
384 KiB |
|
209 Bytes |
2022-10-16 10:38:55 |
|
SHY20091224
|
16ms |
384 KiB |
|
188 Bytes |
2022-8-7 11:48:13 |
|
ych
|
16ms |
6.8 MiB |
|
256 Bytes |
2023-10-3 13:38:47 |
|
chenrunxiang22031
|
16ms |
384 KiB |
|
205 Bytes |
2022-10-16 10:38:00 |
|
李山水
|
17ms |
432 KiB |
|
367 Bytes |
2022-8-28 19:36:31 |
|
zhangheyi22006
|
17ms |
440 KiB |
|
206 Bytes |
2022-12-4 12:23:40 |
|
§范马 · 猫羽雫™☠ (lixiaoxiang22031)
|
17ms |
392 KiB |
|
209 Bytes |
2022-10-16 10:38:51 |
|
除了我全部人都是SB (车涌樯)
|
17ms |
7 MiB |
|
189 Bytes |
2023-7-19 14:12:30 |
|
xyc (谢雨宸)
|
17ms |
384 KiB |
|
179 Bytes |
2022-12-11 11:02:48 |
|
关博源
|
17ms |
512 KiB |
|
154 Bytes |
2023-2-24 18:23:43 |
|
曲奇饼干
|
17ms |
384 KiB |
|
219 Bytes |
2022-12-11 11:03:52 |
|
蒲梓勋 (puzixun)
|
17ms |
436 KiB |
|
231 Bytes |
2022-7-13 19:17:57 |
|
§范马 · 猫羽雫™☠ (lixiaoxiang22031)
|
17ms |
420 KiB |
|
209 Bytes |
2022-10-16 10:38:54 |
|
六 (江智昕)
|
17ms |
392 KiB |
|
370 Bytes |
2022-12-30 19:04:49 |
|
六 (江智昕)
|
17ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:04:52 |
|
六 (江智昕)
|
17ms |
392 KiB |
|
370 Bytes |
2022-12-30 19:04:50 |
|
六 (江智昕)
|
17ms |
384 KiB |
|
370 Bytes |
2022-12-30 19:04:54 |
|
pandap&a王皓宸 (WANGHAOCHEN)
|
17ms |
512 KiB |
|
202 Bytes |
2022-11-8 17:28:12 |
|
炸鱼4000+ (dxc)
|
17ms |
384 KiB |
|
288 Bytes |
2023-2-11 20:29:52 |
|
余晨浩 (yuchenhao)
|
17ms |
6.7 MiB |
|
158 Bytes |
2023-8-31 14:55:06 |
|
scallway1
|
17ms |
6.7 MiB |
|
144 Bytes |
2023-6-9 15:06:50 |