|
易锦程 (sky)
|
13ms |
7.1 MiB |
|
587 Bytes |
2023-12-17 15:31:47 |
|
陈骏洋
|
13ms |
384 KiB |
|
428 Bytes |
2022-6-5 18:49:57 |
|
郭人瑀作业号
|
13ms |
384 KiB |
|
310 Bytes |
2022-8-2 16:50:37 |
|
郑之策
|
13ms |
384 KiB |
|
376 Bytes |
2022-6-5 11:13:14 |
|
1396013295
|
13ms |
384 KiB |
|
569 Bytes |
2022-1-23 17:19:05 |
|
炼狱杏寿郎(的粉粉粉粉粉) (sheijiangwohh)
|
13ms |
384 KiB |
|
343 Bytes |
2022-2-15 15:52:03 |
|
王祎辰 (wangyichen)
|
13ms |
384 KiB |
|
379 Bytes |
2023-3-4 20:11:23 |
|
B747 (TSK)
|
13ms |
6.6 MiB |
C++98 |
492 Bytes |
2024-7-9 16:58:20 |
|
luosifu22006
|
13ms |
384 KiB |
|
293 Bytes |
2022-8-19 17:48:47 |
|
hxb
|
13ms |
428 KiB |
|
285 Bytes |
2023-3-24 17:59:42 |
|
炼狱杏寿郎(的粉粉粉粉粉) (sheijiangwohh)
|
13ms |
384 KiB |
|
343 Bytes |
2022-2-15 15:52:03 |
|
德意志第三帝国 (陈远桥)
|
13ms |
504 KiB |
|
428 Bytes |
2022-6-5 19:04:46 |
|
熊奕博 (Mothefuck)
|
13ms |
408 KiB |
|
371 Bytes |
2023-2-26 18:45:12 |
|
炼狱杏寿郎(的粉粉粉粉粉) (sheijiangwohh)
|
13ms |
384 KiB |
|
343 Bytes |
2022-2-15 15:52:03 |
|
lch (凌昌瀚)
|
13ms |
436 KiB |
|
387 Bytes |
2022-7-7 22:16:39 |
|
xuniaoyin (徐袅音)
|
13ms |
384 KiB |
|
304 Bytes |
2023-5-17 20:04:44 |
|
炼狱杏寿郎(的粉粉粉粉粉) (sheijiangwohh)
|
13ms |
392 KiB |
|
343 Bytes |
2022-2-15 15:52:03 |
|
陈风亦 (chenfengyi)
|
13ms |
424 KiB |
|
290 Bytes |
2022-7-2 14:17:15 |
|
时代一校-赵彦博 (zyb)
|
13ms |
436 KiB |
|
316 Bytes |
2023-2-1 14:39:57 |
|
ywh
|
13ms |
392 KiB |
|
325 Bytes |
2022-6-18 20:03:20 |
|
坤坤荔枝小黑子 (zhonghaotian22006)
|
13ms |
384 KiB |
|
346 Bytes |
2022-7-2 18:21:23 |
|
偽艺術家 (chenyanchi22006)
|
13ms |
384 KiB |
|
260 Bytes |
2022-8-13 15:51:18 |
|
郑尧 (zhengyao)
|
14ms |
392 KiB |
|
317 Bytes |
2023-3-4 20:09:48 |
|
杨坤霖 (steven)
|
14ms |
384 KiB |
|
383 Bytes |
2023-5-21 16:50:57 |
|
源著校区-老师:刘扬-张博涵 (张博涵)
|
14ms |
7.2 MiB |
C++11 |
345 Bytes |
2024-5-3 23:27:24 |
|
teacher_ren
|
14ms |
384 KiB |
|
362 Bytes |
2022-6-5 18:49:38 |
|
MacrozClick_ (蒋淞霖)
|
14ms |
392 KiB |
|
326 Bytes |
2022-7-2 9:17:07 |
|
文硕 (文硕1)
|
14ms |
440 KiB |
|
372 Bytes |
2022-7-12 11:50:42 |
|
jinitaimei
|
14ms |
384 KiB |
|
295 Bytes |
2022-12-4 17:59:29 |
|
江泽栋
|
14ms |
6.7 MiB |
C++11 |
260 Bytes |
2024-8-1 10:34:14 |
|
zhangheyi22006
|
14ms |
384 KiB |
|
291 Bytes |
2022-8-14 17:17:42 |
|
xmw318046
|
14ms |
6.5 MiB |
C++98 |
335 Bytes |
2024-7-5 14:42:22 |
|
(张洛诚)
|
14ms |
400 KiB |
|
437 Bytes |
2023-4-18 20:24:24 |
|
时代1校-杨宇轩 (杨宇轩)
|
14ms |
440 KiB |
|
312 Bytes |
2023-5-18 20:24:45 |
|
luoluonuoya
|
14ms |
512 KiB |
|
372 Bytes |
2022-8-17 13:13:35 |
|
向南地
|
14ms |
512 KiB |
|
406 Bytes |
2023-4-29 17:58:03 |
|
zhanghaoran
|
14ms |
432 KiB |
|
269 Bytes |
2022-2-15 15:58:10 |
|
朱老师 (zyp)
|
14ms |
436 KiB |
|
352 Bytes |
2022-7-31 16:21:20 |
|
12345
|
14ms |
392 KiB |
|
343 Bytes |
2022-2-15 15:10:26 |
|
灶门炭治郎:火之神神乐
|
14ms |
384 KiB |
|
326 Bytes |
2023-5-13 16:57:12 |
|
炼狱杏寿郎(的粉粉粉粉粉) (sheijiangwohh)
|
14ms |
384 KiB |
|
343 Bytes |
2022-2-15 15:52:03 |
|
李树崑 (lishukun)
|
14ms |
512 KiB |
|
945 Bytes |
2022-8-16 12:05:44 |
|
ZYP (冯俊豪23025)
|
14ms |
7 MiB |
C++98 |
387 Bytes |
2024-6-6 19:16:52 |
|
周琪渃
|
14ms |
384 KiB |
|
330 Bytes |
2023-3-17 23:08:33 |
|
PP (彭锦华)
|
14ms |
7 MiB |
C++98(O2) |
433 Bytes |
2024-6-6 19:17:07 |
|
Yangshenxin (𝒲𝒶𝓉𝑒𝓇)
|
14ms |
384 KiB |
|
337 Bytes |
2022-1-23 18:46:33 |
|
时代一校-王宥量 (wangyouliang)
|
14ms |
384 KiB |
|
356 Bytes |
2022-12-4 11:00:36 |
|
扬子鳄
|
14ms |
6.8 MiB |
C++98 |
308 Bytes |
2024-6-23 12:09:28 |
|
余彦瑞
|
14ms |
384 KiB |
|
294 Bytes |
2023-1-31 11:00:26 |
|
sb (吴振宇)
|
14ms |
384 KiB |
|
328 Bytes |
2023-5-11 18:46:25 |
|
朱老师 (zyp)
|
14ms |
432 KiB |
|
301 Bytes |
2022-8-16 16:33:38 |
|
芒苒忧 (廖迦南)
|
14ms |
532 KiB |
|
346 Bytes |
2022-8-3 15:04:02 |
|
姚宏逸
|
14ms |
392 KiB |
|
488 Bytes |
2022-2-4 13:25:48 |
|
余彦瑞
|
14ms |
424 KiB |
|
354 Bytes |
2023-5-14 12:10:14 |
|
LUKHE (LukeHu)
|
14ms |
512 KiB |
|
511 Bytes |
2022-2-20 13:39:20 |
|
何煜琦
|
14ms |
6.7 MiB |
C++11 |
316 Bytes |
2024-8-3 16:25:46 |
|
火爆肥肠(杨弘毅) (火爆肥肠)
|
14ms |
384 KiB |
|
357 Bytes |
2022-6-12 15:40:51 |
|
王韵淮
|
14ms |
440 KiB |
|
286 Bytes |
2022-6-12 10:36:51 |
|
经常消失 (小萝卜)
|
14ms |
384 KiB |
|
417 Bytes |
2022-2-15 15:43:53 |
|
疯神芭芭脱丝 (李卓修)
|
14ms |
384 KiB |
|
392 Bytes |
2023-4-16 19:36:44 |
|
时代二校-陈天成 (鸭缩毛巾)
|
14ms |
384 KiB |
|
302 Bytes |
2023-5-13 16:53:12 |
|
黄梓桐 (HuangZiTong)
|
14ms |
444 KiB |
|
293 Bytes |
2022-8-28 12:27:45 |
|
刘政君 (lzj)
|
14ms |
384 KiB |
|
395 Bytes |
2022-9-14 21:27:53 |
|
程子杰 (05c41-czj)
|
14ms |
432 KiB |
|
328 Bytes |
2022-7-27 11:10:50 |
|
冒牌陈杰晟【MOD】 (wed)
|
14ms |
512 KiB |
|
547 Bytes |
2022-3-6 15:41:19 |
|
林靖明
|
14ms |
424 KiB |
|
311 Bytes |
2023-1-30 20:11:47 |
|
CK (李弘毅)
|
14ms |
392 KiB |
|
251 Bytes |
2023-4-15 15:49:00 |
|
炼狱杏寿郎(的粉粉粉粉粉) (sheijiangwohh)
|
14ms |
384 KiB |
|
343 Bytes |
2022-2-15 15:52:04 |
|
蒲梓勋 (puzixun)
|
14ms |
384 KiB |
|
396 Bytes |
2022-10-18 21:05:02 |
|
江子墨
|
14ms |
6.9 MiB |
C++98 |
379 Bytes |
2024-5-23 21:45:22 |
|
陈杰晟
|
14ms |
436 KiB |
|
691 Bytes |
2022-2-13 12:01:43 |
|
陈泰羽 (chentaiyu)
|
14ms |
440 KiB |
|
324 Bytes |
2023-5-17 19:57:57 |
|
陈雨泽1
|
14ms |
512 KiB |
|
624 Bytes |
2023-2-18 11:34:06 |
|
scallway
|
14ms |
384 KiB |
|
278 Bytes |
2023-3-24 17:58:03 |
|
yuhaodi
|
14ms |
436 KiB |
|
502 Bytes |
2023-5-7 9:04:54 |
|
爱琴海校区-刁钲洋 (刁钲洋)
|
14ms |
384 KiB |
|
446 Bytes |
2023-5-17 20:02:20 |
|
86想要钱 (twt)
|
14ms |
388 KiB |
|
378 Bytes |
2022-12-4 18:03:02 |
|
手搓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 |
384 KiB |
|
465 Bytes |
2022-12-17 12:03:46 |
|
wangruibo20xh
|
14ms |
6.8 MiB |
|
256 Bytes |
2023-11-7 16:05:33 |
|
无尽的想象 (谭仕高)
|
14ms |
444 KiB |
|
561 Bytes |
2022-9-1 14:05:28 |
|
汪致卉 (wangzh)
|
14ms |
440 KiB |
|
341 Bytes |
2022-4-22 16:26:06 |
|
22029-hqh
|
14ms |
384 KiB |
|
326 Bytes |
2022-12-23 16:55:04 |
|
zhm123
|
14ms |
392 KiB |
|
336 Bytes |
2023-3-4 20:06:22 |
|
Erin
|
14ms |
7 MiB |
C++98 |
300 Bytes |
2024-6-12 15:41:35 |
|
孙烽轶 (sfy)
|
14ms |
392 KiB |
|
246 Bytes |
2023-4-15 17:22:21 |
|
小根哥
|
14ms |
420 KiB |
|
388 Bytes |
2022-8-28 11:44:59 |
|
张景豪
|
15ms |
420 KiB |
|
319 Bytes |
2023-3-4 20:10:44 |
|
Tender. (05c05-zhou)
|
15ms |
512 KiB |
|
397 Bytes |
2023-5-14 17:18:31 |
|
cupy战士 (05c05-dkf)
|
15ms |
6.9 MiB |
|
447 Bytes |
2023-9-24 11:45:01 |
|
时代一校-曾科智 (曾科智)
|
15ms |
512 KiB |
|
364 Bytes |
2022-9-10 20:39:43 |
|
时代二校+王吕棪 (wanglvyan)
|
15ms |
424 KiB |
|
316 Bytes |
2023-5-13 16:49:54 |
|
无尽的想象 (谭仕高)
|
15ms |
384 KiB |
|
334 Bytes |
2023-5-10 22:22:47 |
|
colin1112 (墙凌可)
|
15ms |
6.7 MiB |
|
474 Bytes |
2023-9-4 21:23:20 |
|
林凡童 (lft)
|
15ms |
424 KiB |
|
497 Bytes |
2022-9-15 20:04:23 |
|
zcx
|
15ms |
384 KiB |
|
345 Bytes |
2022-12-17 11:36:38 |
|
zry
|
15ms |
444 KiB |
|
360 Bytes |
2022-11-6 9:51:43 |
|
炼狱杏寿郎(的粉粉粉粉粉) (sheijiangwohh)
|
15ms |
440 KiB |
|
343 Bytes |
2022-2-15 15:52:03 |
|
赵沛喆
|
15ms |
384 KiB |
|
372 Bytes |
2022-10-23 10:48:05 |
|
22016-yzq
|
15ms |
384 KiB |
|
357 Bytes |
2022-12-4 9:52:45 |
|
22029-hqh
|
15ms |
392 KiB |
|
326 Bytes |
2022-12-23 16:55:04 |