|
11111
|
3ms |
392 KiB |
|
113 Bytes |
2022-6-30 16:33:40 |
|
赵沛喆
|
3ms |
284 KiB |
|
156 Bytes |
2022-6-12 11:12:33 |
|
1396013295
|
3ms |
312 KiB |
|
226 Bytes |
2022-8-11 21:26:02 |
|
李哲 (lizhe)
|
3ms |
384 KiB |
|
141 Bytes |
2022-5-22 19:52:03 |
|
杜俊宏
|
6ms |
384 KiB |
|
122 Bytes |
2022-6-16 18:57:03 |
|
李树崑 (lishukun)
|
6ms |
400 KiB |
|
193 Bytes |
2022-6-23 20:11:24 |
|
张玉坚 (zhangyuian)
|
6ms |
384 KiB |
|
139 Bytes |
2022-6-12 16:02:42 |
|
GYZ
|
6ms |
416 KiB |
|
144 Bytes |
2022-5-25 17:28:57 |
|
王韵淮
|
6ms |
384 KiB |
|
112 Bytes |
2022-5-31 21:33:05 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
6ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:02:52 |
|
肖添宇
|
6ms |
512 KiB |
|
193 Bytes |
2022-5-28 16:34:58 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
6ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:03:03 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
6ms |
392 KiB |
|
139 Bytes |
2022-6-25 10:03:03 |
|
李山水
|
6ms |
440 KiB |
|
144 Bytes |
2022-6-11 9:45:35 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
6ms |
392 KiB |
|
139 Bytes |
2022-6-25 10:03:02 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
6ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:03:03 |
|
ddz
|
6ms |
392 KiB |
|
152 Bytes |
2022-6-12 16:39:24 |
|
田雨杨 (tianyuyang23010)
|
6ms |
7.2 MiB |
C++98 |
138 Bytes |
2024-4-30 20:42:39 |
|
luoluonuoya
|
6ms |
428 KiB |
|
120 Bytes |
2022-8-17 12:37:52 |
|
姚宏逸
|
6ms |
384 KiB |
|
120 Bytes |
2022-5-19 16:26:16 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
6ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:03:02 |
|
22016-lyj
|
6ms |
384 KiB |
|
120 Bytes |
2023-4-5 14:43:39 |
|
lll
|
6ms |
440 KiB |
|
142 Bytes |
2023-4-29 20:58:44 |
|
关博源
|
6ms |
420 KiB |
|
139 Bytes |
2023-2-17 21:54:08 |
|
赵泳鑫 (zhaoyongxin)
|
7ms |
440 KiB |
|
177 Bytes |
2022-5-21 20:30:05 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:03:03 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:03:02 |
|
汪致卉 (wangzh)
|
7ms |
384 KiB |
|
153 Bytes |
2022-5-20 17:55:10 |
|
疯神芭芭脱丝 (李卓修)
|
7ms |
384 KiB |
|
129 Bytes |
2022-6-2 19:44:31 |
|
祝熙承 (zxc)
|
7ms |
7.3 MiB |
C++98 |
143 Bytes |
2024-4-27 16:08:11 |
|
Randy Marsh (杨子腾)
|
7ms |
440 KiB |
|
134 Bytes |
2022-6-12 9:18:53 |
|
王晨志 (wangchenzhi)
|
7ms |
432 KiB |
|
372 Bytes |
2022-7-17 4:04:08 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
392 KiB |
|
139 Bytes |
2022-6-25 10:03:02 |
|
中岛敦 (黄麒瑞)
|
7ms |
6.7 MiB |
|
142 Bytes |
2023-9-29 10:19:40 |
|
Steven (王梓丞)
|
7ms |
444 KiB |
|
128 Bytes |
2022-7-6 14:33:15 |
|
huyinuo
|
7ms |
392 KiB |
|
139 Bytes |
2022-5-21 13:56:03 |
|
ywh
|
7ms |
436 KiB |
|
129 Bytes |
2022-7-9 9:22:08 |
|
爱琴海校区-刁钲洋 (刁钲洋)
|
7ms |
440 KiB |
|
133 Bytes |
2023-2-7 19:34:16 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:03:03 |
|
没有此人 (akm)
|
7ms |
436 KiB |
|
141 Bytes |
2022-9-17 17:59:21 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:03:01 |
|
南坪校区-郑力博 (zhenglibo23003)
|
7ms |
440 KiB |
|
116 Bytes |
2023-3-13 21:28:06 |
|
(金沙天街)严皓月 (严皓月)
|
7ms |
512 KiB |
|
127 Bytes |
2023-5-8 20:09:14 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:03:02 |
|
童艺涵
|
7ms |
436 KiB |
|
124 Bytes |
2023-1-27 7:48:54 |
|
(张洛诚)
|
7ms |
440 KiB |
|
142 Bytes |
2023-4-22 21:39:06 |
|
呵 (mohaoran)
|
7ms |
512 KiB |
|
121 Bytes |
2022-6-27 21:03:14 |
|
CK (李弘毅)
|
7ms |
7.5 MiB |
C++11(O2) |
219 Bytes |
2024-4-26 20:40:07 |
|
MoonLight ( aaa)
|
7ms |
436 KiB |
|
131 Bytes |
2022-8-12 9:49:31 |
|
邹曜丞 (13983097018)
|
7ms |
7 MiB |
|
149 Bytes |
2023-7-18 10:56:48 |
|
时代一校 - 冯隆浩 (冯隆浩)
|
7ms |
436 KiB |
|
125 Bytes |
2022-9-24 19:46:56 |
|
周琪渃
|
7ms |
6.7 MiB |
|
141 Bytes |
2023-9-2 19:23:20 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
392 KiB |
|
139 Bytes |
2022-6-25 10:03:02 |
|
源著校区-宋昊成 (马冬梅)
|
7ms |
440 KiB |
|
158 Bytes |
2023-2-26 20:04:10 |
|
吴俊成 (wujuncheng)
|
7ms |
436 KiB |
|
125 Bytes |
2022-7-11 20:15:30 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
384 KiB |
|
139 Bytes |
2022-6-25 10:03:02 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
7ms |
444 KiB |
|
139 Bytes |
2022-6-25 10:02:22 |
|
执剑人罗辑 (Jasson)
|
7ms |
6.7 MiB |
|
124 Bytes |
2023-9-2 19:23:12 |
|
龙湖时代C馆-邹镇宇 (邹镇宇)
|
7ms |
384 KiB |
|
129 Bytes |
2022-9-17 16:44:23 |
|
wuqilin
|
7ms |
440 KiB |
|
141 Bytes |
2022-9-14 19:58:44 |
|
xiangsiyu
|
7ms |
440 KiB |
|
130 Bytes |
2022-6-26 9:32:19 |
|
樊竣熠 (lft1114)
|
7ms |
512 KiB |
|
117 Bytes |
2023-2-14 17:54:35 |
|
曹埊睿 (caodirui)
|
7ms |
432 KiB |
|
126 Bytes |
2023-3-25 22:46:17 |
|
文硕 (文硕1)
|
7ms |
512 KiB |
|
137 Bytes |
2023-2-2 17:20:48 |
|
ttt123
|
8ms |
432 KiB |
|
165 Bytes |
2023-4-20 14:08:46 |
|
新壹街校区-周士杰 (zsj)
|
8ms |
436 KiB |
|
148 Bytes |
2023-3-10 19:23:25 |
|
手搓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)
|
8ms |
432 KiB |
|
146 Bytes |
2023-4-15 11:57:36 |
|
谢靳骁 (XJX)
|
8ms |
432 KiB |
|
130 Bytes |
2023-3-19 18:29:44 |
|
黄梓桐 (HuangZiTong)
|
8ms |
424 KiB |
|
117 Bytes |
2022-11-13 11:45:22 |
|
孙烽轶 (sfy)
|
8ms |
440 KiB |
|
132 Bytes |
2022-10-23 11:15:43 |
|
11451254188 (22029-mjh)
|
8ms |
436 KiB |
|
131 Bytes |
2022-11-16 13:45:38 |
|
新壹街校区-杨轩懿 (杨轩懿1)
|
8ms |
6.9 MiB |
|
112 Bytes |
2023-7-24 13:49:10 |
|
吴卓轩
|
9ms |
432 KiB |
|
125 Bytes |
2022-10-5 18:19:52 |
|
廖海宇在追杀马牌痞 (liaohaiyu22031)
|
9ms |
440 KiB |
|
139 Bytes |
2023-1-8 12:10:39 |
|
芒苒忧 (廖迦南)
|
9ms |
436 KiB |
|
152 Bytes |
2022-7-22 9:07:20 |
|
张雯皓 (zhangwenhao)
|
10ms |
7.1 MiB |
|
139 Bytes |
2023-12-30 10:52:58 |
|
My name is Man (钟卓劭)
|
34ms |
536 KiB |
|
125 Bytes |
2024-3-23 21:50:14 |
|
时代校区-孔令皓 (konglinghao)
|
35ms |
532 KiB |
|
128 Bytes |
2024-4-9 8:36:10 |
|
陈诺
|
35ms |
532 KiB |
|
119 Bytes |
2024-2-5 12:13:57 |
|
¿¿¿??? (李睿瞳)
|
35ms |
764 KiB |
|
129 Bytes |
2024-1-25 23:07:03 |
|
时代2校-程俊燃 (chengjunran)
|
35ms |
532 KiB |
|
127 Bytes |
2024-3-6 18:35:52 |
|
Him神
|
36ms |
764 KiB |
|
124 Bytes |
2024-3-4 15:31:19 |
|
张瑞博
|
66ms |
9.6 MiB |
Python 3 |
83 Bytes |
2024-5-31 21:07:42 |
|
A小涂
|
90ms |
9.1 MiB |
Python 3 |
77 Bytes |
2023-6-23 20:31:36 |
|
胡澜之 (666hlz666)
|
90ms |
9.1 MiB |
Python 3 |
47 Bytes |
2023-8-28 11:16:01 |
|
任童(rentong)
|
100ms |
3.9 MiB |
Python 3 |
83 Bytes |
2023-1-31 17:22:51 |
|
majinhui
|
105ms |
3.9 MiB |
Python 3 |
48 Bytes |
2022-5-29 9:25:09 |
|
yanyuhan
|
107ms |
3.9 MiB |
Python 3 |
87 Bytes |
2022-6-12 15:19:35 |
|
zhouqihan
|
108ms |
3.9 MiB |
Python 3 |
81 Bytes |
2022-6-12 15:19:14 |
|
谭红中 (不知道)
|
118ms |
3.9 MiB |
Python 3 |
47 Bytes |
2023-1-9 16:56:57 |