|
0721 (龙浩恩)
|
1ms |
6.8 MiB |
C++11 |
97 Bytes |
2024-6-29 18:48:54 |
|
https://www.crazygames.com/game/kiomet-com (chensitong)
|
1ms |
384 KiB |
|
97 Bytes |
2022-6-5 15:03:34 |
|
Cristiano·Ronaldo (05c41-gmz)
|
1ms |
384 KiB |
|
92 Bytes |
2022-7-26 8:42:36 |
|
新壹街 朱启航 (zhuqihang)
|
1ms |
384 KiB |
|
107 Bytes |
2023-2-12 12:19:45 |
|
Erin
|
1ms |
6.9 MiB |
C++98 |
96 Bytes |
2024-5-1 11:14:26 |
|
况奕辛 (KYX_yyds)
|
1ms |
384 KiB |
|
85 Bytes |
2021-12-30 19:04:45 |
|
余龙恩---来自额嘛瑞卡 (yulongenshijieshangzuishuai)
|
1ms |
384 KiB |
|
95 Bytes |
2022-1-27 10:34:26 |
|
JIANGYUNHAN
|
1ms |
384 KiB |
|
91 Bytes |
2022-4-17 14:16:48 |
|
刘思齐
|
1ms |
6.6 MiB |
C++98 |
101 Bytes |
2024-7-30 13:37:58 |
|
爱琴海校区-胡靖欢 (胡靖欢1)
|
1ms |
7 MiB |
C++98 |
88 Bytes |
2024-6-15 11:12:48 |
|
罗宇凡 (吴彦祖)
|
1ms |
384 KiB |
|
115 Bytes |
2022-1-20 10:38:04 |
|
zyp (wangjunling23010)
|
1ms |
384 KiB |
|
97 Bytes |
2023-3-10 21:02:35 |
|
yuhaodi
|
1ms |
384 KiB |
|
106 Bytes |
2023-4-15 18:56:46 |
|
严斯扬1
|
1ms |
7 MiB |
C++11 |
90 Bytes |
2024-5-30 18:01:51 |
|
陈年保宁醋 (dengboren)
|
1ms |
384 KiB |
|
85 Bytes |
2022-1-15 20:25:27 |
|
天天(聂振洺) (icefall)
|
1ms |
6.6 MiB |
C++98(O2) |
94 Bytes |
2024-8-7 17:07:46 |
|
唐一航
|
1ms |
6.8 MiB |
C++11 |
102 Bytes |
2024-6-27 22:44:28 |
|
马渝杭 (mayuhang)
|
1ms |
384 KiB |
|
93 Bytes |
2022-5-5 19:09:22 |
|
黑火 (auditor)
|
1ms |
384 KiB |
|
94 Bytes |
2022-3-1 18:33:35 |
|
杨博文05
|
1ms |
6.8 MiB |
C++98 |
102 Bytes |
2024-6-12 20:15:04 |
|
我是大傻逼,也是猪🐖。 (zhangshuhan)
|
1ms |
6.8 MiB |
C++98 |
96 Bytes |
2024-6-2 13:39:12 |
|
enen
|
1ms |
384 KiB |
|
91 Bytes |
2023-4-22 8:57:04 |
|
凌胥桐1
|
1ms |
7.1 MiB |
C++98 |
101 Bytes |
2024-5-16 9:05:22 |
|
bvvd
|
1ms |
6.5 MiB |
C++98 |
89 Bytes |
2024-8-2 17:22:32 |
|
11451254188 (22029-mjh)
|
1ms |
384 KiB |
|
96 Bytes |
2022-11-11 12:58:16 |
|
MacrozClick_ (蒋淞霖)
|
1ms |
384 KiB |
|
99 Bytes |
2022-1-22 10:07:41 |
|
李树崑 (lishukun)
|
1ms |
384 KiB |
|
99 Bytes |
2022-1-23 18:02:32 |
|
刘蕤箎
|
1ms |
384 KiB |
|
92 Bytes |
2023-3-4 10:37:49 |
|
洛谷:AIDczy(uid:656765) (chenzeyu)
|
1ms |
384 KiB |
|
80 Bytes |
2022-2-15 20:22:44 |
|
邹曜丞 (13983097018)
|
1ms |
384 KiB |
|
97 Bytes |
2023-5-13 13:26:23 |
|
吴沛宸
|
1ms |
6.9 MiB |
C++11 |
194 Bytes |
2024-6-15 13:35:30 |
|
cljz
|
1ms |
6.9 MiB |
C++17 |
96 Bytes |
2024-6-4 20:36:31 |
|
邱海川 (qhc)
|
1ms |
6.2 MiB |
C++11 |
105 Bytes |
2024-7-24 13:40:46 |
|
﹢•﹡🕉☽✝⚜Halanfus⚜✝☾⚔⚝﹡﹢• (黄子瑞)
|
1ms |
6.8 MiB |
C++98 |
88 Bytes |
2024-8-21 13:26:14 |
|
周琪渃
|
1ms |
384 KiB |
|
110 Bytes |
2022-9-24 18:16:54 |
|
甘梓琪
|
1ms |
384 KiB |
|
102 Bytes |
2022-1-21 17:37:56 |
|
谭懿轩 (yanyixuan)
|
1ms |
392 KiB |
|
102 Bytes |
2022-1-16 16:14:12 |
|
bvvd
|
1ms |
7 MiB |
C++98 |
89 Bytes |
2024-6-14 16:13:00 |
|
bvvd
|
1ms |
7 MiB |
C++98 |
89 Bytes |
2024-6-5 16:47:08 |
|
王冉燚默(重庆龙湖U城天街A馆) (wangranyimo)
|
1ms |
6.8 MiB |
C++98 |
94 Bytes |
2024-6-25 22:06:08 |
|
这是非常▦▦▦的 (段秉辰)
|
1ms |
7.2 MiB |
C++17 |
92 Bytes |
2024-4-28 20:56:24 |
|
bvvd
|
1ms |
7 MiB |
C++98 |
89 Bytes |
2024-6-19 15:25:23 |
|
zhaoyinjie23005
|
1ms |
6.6 MiB |
|
86 Bytes |
2023-9-9 18:28:15 |
|
手搓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 |
384 KiB |
|
94 Bytes |
2023-4-15 12:05:54 |
|
夏麟然
|
1ms |
6.7 MiB |
C++98 |
92 Bytes |
2024-5-24 17:58:17 |
|
疯神芭芭脱丝 (李卓修)
|
1ms |
384 KiB |
|
96 Bytes |
2022-1-21 17:33:56 |
|
MacrozClick_ (蒋淞霖)
|
1ms |
384 KiB |
|
99 Bytes |
2022-1-22 10:07:43 |
|
zhuqiwei22006
|
1ms |
384 KiB |
|
86 Bytes |
2022-3-27 16:27:05 |
|
谢语泽他爹 (qiujunxiang)
|
1ms |
384 KiB |
|
97 Bytes |
2022-2-10 21:10:09 |
|
cainuoyan
|
1ms |
6.9 MiB |
C++98 |
83 Bytes |
2024-4-21 10:17:16 |
|
ddz
|
1ms |
384 KiB |
|
102 Bytes |
2022-3-6 18:41:20 |
|
连弘锐
|
1ms |
384 KiB |
|
95 Bytes |
2022-8-15 16:36:21 |
|
周浩楠 (开朗的周好难)
|
1ms |
6.6 MiB |
C++11 |
108 Bytes |
2024-7-18 9:32:22 |
|
lao_ba
|
1ms |
6.7 MiB |
|
92 Bytes |
2023-9-29 16:16:44 |
|
05c35-hhw
|
1ms |
384 KiB |
|
94 Bytes |
2022-4-16 21:46:33 |
|
甘梓琪
|
1ms |
384 KiB |
|
102 Bytes |
2022-1-21 17:38:00 |
|
苏大皮蛋 (蔺卓辰)
|
1ms |
6.1 MiB |
C++98 |
90 Bytes |
2024-7-9 18:56:54 |
|
刘梦泉
|
1ms |
7 MiB |
C++11 |
87 Bytes |
2024-5-24 21:21:20 |
|
十七
|
1ms |
6.6 MiB |
C++20 |
107 Bytes |
2024-7-25 15:30:00 |
|
ganlin1
|
1ms |
384 KiB |
|
97 Bytes |
2023-5-13 11:23:36 |
|
Him神
|
1ms |
6.7 MiB |
|
95 Bytes |
2023-9-29 11:20:37 |
|
金沙校区-鲍钰森 (鲍钰森)
|
1ms |
6.6 MiB |
C++98 |
95 Bytes |
2024-7-15 10:20:56 |
|
刘入源
|
1ms |
384 KiB |
|
78 Bytes |
2022-7-1 18:35:08 |
|
潘光瑞 (NB牛牛大师)
|
1ms |
384 KiB |
|
97 Bytes |
2022-8-10 11:34:24 |
|
叶雨昊 (yeyuhao22006)
|
1ms |
392 KiB |
|
108 Bytes |
2022-3-22 21:13:13 |
|
董博煜
|
1ms |
6.8 MiB |
|
101 Bytes |
2023-10-4 21:32:38 |
|
kongql
|
1ms |
6.8 MiB |
C++11 |
83 Bytes |
2024-5-11 15:25:18 |
|
祝熙承 (zxc)
|
1ms |
7 MiB |
C++98 |
126 Bytes |
2024-6-8 15:39:46 |
|
田雨杨 (tianyuyang23010)
|
1ms |
384 KiB |
|
96 Bytes |
2023-4-28 20:47:35 |
|
( ) (李恺伦)
|
1ms |
6.7 MiB |
C++11 |
95 Bytes |
2024-7-18 17:12:01 |
|
叶令子
|
1ms |
6.8 MiB |
|
91 Bytes |
2023-10-21 15:12:27 |
|
Guest
|
1ms |
6.1 MiB |
C++11(O2) |
94 Bytes |
2024-7-10 18:04:19 |
|
22016-tlr
|
1ms |
384 KiB |
|
90 Bytes |
2022-6-12 9:11:54 |
|
爱琴海校区-刁钲洋 (刁钲洋)
|
1ms |
384 KiB |
|
88 Bytes |
2022-9-8 20:30:14 |
|
王昊天
|
1ms |
384 KiB |
|
87 Bytes |
2022-3-5 11:18:07 |
|
关博源
|
1ms |
384 KiB |
|
98 Bytes |
2023-2-11 11:20:20 |
|
金沙校区-李嘉齐 (李嘉齐)
|
1ms |
7 MiB |
C++98 |
104 Bytes |
2024-5-17 21:41:17 |
|
bvvd
|
1ms |
6.6 MiB |
C++98 |
89 Bytes |
2024-6-18 17:12:34 |
|
pwf
|
1ms |
384 KiB |
|
114 Bytes |
2022-4-8 17:27:21 |
|
xiangsiyu
|
1ms |
384 KiB |
|
91 Bytes |
2022-6-12 17:41:59 |
|
喻兴诚 (Brian)
|
1ms |
384 KiB |
|
93 Bytes |
2022-1-20 11:31:39 |
|
郭睿
|
1ms |
6.9 MiB |
C++98 |
93 Bytes |
2024-5-25 13:18:03 |
|
俞伏羲
|
1ms |
7 MiB |
C++98(O2) |
91 Bytes |
2024-6-22 11:30:18 |
|
苏晨懿
|
1ms |
6.8 MiB |
|
98 Bytes |
2023-10-26 21:19:19 |
|
stehpen_zuo
|
1ms |
7 MiB |
C++98 |
94 Bytes |
2024-5-11 20:18:50 |
|
林子沫awa (linziyue)
|
1ms |
384 KiB |
|
103 Bytes |
2022-7-11 19:55:24 |
|
罗元邑2
|
1ms |
6.6 MiB |
|
82 Bytes |
2023-6-30 16:10:22 |
|
綰綰(HHYT)
|
1ms |
7.2 MiB |
C++11 |
108 Bytes |
2024-4-23 21:54:43 |
|
黄立信
|
1ms |
6.7 MiB |
|
92 Bytes |
2023-10-5 15:26:17 |
|
傀儡师 (zhujingen)
|
1ms |
6.9 MiB |
C++11 |
96 Bytes |
2024-5-11 18:31:21 |
|
MacrozClick_ (蒋淞霖)
|
1ms |
384 KiB |
|
99 Bytes |
2022-1-22 10:07:37 |
|
dafu
|
1ms |
392 KiB |
|
91 Bytes |
2023-4-5 10:33:19 |
|
童语铄
|
1ms |
6.8 MiB |
|
99 Bytes |
2023-10-15 10:14:14 |
|
江子墨
|
1ms |
6.7 MiB |
C++98 |
98 Bytes |
2024-6-7 15:35:09 |
|
lcxcn (陈博森)
|
1ms |
384 KiB |
|
88 Bytes |
2022-6-1 21:26:22 |
|
杨洋
|
1ms |
7 MiB |
C++98 |
98 Bytes |
2024-4-21 14:18:07 |
|
wangzhijie
|
1ms |
384 KiB |
|
93 Bytes |
2022-1-25 13:41:08 |
|
源著校区 陈锐霖 (13983855850)
|
1ms |
6.9 MiB |
C++11 |
90 Bytes |
2024-5-1 10:09:45 |
|
李睿杰
|
1ms |
384 KiB |
|
74 Bytes |
2022-9-27 20:34:09 |
|
yuzk
|
1ms |
6.7 MiB |
C++11 |
106 Bytes |
2024-7-11 16:15:56 |