|
Guest
|
1ms |
7 MiB |
C++98 |
105 Bytes |
2024-4-18 12:51:35 |
|
希特勒 (朱子龙)
|
1ms |
6.6 MiB |
C++11 |
93 Bytes |
2024-7-29 19:20:54 |
|
接口规范的环境股份的改变风格更好官方发布交话费觉得UI个人福瑞呕吐更好玩二月份会哦工人物语合同融为UI呕吐也欧瑞特也日颙11计划的开始规划发热发忽而和1额外人让它发挥额UI挺符合瑞更好的好地方健康1给你计划润发百度很大差别发你发错饭你奶奶上次那就麻烦吧的风险环节几女华景新城换句话分解机 (余sy)
|
1ms |
6.9 MiB |
C++11 |
87 Bytes |
2024-6-2 13:58:15 |
|
十七
|
1ms |
6.2 MiB |
C++98(O2) |
94 Bytes |
2024-7-20 18:10:44 |
|
王子睿
|
1ms |
6.8 MiB |
C++98 |
80 Bytes |
2024-8-4 11:25:21 |
|
11111111
|
1ms |
6.8 MiB |
C++98(O2) |
83 Bytes |
2024-5-25 18:12:27 |
|
ysf.wlanwq.ZJSWL 1922~1991 (韦舒豪)
|
1ms |
6.5 MiB |
C++98 |
91 Bytes |
2024-7-30 18:44:52 |
|
李家华
|
1ms |
7 MiB |
C++98(O2) |
96 Bytes |
2024-5-5 10:13:09 |
|
许梓宸 (xuzichen)
|
1ms |
6.7 MiB |
C++17(O2) |
91 Bytes |
2024-7-17 17:30:09 |
|
小鹿
|
1ms |
6.7 MiB |
C++98(O2) |
93 Bytes |
2024-7-20 18:15:51 |
|
min_element
|
1ms |
6.9 MiB |
C++11(O2) |
84 Bytes |
2024-4-29 8:55:08 |
|
和你在一起,需要下地狱吗?那么,我去。 最新题目 (李晨逸)
|
1ms |
7 MiB |
C++11 |
91 Bytes |
2024-5-19 13:38:12 |
|
耿子傲
|
1ms |
6.7 MiB |
C++98(O2) |
95 Bytes |
2024-7-16 11:52:24 |
|
查大禹
|
1ms |
6.8 MiB |
C++98(O2) |
100 Bytes |
2024-6-14 19:42:42 |
|
李臾桐
|
1ms |
6.2 MiB |
C++98(O2) |
102 Bytes |
2024-7-16 18:11:50 |
|
接口规范的环境股份的改变风格更好官方发布交话费觉得UI个人福瑞呕吐更好玩二月份会哦工人物语合同融为UI呕吐也欧瑞特也日颙11计划的开始规划发热发忽而和1额外人让它发挥额UI挺符合瑞更好的好地方健康1给你计划润发百度很大差别发你发错饭你奶奶上次那就麻烦吧的风险环节几女华景新城换句话分解机 (余sy)
|
1ms |
6.9 MiB |
C++11 |
87 Bytes |
2024-6-2 13:58:24 |
|
Billy52013 (李子轩)
|
1ms |
6.2 MiB |
C++98(O2) |
94 Bytes |
2024-7-26 10:44:25 |
|
youhonglin
|
1ms |
8.2 MiB |
|
87 Bytes |
2023-5-5 19:14:54 |
|
zhangshuhan1
|
1ms |
6.9 MiB |
C++98(O2) |
95 Bytes |
2024-5-22 19:50:24 |
|
朱一凡
|
1ms |
6.7 MiB |
|
73 Bytes |
2023-9-24 17:17:54 |
|
张寓杰
|
1ms |
6.7 MiB |
C++11 |
91 Bytes |
2024-7-18 13:23:09 |
|
郑qr
|
1ms |
6.9 MiB |
C++11 |
86 Bytes |
2024-6-2 13:58:04 |
|
吴阮董
|
1ms |
7.1 MiB |
C++98(O2) |
110 Bytes |
2024-5-25 20:18:01 |
|
黄俊乔 (黄俊凯)
|
1ms |
6.8 MiB |
|
94 Bytes |
2023-11-4 16:01:07 |
|
陶zx
|
1ms |
7.1 MiB |
C++11 |
87 Bytes |
2024-6-2 13:56:20 |
|
接口规范的环境股份的改变风格更好官方发布交话费觉得UI个人福瑞呕吐更好玩二月份会哦工人物语合同融为UI呕吐也欧瑞特也日颙11计划的开始规划发热发忽而和1额外人让它发挥额UI挺符合瑞更好的好地方健康1给你计划润发百度很大差别发你发错饭你奶奶上次那就麻烦吧的风险环节几女华景新城换句话分解机 (余sy)
|
1ms |
6.9 MiB |
C++11 |
87 Bytes |
2024-6-2 13:56:55 |
|
郑qr
|
1ms |
6.8 MiB |
C++11 |
86 Bytes |
2024-6-2 13:58:55 |
|
Erin
|
1ms |
6.9 MiB |
C++98 |
92 Bytes |
2024-4-27 17:10:07 |
|
XSB (luofeng)
|
1ms |
6.7 MiB |
C++11 |
95 Bytes |
2024-6-6 11:17:39 |
|
曾凡宸
|
1ms |
6.7 MiB |
|
60 Bytes |
2023-9-24 17:14:47 |
|
手搓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)
|
1ms |
6.8 MiB |
|
81 Bytes |
2023-10-22 8:51:56 |
|
南坪-叶梓曦 (yezixi)
|
1ms |
6.5 MiB |
C++11 |
101 Bytes |
2024-7-12 11:12:43 |
|
张四
|
1ms |
6.5 MiB |
C++20 |
106 Bytes |
2024-7-13 16:24:28 |
|
stack
|
1ms |
7 MiB |
C++98(O2) |
100 Bytes |
2024-6-15 19:22:13 |
|
郑qr
|
1ms |
6.9 MiB |
C++11 |
86 Bytes |
2024-6-2 13:58:22 |
|
jdy
|
1ms |
7.4 MiB |
|
108 Bytes |
2023-6-1 14:26:21 |
|
Guest
|
1ms |
6.7 MiB |
C++98(O2) |
95 Bytes |
2024-7-14 16:32:33 |
|
杨博尧
|
1ms |
6.9 MiB |
C++98(O2) |
103 Bytes |
2024-5-5 10:09:34 |
|
李绪爻
|
1ms |
6.1 MiB |
C++98 |
80 Bytes |
2024-7-9 11:58:22 |
|
冯锦汶
|
1ms |
6.7 MiB |
|
73 Bytes |
2023-9-24 17:13:40 |
|
陈映辰
|
1ms |
7 MiB |
C++98(O2) |
99 Bytes |
2024-5-5 10:07:13 |
|
黄彬栩
|
1ms |
6.5 MiB |
|
88 Bytes |
2023-9-17 20:17:50 |
|
Guest
|
1ms |
6.6 MiB |
C++98(O2) |
103 Bytes |
2024-7-30 14:17:21 |
|
黄俊乔
|
1ms |
6.9 MiB |
|
91 Bytes |
2023-11-4 16:02:12 |
|
无尽的想象 (谭仕高)
|
1ms |
6.7 MiB |
|
127 Bytes |
2023-9-23 13:04:28 |
|
scallway
|
1ms |
7.1 MiB |
C++11 |
126 Bytes |
2024-6-2 13:51:57 |
|
郑qr
|
1ms |
6.9 MiB |
C++11 |
86 Bytes |
2024-6-2 13:58:30 |
|
Guest
|
1ms |
6.7 MiB |
C++98(O2) |
110 Bytes |
2024-7-13 11:21:34 |
|
yanruiqi
|
1ms |
6.5 MiB |
|
93 Bytes |
2023-9-2 19:24:49 |
|
Eastwa
|
1ms |
6.8 MiB |
C++98(O2) |
100 Bytes |
2024-8-11 16:04:12 |
|
蔡廷宣
|
1ms |
8.2 MiB |
|
93 Bytes |
2023-5-5 19:11:44 |
|
QU (屈然)
|
1ms |
6.6 MiB |
C++11 |
98 Bytes |
2024-5-26 10:33:56 |
|
郑qr
|
1ms |
6.9 MiB |
C++11 |
86 Bytes |
2024-6-2 13:57:07 |
|
Ryan
|
1ms |
6.7 MiB |
|
72 Bytes |
2023-9-24 18:22:40 |
|
卢培轩
|
1ms |
7.1 MiB |
C++98 |
91 Bytes |
2024-5-10 21:31:21 |
|
伍jc
|
1ms |
7.1 MiB |
C++11 |
131 Bytes |
2024-6-2 13:54:11 |
|
我是大傻逼,也是猪🐖。 (zhangshuhan)
|
1ms |
7.2 MiB |
C++98 |
95 Bytes |
2024-4-27 16:44:57 |
|
郑qr
|
1ms |
6.8 MiB |
C++11 |
86 Bytes |
2024-6-2 13:58:38 |
|
摸鱼人的小仓库 http://www.staggeringbeauty.com/ 大虫子 https://www.ak-ioi.com/apps/oi-2048/ 华容道 chrome://dino/ 小恐龙 https://littlealchemy2.com/ 小小炼金师 https://2048game.com/ 数字组 https://dimit.me/Fe26/index_zh_CN.html 死铁 http://www.4399.com/ 4399 https://www.mazegenerator.net/ 迷宫 https://lewan.baidu.com/rankland?idfrom=5056&gameSource=mini&gameType=0 百度游戏 [https://deepmess.com/namerena/]名字竞技场 ev.io 枪战游戏https://www.crazygames.com/game/air-wars-2 飞机 https://www.crazygames.com/game/kirka-io 枪战 https://www.crazygames.com/game/ev-io (李承璋)
|
1ms |
6.8 MiB |
|
94 Bytes |
2023-11-4 16:01:04 |
|
徐绅博
|
1ms |
6.7 MiB |
|
95 Bytes |
2023-10-28 13:51:00 |
|
老六在此
|
1ms |
7.2 MiB |
C++98 |
104 Bytes |
2024-4-29 17:23:19 |
|
代老师01号
|
1ms |
6.8 MiB |
|
91 Bytes |
2023-10-20 19:26:58 |
|
邹羿睿
|
1ms |
6.7 MiB |
|
74 Bytes |
2023-10-22 21:37:20 |
|
杨博尧
|
1ms |
6.9 MiB |
C++98(O2) |
103 Bytes |
2024-5-5 10:20:45 |
|
罗一鸣
|
1ms |
6.9 MiB |
C++11 |
84 Bytes |
2024-6-11 16:14:30 |
|
Guest
|
1ms |
6.7 MiB |
|
80 Bytes |
2023-9-24 17:20:30 |
|
RanHao
|
1ms |
6.7 MiB |
|
129 Bytes |
2023-9-2 19:22:04 |
|
chenruoxi
|
1ms |
6.8 MiB |
|
93 Bytes |
2023-11-7 19:15:50 |
|
熊俊喆
|
1ms |
6.7 MiB |
|
119 Bytes |
2023-9-29 16:28:39 |
|
鸡鸡爆
|
1ms |
6.5 MiB |
|
87 Bytes |
2023-9-16 15:16:20 |
|
煞笔笔
|
1ms |
8.2 MiB |
|
134 Bytes |
2023-5-5 19:10:22 |
|
彭粤庭 (JJlinCN)
|
1ms |
6.9 MiB |
C++11 |
84 Bytes |
2024-5-2 18:10:47 |
|
胡云杰
|
1ms |
6.5 MiB |
|
96 Bytes |
2023-9-3 17:26:07 |
|
陈荣添
|
1ms |
8 MiB |
|
86 Bytes |
2023-5-13 19:16:55 |
|
syc
|
1ms |
8 MiB |
|
86 Bytes |
2023-5-13 19:14:00 |
|
罗浩瑀
|
1ms |
6.7 MiB |
|
109 Bytes |
2023-9-23 17:12:51 |
|
煞笔笔
|
1ms |
8.2 MiB |
|
134 Bytes |
2023-5-5 19:10:28 |
|
宇宙霸主凯哥(知道QIQI吗) (谭泽悦)
|
1ms |
6.8 MiB |
C++11 |
92 Bytes |
2024-6-27 8:38:29 |
|
QU (屈然)
|
1ms |
6.6 MiB |
C++11 |
92 Bytes |
2024-5-26 10:33:40 |
|
RanHao
|
1ms |
6.8 MiB |
|
146 Bytes |
2023-8-24 16:39:00 |
|
郑qr
|
1ms |
7.1 MiB |
C++11 |
86 Bytes |
2024-6-2 13:57:42 |
|
冉钟宇
|
1ms |
8.1 MiB |
|
90 Bytes |
2023-5-13 19:18:29 |
|
黄相茗
|
1ms |
6.7 MiB |
|
98 Bytes |
2022-4-6 20:55:58 |
|
王辰
|
1ms |
6.6 MiB |
C++11(O2) |
95 Bytes |
2024-7-9 18:12:07 |
|
吴宗骏
|
1ms |
6.7 MiB |
C++98 |
102 Bytes |
2024-7-12 10:23:18 |
|
蔡廷宣
|
1ms |
8.2 MiB |
|
93 Bytes |
2023-5-5 19:11:35 |
|
Guest
|
1ms |
6.6 MiB |
C++98(O2) |
110 Bytes |
2024-7-13 11:17:51 |
|
qinlang
|
1ms |
8 MiB |
|
88 Bytes |
2023-5-13 19:18:11 |
|
火星伞宾——刘晏恺 (刘晏恺)
|
1ms |
7 MiB |
|
96 Bytes |
2023-10-15 15:11:29 |
|
Accepted (周芷乐)
|
1ms |
7.2 MiB |
|
177 Bytes |
2023-10-28 10:59:52 |
|
二位老六
|
1ms |
7.1 MiB |
C++98(O2) |
109 Bytes |
2024-5-19 11:05:53 |
|
chengyansong
|
1ms |
6.7 MiB |
C++98 |
100 Bytes |
2024-8-8 16:39:39 |
|
qinlang
|
1ms |
8 MiB |
|
88 Bytes |
2023-5-13 19:18:10 |
|
曲奇饼干
|
1ms |
6.8 MiB |
|
97 Bytes |
2023-9-24 11:26:51 |
|
看我的是SB (lcx)
|
1ms |
6.9 MiB |
C++98 |
87 Bytes |
2024-5-21 11:54:27 |
|
youhonglin
|
1ms |
8.2 MiB |
|
87 Bytes |
2023-5-5 19:14:56 |
|
赵耘毅
|
1ms |
8.1 MiB |
|
89 Bytes |
2023-5-13 20:07:47 |
|
youhonglin
|
1ms |
8.2 MiB |
|
87 Bytes |
2023-5-5 19:14:55 |
|
pig (hezhihui)
|
1ms |
7.2 MiB |
C++11 |
97 Bytes |
2024-5-17 18:59:08 |
|
郑qr
|
1ms |
6.9 MiB |
C++11 |
86 Bytes |
2024-6-2 13:56:57 |