|
崔欧辰
|
20ms |
6.9 MiB |
C++11 |
218 Bytes |
2024-8-20 9:26:29 |
|
张泰凌 (ztl)
|
20ms |
384 KiB |
|
138 Bytes |
2022-2-19 10:43:41 |
|
longhao
|
20ms |
384 KiB |
|
147 Bytes |
2022-1-23 11:09:19 |
|
明轩 (吕同学)
|
20ms |
392 KiB |
|
124 Bytes |
2022-8-27 14:35:34 |
|
高致远 (GZY)
|
20ms |
384 KiB |
|
165 Bytes |
2022-2-19 10:35:09 |
|
繁星 (05c35-zzm)
|
20ms |
428 KiB |
|
171 Bytes |
2022-6-5 9:33:23 |
|
张子扬
|
20ms |
384 KiB |
|
197 Bytes |
2022-1-20 19:41:40 |
|
源著校区 陈锐霖 (13983855850)
|
20ms |
7 MiB |
C++11 |
186 Bytes |
2024-8-25 11:13:45 |
|
https://www.minecraft.net/zh-hans (王振西)
|
20ms |
384 KiB |
|
158 Bytes |
2023-4-2 14:04:38 |
|
诸禹吉 (zhuyuji)
|
20ms |
384 KiB |
|
177 Bytes |
2022-1-30 11:19:04 |
|
Accepted (周芷乐)
|
20ms |
6.9 MiB |
C++14 |
151 Bytes |
2024-8-17 15:06:07 |
|
NJL (NJlL)
|
20ms |
384 KiB |
|
153 Bytes |
2022-4-10 18:07:20 |
|
逄云皓
|
20ms |
7 MiB |
C++98 |
134 Bytes |
2024-8-24 19:49:56 |
|
六 (江智昕)
|
20ms |
392 KiB |
|
162 Bytes |
2023-2-23 20:19:19 |
|
Tang
|
20ms |
424 KiB |
|
159 Bytes |
2022-6-25 9:54:30 |
|
杜是贤 (dushixian)
|
20ms |
384 KiB |
|
171 Bytes |
2022-6-26 11:31:24 |
|
LUKHE (LukeHu)
|
20ms |
384 KiB |
|
159 Bytes |
2022-1-25 18:39:50 |
|
吴俊成 (wujuncheng)
|
20ms |
436 KiB |
|
183 Bytes |
2022-7-9 22:26:07 |
|
火爆肥肠(杨弘毅) (火爆肥肠)
|
20ms |
444 KiB |
|
165 Bytes |
2022-3-10 21:17:12 |
|
金沙校区-蓝祥与 (蓝祥与)
|
20ms |
384 KiB |
|
124 Bytes |
2023-2-5 17:33:34 |
|
弹射起飞 ? 冲 ! (吴周周)
|
20ms |
6.8 MiB |
|
189 Bytes |
2023-10-14 17:11:42 |
|
何星震 (Jacob)
|
20ms |
512 KiB |
|
134 Bytes |
2023-2-6 20:17:29 |
|
时代2校-程俊燃 (chengjunran)
|
20ms |
416 KiB |
|
182 Bytes |
2023-4-25 19:06:35 |
|
爱猫人士
|
20ms |
384 KiB |
|
160 Bytes |
2022-2-19 15:48:48 |
|
赵彬鸿
|
20ms |
384 KiB |
|
156 Bytes |
2022-8-13 11:57:52 |
|
chenyifei
|
20ms |
384 KiB |
|
190 Bytes |
2022-1-20 20:03:07 |
|
https://www.minecraft.net/zh-hans (王振西)
|
20ms |
384 KiB |
|
158 Bytes |
2023-5-2 17:33:38 |
|
赵彬鸿
|
20ms |
384 KiB |
|
156 Bytes |
2022-8-13 11:57:51 |
|
赵彬鸿
|
20ms |
400 KiB |
|
156 Bytes |
2022-8-13 11:57:52 |
|
zhou_1004
|
20ms |
392 KiB |
|
173 Bytes |
2022-2-22 20:32:13 |
|
赵彬鸿
|
20ms |
416 KiB |
|
156 Bytes |
2022-8-13 11:57:50 |
|
时代一校 黄誉翔 (huang)
|
20ms |
436 KiB |
|
161 Bytes |
2022-6-30 20:57:21 |
|
wuzhenghan
|
20ms |
384 KiB |
|
159 Bytes |
2022-11-2 21:50:04 |
|
谢博文
|
20ms |
384 KiB |
|
160 Bytes |
2022-2-19 10:44:14 |
|
罗莎莎
|
20ms |
384 KiB |
|
212 Bytes |
2023-4-2 19:45:25 |
|
zhangheyi22006
|
20ms |
436 KiB |
|
141 Bytes |
2023-3-1 20:39:37 |
|
陈杰晟
|
20ms |
384 KiB |
|
232 Bytes |
2022-2-19 11:19:19 |
|
wangzhijie
|
20ms |
384 KiB |
|
192 Bytes |
2022-2-19 15:48:01 |
|
金沙校区-张斯瑒 (张斯瑒)
|
20ms |
7 MiB |
|
112 Bytes |
2023-9-24 11:12:38 |
|
朱泽晟
|
20ms |
428 KiB |
|
190 Bytes |
2022-8-6 20:12:50 |
|
六 (江智昕)
|
20ms |
388 KiB |
|
162 Bytes |
2023-2-23 20:19:25 |
|
六 (江智昕)
|
21ms |
392 KiB |
|
162 Bytes |
2023-2-23 20:19:22 |
|
孙天豪 (AliceSteven)
|
21ms |
544 KiB |
|
116 Bytes |
2022-7-27 17:16:13 |
|
heyi
|
21ms |
6.8 MiB |
C++98(O2) |
180 Bytes |
2024-8-9 13:41:14 |
|
时代一校林星宇 (lxy)
|
21ms |
392 KiB |
|
184 Bytes |
2022-10-22 19:04:11 |
|
wangruibo20xh
|
21ms |
412 KiB |
|
132 Bytes |
2022-1-20 21:10:07 |
|
tad (OP AI)
|
21ms |
6.9 MiB |
C++98 |
184 Bytes |
2024-6-25 15:21:07 |
|
wangzihang
|
21ms |
440 KiB |
|
192 Bytes |
2022-7-31 10:41:12 |
|
时代二校-焦雨齐 (Angel)
|
21ms |
6.8 MiB |
|
164 Bytes |
2023-10-14 17:12:46 |
|
赵彬鸿
|
21ms |
384 KiB |
|
156 Bytes |
2022-8-13 11:57:53 |
|
时代2校-程俊燃 (chengjunran)
|
21ms |
6.9 MiB |
|
182 Bytes |
2023-10-14 17:19:03 |
|
游智棋
|
21ms |
7.1 MiB |
C++17 |
180 Bytes |
2024-4-20 22:03:54 |
|
你爹 (郭铠嘉)
|
21ms |
392 KiB |
|
167 Bytes |
2022-2-10 18:42:50 |
|
laoyang
|
21ms |
432 KiB |
|
156 Bytes |
2022-5-5 19:55:53 |
|
况奕辛 (KYX_yyds)
|
21ms |
444 KiB |
|
166 Bytes |
2022-2-25 20:54:51 |
|
ddz
|
21ms |
384 KiB |
|
187 Bytes |
2022-3-20 17:49:22 |
|
zhuqiwei22006
|
21ms |
392 KiB |
|
266 Bytes |
2022-10-30 18:52:46 |
|
赵彬鸿
|
21ms |
392 KiB |
|
156 Bytes |
2022-8-13 11:57:53 |
|
呵 (mohaoran)
|
21ms |
384 KiB |
|
165 Bytes |
2022-11-27 17:56:42 |
|
手搓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)
|
21ms |
412 KiB |
|
162 Bytes |
2022-11-19 11:44:30 |
|
lxj
|
21ms |
420 KiB |
|
142 Bytes |
2023-5-13 21:14:51 |
|
Randy Marsh (杨子腾)
|
21ms |
384 KiB |
|
162 Bytes |
2022-1-24 9:35:29 |
|
呵 (mohaoran)
|
21ms |
384 KiB |
|
165 Bytes |
2022-11-27 17:56:44 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
21ms |
392 KiB |
|
170 Bytes |
2022-5-1 18:02:34 |
|
胡瀚文
|
21ms |
512 KiB |
|
152 Bytes |
2022-7-12 16:35:08 |
|
🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕🖕 (bro)
|
21ms |
384 KiB |
|
189 Bytes |
2022-1-24 22:58:17 |
|
六 (江智昕)
|
21ms |
392 KiB |
|
162 Bytes |
2023-2-23 20:19:23 |
|
xuniaoyin (徐袅音)
|
21ms |
6.8 MiB |
|
114 Bytes |
2023-10-1 21:50:25 |
|
xiongxinyao
|
21ms |
440 KiB |
|
182 Bytes |
2022-6-30 10:19:00 |
|
heruitong
|
21ms |
384 KiB |
|
184 Bytes |
2022-11-27 17:59:43 |
|
(张洛诚)
|
21ms |
512 KiB |
|
123 Bytes |
2023-4-7 23:36:36 |
|
_PXY_
|
21ms |
384 KiB |
|
190 Bytes |
2022-1-25 14:37:54 |
|
汤杰尧 (05c05-tjy1)
|
21ms |
436 KiB |
|
175 Bytes |
2023-2-16 15:02:55 |
|
SYC0226
|
21ms |
392 KiB |
|
169 Bytes |
2022-3-20 11:08:03 |
|
呵 (mohaoran)
|
21ms |
512 KiB |
|
165 Bytes |
2022-11-27 17:56:30 |
|
zhangxiushi
|
21ms |
440 KiB |
|
194 Bytes |
2022-1-20 19:39:56 |
|
05c35-wyf
|
21ms |
436 KiB |
|
162 Bytes |
2022-2-20 12:01:49 |
|
05c35-rjx
|
21ms |
436 KiB |
|
158 Bytes |
2022-2-22 20:01:17 |
|
谭懿轩 (yanyixuan)
|
21ms |
384 KiB |
|
172 Bytes |
2022-2-15 16:47:01 |
|
zhangyh (张育菡)
|
21ms |
428 KiB |
|
157 Bytes |
2022-6-10 22:27:29 |
|
ttz
|
21ms |
512 KiB |
|
148 Bytes |
2022-3-6 9:43:08 |
|
潘光瑞 (NB牛牛大师)
|
21ms |
520 KiB |
|
175 Bytes |
2022-8-11 11:05:28 |
|
时代2校+施皓宬 (shihaocheng)
|
21ms |
6.9 MiB |
|
170 Bytes |
2023-10-14 17:18:54 |
|
17779
|
21ms |
432 KiB |
|
186 Bytes |
2022-3-8 21:53:39 |
|
新壹街校区-郭老师-陈品烨 (陈品烨)
|
21ms |
6.8 MiB |
|
111 Bytes |
2023-10-3 9:41:10 |
|
谢延灏 (xeiyanhao---a handsome boy)
|
21ms |
440 KiB |
|
144 Bytes |
2022-2-27 18:56:06 |
|
stehpen_zuo
|
21ms |
6.9 MiB |
C++20 |
222 Bytes |
2024-5-26 15:15:06 |
|
Cristiano·Ronaldo (05c41-gmz)
|
21ms |
512 KiB |
|
168 Bytes |
2022-7-27 13:41:50 |
|
12345
|
21ms |
452 KiB |
|
111 Bytes |
2022-6-29 16:06:10 |
|
zhangyouze (张佑泽)
|
21ms |
6.8 MiB |
|
154 Bytes |
2023-10-21 23:34:41 |
|
童艺涵
|
21ms |
512 KiB |
|
155 Bytes |
2022-12-7 20:37:48 |
|
陈骏逸 (chenjunyi)
|
21ms |
440 KiB |
|
115 Bytes |
2022-8-3 16:54:48 |
|
zcx
|
21ms |
392 KiB |
|
169 Bytes |
2022-11-19 11:10:43 |
|
时代2校+涂彦迪 (tuyandi)
|
21ms |
6.8 MiB |
|
160 Bytes |
2023-10-14 17:13:38 |
|
MoonLight ( aaa)
|
21ms |
416 KiB |
|
158 Bytes |
2022-1-3 17:52:33 |
|
陈风亦 (chenfengyi)
|
21ms |
444 KiB |
|
160 Bytes |
2022-12-3 12:15:07 |
|
新壹街校区-周士杰 (zsj)
|
21ms |
384 KiB |
|
148 Bytes |
2023-3-26 17:06:13 |
|
新一街校区Jason_LuoYouZheng (罗友峥)
|
21ms |
392 KiB |
|
145 Bytes |
2022-3-10 21:51:07 |
|
凌肯 (lingken22006)
|
21ms |
432 KiB |
|
180 Bytes |
2022-7-31 21:53:48 |
|
杨瀚霖 (yanghanlin)
|
21ms |
384 KiB |
|
160 Bytes |
2022-12-31 11:02:46 |