|
罗莎莎
|
7ms |
6.9 MiB |
|
133 Bytes |
2023-7-18 16:34:54 |
|
金沙校区-孟熙轲 (mengxike)
|
7ms |
6.9 MiB |
C++98 |
120 Bytes |
2024-8-23 20:42:26 |
|
蒋雨辰
|
7ms |
420 KiB |
|
145 Bytes |
2023-5-19 20:32:49 |
|
丁宇涵 (05c35-dyh1)
|
7ms |
440 KiB |
|
126 Bytes |
2022-7-18 19:39:21 |
|
dlskdff (huenjie)
|
7ms |
440 KiB |
|
143 Bytes |
2023-4-9 18:19:07 |
|
游智棋
|
7ms |
6.9 MiB |
|
121 Bytes |
2023-7-18 11:32:58 |
|
王昕奕
|
7ms |
420 KiB |
|
124 Bytes |
2023-5-19 20:30:21 |
|
huzhanbo
|
7ms |
384 KiB |
|
151 Bytes |
2023-5-19 20:32:07 |
|
叶哲宇 (yzy)
|
7ms |
6.9 MiB |
|
132 Bytes |
2023-8-11 16:15:58 |
|
阮 (媚狐不吃道旁李)
|
7ms |
428 KiB |
|
121 Bytes |
2023-3-26 13:26:43 |
|
星野 光 (Hoshino Hikari)
|
7ms |
6.8 MiB |
|
252 Bytes |
2023-10-20 17:30:21 |
|
汪致卉 (wangzh)
|
7ms |
444 KiB |
|
114 Bytes |
2022-6-24 18:15:22 |
|
任童(rentong)
|
7ms |
392 KiB |
|
133 Bytes |
2022-3-19 16:17:54 |
|
王昕奕
|
7ms |
384 KiB |
|
124 Bytes |
2023-5-19 20:30:21 |
|
王昕奕
|
7ms |
6.8 MiB |
|
124 Bytes |
2023-10-26 22:35:07 |
|
yanglinrui
|
7ms |
416 KiB |
|
105 Bytes |
2022-2-26 16:49:45 |
|
明哲瀚 (18580067605)
|
7ms |
412 KiB |
|
120 Bytes |
2022-10-7 18:51:31 |
|
黄梓桐 (HuangZiTong)
|
7ms |
516 KiB |
|
121 Bytes |
2022-8-22 20:28:02 |
|
邹智吉
|
7ms |
6.8 MiB |
C++98 |
127 Bytes |
2024-8-13 21:48:36 |
|
奇怪的正义人! (leweiqi)
|
7ms |
436 KiB |
|
151 Bytes |
2023-2-17 21:21:18 |
|
hrz923
|
7ms |
6.9 MiB |
|
161 Bytes |
2023-8-14 10:22:21 |
|
熊俊喆
|
7ms |
6.8 MiB |
|
164 Bytes |
2023-10-8 21:27:45 |
|
SHY20091224
|
7ms |
436 KiB |
|
114 Bytes |
2022-8-19 14:55:31 |
|
张祖名
|
7ms |
6.9 MiB |
C++98(O2) |
135 Bytes |
2024-6-2 13:17:58 |
|
小忙果 (王昱杰)
|
7ms |
512 KiB |
|
126 Bytes |
2023-2-8 19:57:47 |
|
kql1
|
7ms |
7.1 MiB |
C++98 |
120 Bytes |
2024-5-9 13:08:07 |
|
时代一校-曾科智 (曾科智)
|
7ms |
432 KiB |
|
132 Bytes |
2023-2-25 19:07:08 |
|
AI创客
|
7ms |
6.9 MiB |
C++98 |
120 Bytes |
2024-6-27 10:01:17 |
|
BJ6180C8CTD (Fan)
|
7ms |
6.7 MiB |
|
129 Bytes |
2023-9-17 20:28:56 |
|
洛谷:AIDczy(uid:656765) (chenzeyu)
|
7ms |
432 KiB |
|
137 Bytes |
2022-2-15 20:20:12 |
|
德克萨斯做的到吗 (liyangbao)
|
7ms |
404 KiB |
|
154 Bytes |
2022-10-25 23:38:49 |
|
Yangshenxin (𝒲𝒶𝓉𝑒𝓇)
|
7ms |
392 KiB |
|
135 Bytes |
2022-4-9 8:51:21 |
|
(张洛诚)
|
7ms |
384 KiB |
|
138 Bytes |
2023-4-3 21:27:55 |
|
王昕奕
|
7ms |
392 KiB |
|
124 Bytes |
2023-5-19 20:29:57 |
|
lll
|
7ms |
436 KiB |
|
144 Bytes |
2022-9-6 11:24:57 |
|
王昕奕
|
7ms |
384 KiB |
|
124 Bytes |
2023-5-19 20:29:56 |
|
qinyi
|
7ms |
432 KiB |
|
153 Bytes |
2022-2-20 12:09:00 |
|
王泓涵 (whh)
|
7ms |
452 KiB |
|
120 Bytes |
2022-7-21 17:56:06 |
|
王昕奕
|
7ms |
384 KiB |
|
124 Bytes |
2023-5-19 20:29:56 |
|
向俊熙 (xiangjunxi23003)
|
7ms |
6.8 MiB |
|
104 Bytes |
2023-10-25 16:47:38 |
|
蒋雨辰
|
7ms |
512 KiB |
|
145 Bytes |
2023-5-19 20:32:47 |
|
hangge
|
7ms |
440 KiB |
|
127 Bytes |
2023-5-28 10:02:52 |
|
新壹街校区--税崇峻 (税崇峻)
|
7ms |
6.9 MiB |
|
121 Bytes |
2023-8-15 20:46:19 |
|
My name is Man (钟卓劭)
|
7ms |
6.9 MiB |
C++98 |
121 Bytes |
2024-6-23 14:20:59 |
|
梦之泪伤
|
7ms |
384 KiB |
|
127 Bytes |
2022-2-11 21:54:15 |
|
弹射起飞 ? 冲 ! (吴周周)
|
7ms |
7.5 MiB |
|
200 Bytes |
2023-7-21 11:07:18 |
|
lao_ba
|
7ms |
6.7 MiB |
|
146 Bytes |
2023-9-29 17:32:24 |
|
暗蛆突围 (lzh)
|
7ms |
6.8 MiB |
|
124 Bytes |
2023-10-28 23:58:27 |
|
执剑人罗辑 (Jasson)
|
7ms |
444 KiB |
|
117 Bytes |
2022-9-24 18:13:58 |
|
高国瑞
|
7ms |
6.9 MiB |
|
123 Bytes |
2023-8-17 11:17:41 |
|
ttt123
|
7ms |
384 KiB |
|
132 Bytes |
2023-4-19 22:50:07 |
|
杨瀚霖 (yanghanlin)
|
7ms |
436 KiB |
|
143 Bytes |
2022-11-26 10:13:34 |
|
陈于硕(我™的) (chenyu)
|
7ms |
6.8 MiB |
|
132 Bytes |
2023-6-10 22:04:22 |
|
赵锦昊
|
7ms |
440 KiB |
|
166 Bytes |
2023-3-25 13:43:22 |
|
陈家熠
|
7ms |
6.9 MiB |
C++11 |
112 Bytes |
2024-5-3 18:08:00 |
|
司雨来 (siyulai)
|
7ms |
388 KiB |
|
132 Bytes |
2022-10-6 16:24:17 |
|
CK (李弘毅)
|
7ms |
512 KiB |
|
142 Bytes |
2022-11-30 18:43:38 |
|
(-v-)ikun ((-v-))
|
7ms |
540 KiB |
|
120 Bytes |
2022-9-11 13:35:39 |
|
汪致卉 (wangzh)
|
7ms |
384 KiB |
|
114 Bytes |
2022-1-24 18:56:20 |
|
jighghjkfkhfdhdfdfdsfsdfsafvmnkbnkbmnlvnmkbvnvb;,.m;,;.;,;kbvlmkbnlmkblnvkmlbnkmlbvkmlbvklmbkmlkblmbnm;,l.,.;,'.,';.[',;.[,kjkoihgfhfgiohifgohifgohiofgihgofhiofgihofgihofgihofgiho;''[;.',m;.',m.;',.;'m,.;';'cv;x'cb'cx;b'cv;b'xc;b'c;b'cvbvc.'bv.//,/vb./vcb./cvbv,c.b,cv.,b.cv,b.vc,bg;hgl;hgl;hg;h;hfg;hl;lf;l;lxc;cln;bvln;vcln;vnl;vbl;vbln;vlv;blnvb;plnp;lplhfljpjh;nlvb;nv;bn;vcvl;nlv;nlv;g;hjhchl;ghfghl;fghl;ltlh;l;hlf;lg;bnlc;;nlv;nbv;nbv;nvb;nlvcnl;xc;blxcb;ll;hg;lhgl;dfl;t;ldy;l;lyl;rewlt493;l;dl;dsflg;lsdlpbpcxobpocvbpopopopreopotpreotertertretert (litingxu)
|
7ms |
400 KiB |
|
129 Bytes |
2023-5-7 18:12:05 |
|
姚宏逸
|
7ms |
440 KiB |
|
149 Bytes |
2023-2-27 19:25:52 |
|
1+1=2 (曹瀚文)
|
7ms |
6.8 MiB |
|
165 Bytes |
2023-7-6 20:18:56 |
|
时代一校-段老师:李云舒 (李云舒)
|
7ms |
6.7 MiB |
|
123 Bytes |
2023-9-17 17:49:32 |
|
qinjin11
|
7ms |
432 KiB |
|
115 Bytes |
2022-7-20 13:36:51 |
|
关博源
|
7ms |
436 KiB |
|
134 Bytes |
2023-2-20 19:40:13 |
|
牟淳雅
|
7ms |
6.7 MiB |
|
107 Bytes |
2023-9-17 19:34:38 |
|
叶雨昊 (yeyuhao22006)
|
7ms |
440 KiB |
|
139 Bytes |
2023-2-19 13:48:23 |
|
时代一校-赵彦博 (zyb)
|
7ms |
6.9 MiB |
|
114 Bytes |
2023-7-11 23:02:33 |
|
陈玺宇
|
7ms |
6.6 MiB |
|
119 Bytes |
2023-8-29 17:04:48 |
|
我和赵梓晴之间不是一般的亲密 (fengyuanzheng)
|
7ms |
392 KiB |
|
133 Bytes |
2022-3-5 17:28:42 |
|
赵启程 (赵启程1)
|
7ms |
432 KiB |
|
134 Bytes |
2023-3-27 19:14:51 |
|
zhangyouze (张佑泽)
|
7ms |
6.8 MiB |
|
136 Bytes |
2023-10-21 16:59:59 |
|
时代二校+王吕棪 (wanglvyan)
|
7ms |
440 KiB |
|
139 Bytes |
2023-2-25 16:46:19 |
|
拥抱幸福小熊(吴沛篪)
|
7ms |
6.8 MiB |
|
145 Bytes |
2023-10-21 9:55:08 |
|
疯神芭芭脱丝 (李卓修)
|
7ms |
420 KiB |
|
125 Bytes |
2022-7-16 13:50:14 |
|
Billy52013 (李子轩)
|
7ms |
6.9 MiB |
C++98(O2) |
131 Bytes |
2024-6-25 20:53:36 |
|
王昕奕
|
7ms |
392 KiB |
|
124 Bytes |
2023-5-19 20:30:21 |
|
6 (HIMMZXC1)
|
7ms |
436 KiB |
|
364 Bytes |
2023-5-28 19:55:05 |
|
王祎辰 (wangyichen)
|
7ms |
512 KiB |
|
127 Bytes |
2022-9-10 19:23:42 |
|
zzl
|
7ms |
6.9 MiB |
|
125 Bytes |
2023-7-25 17:08:57 |
|
杨淇瑞 (杨淇瑞29)
|
7ms |
6.7 MiB |
|
132 Bytes |
2023-9-17 16:29:02 |
|
孔妘蘂
|
7ms |
392 KiB |
|
178 Bytes |
2023-5-19 20:28:27 |
|
可爱的小花狗
|
7ms |
7.3 MiB |
C++11 |
159 Bytes |
2024-4-24 19:46:12 |
|
廖永亨
|
7ms |
436 KiB |
|
122 Bytes |
2022-11-30 17:48:43 |
|
爱琴海校区-王宥喆 (王宥喆)
|
7ms |
6.8 MiB |
|
630 Bytes |
2023-7-6 20:19:30 |
|
林昱霏
|
7ms |
432 KiB |
|
115 Bytes |
2022-8-18 14:11:21 |
|
王昕奕
|
7ms |
384 KiB |
|
124 Bytes |
2023-5-19 20:29:56 |
|
stehpen_zuo
|
7ms |
7.2 MiB |
C++98 |
268 Bytes |
2024-5-11 20:04:26 |
|
手搓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)
|
7ms |
384 KiB |
|
135 Bytes |
2023-4-15 12:03:46 |
|
蒋雨辰
|
7ms |
392 KiB |
|
145 Bytes |
2023-5-19 20:32:48 |
|
新壹街校区-陈琬舒 (空空大师)
|
7ms |
7.3 MiB |
|
119 Bytes |
2023-7-12 16:38:25 |
|
彭粤庭 (JJlinCN)
|
7ms |
7.1 MiB |
C++11(O2) |
117 Bytes |
2024-4-19 18:17:17 |
|
苏晨懿
|
7ms |
7.4 MiB |
|
112 Bytes |
2023-10-21 20:10:44 |
|
毕浩宇 (bihaoyu)
|
7ms |
6.7 MiB |
|
120 Bytes |
2023-9-13 16:52:36 |
|
李彦臻
|
7ms |
384 KiB |
|
122 Bytes |
2022-11-17 10:34:45 |
|
heyi
|
7ms |
6.8 MiB |
C++98(O2) |
120 Bytes |
2024-8-6 14:42:39 |
|
陈廷恩
|
7ms |
6.7 MiB |
|
139 Bytes |
2023-9-15 21:15:35 |
|
美术猫映画 (mkh)
|
7ms |
6.9 MiB |
|
111 Bytes |
2023-7-18 19:08:03 |
|
叶令子
|
7ms |
6.8 MiB |
|
120 Bytes |
2023-10-21 15:09:36 |
|
878698786086868789780
|
7ms |
6.8 MiB |
|
151 Bytes |
2023-7-6 20:22:26 |