![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构--基础
Vmorish
这个作者很懒,什么都没留下…
展开
-
UVA-514Rails(栈)
题目来源:https://vjudge.net/problem/UVA-514题意:某城市有一个火车站,有n节车厢从A方向驶入车站,按进站顺序编号为1~n。判断是否能让他们按照某种特定的顺序进入B方向并驶出车站。(只有A->C、C->B两种行驶选择)。分析:在中转站C中,符合后进先出的规则,所以是一个栈。参考代码:#include#include#include#incl原创 2017-03-11 11:07:44 · 293 阅读 · 0 评论 -
POJ - 1804 Brainman(归并排序求逆序数)
POJ - 1804 Brainman(归并排序求逆序数)DescriptionBackground Raymond Babbitt drives his brother Charlie mad. Recently Raymond counted 246 toothpicks spilled all over the floor in an instant just by glancing at them. And he can even count Poker cards. Charlie wou原创 2017-08-06 20:39:39 · 303 阅读 · 0 评论 -
HDU - 4911 Inversion(归并排序求逆序数)
HDU - 4911 Inversion(归并排序求逆序数)Problem Descriptionbobo has a sequence a1,a2,…,an. He is allowed to swap two adjacent numbers for no more than k times.Find the minimum number of inversions after his swaps.Note: The number of inversions is the number o原创 2017-08-06 23:35:16 · 346 阅读 · 0 评论 -
ZOJ - 3574 Under Attack II(计算几何 归并排序)
ZOJ - 3574 Under Attack II(计算几何 归并排序)Because of the sucessfully calculation in Under Attack I, Doctor is awarded with Courage Cross and promoted to lieutenant. But the war seems to end in never, now Doctor has a new order to help anti-aircraft troops calc原创 2017-08-07 09:25:32 · 261 阅读 · 0 评论 -
HDU-6052 card card card(尺取法)
HDU-6052 card card card(尺取法)Problem DescriptionAs a fan of Doudizhu, WYJ likes collecting playing cards very much. One day, MJF takes a stack of cards and talks to him: let's play a game and if you win, you can get all these cards. MJF randomly assigns原创 2017-09-11 21:43:17 · 269 阅读 · 0 评论