栈和队列
文章平均质量分 71
w1997t
ACM:从入门到入土
展开
-
暑期集训之ACboy needs your help again!
ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(. As a smart ACMer, you want to get ACboy out of the monst原创 2017-07-25 10:29:16 · 171 阅读 · 0 评论 -
暑期集训之0和5
小K手中有n张牌,每张牌上有一个一位数的数,这个字数不是0就是5。小K从这些牌在抽出任意张(不能抽0张),排成一行这样就组成了一个数。使得这个数尽可能大,而且可以被90整除。 注意: 1.这个数没有前导0, 2.小K不需要使用所有的牌。 Input每个测试数据输入共2行。 第一行给出一个n,表示n张牌。(1 第二行给出n个整数a[0],a[1],a[2],…,a[n-1] (原创 2017-07-25 14:34:38 · 286 阅读 · 0 评论 -
暑期集训之结构体重载
这个知识点也是今天栈和队列专题补充的,当然,现在其实还不是很懂,目前的理解就是可以实现结构体的运算(其实实际上是把一些运算给改成适用于结构体的运算法则),简单来举个实例: #include #include #include #include #include using namespace std; struct stu{ int x,y; }a,b; int main() { a.x=1原创 2017-07-25 20:37:47 · 148 阅读 · 0 评论 -
暑期集训之Array
Vitaly has an array of n distinct integers. Vitaly wants to divide this array into three non-empty sets so as the following conditions hold: The product of all numbers in the first set is less than原创 2017-07-25 20:48:06 · 225 阅读 · 0 评论 -
暑期集训之寻找大富翁
浙江桐乡乌镇共有n个人,请找出该镇上的前m个大富翁. Input输入包含多组测试用例. 每个用例首先包含2个整数n(0 n和m同时为0时表示输入结束. Output请输出乌镇前m个大富翁的财产数,财产多的排前面,如果大富翁不足m个,则全部输出,每组输出占一行. Sample Input 3 1 2 5 -1 5 3 1 2 3 4 5 0 0 Sample Output原创 2017-07-25 20:58:36 · 187 阅读 · 0 评论 -
HDU 【1022】Train Problem I
Problem Description As the new term comes, the Ignatius Train Station is very busy nowadays. A lot of student want to get back to school by train(because the trains in the Ignatius Train Station is t原创 2017-07-25 11:14:41 · 292 阅读 · 0 评论