- 博客(27)
- 收藏
- 关注
原创 Codeforces Round #369 (Div. 2) B. Chris and Magic Square
B. Chris and Magic Squaretime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder and Chris the Baboon
2016-08-30 23:52:17 407
原创 Codeforces Round #369 (Div. 2) A. Bus to Udayland
A. Bus to Udaylandtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputZS the Coder and Chris the Baboon are tr
2016-08-30 23:28:07 309
原创 HDU 1863 畅通工程(Kruskal算法)
畅通工程Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 26432 Accepted Submission(s): 11550Problem Description省政府“畅通工程”的目标是使全省任何两
2016-08-30 22:52:22 348
原创 HDU 2546 饭卡(01背包)
Description电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。 某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。 Inp
2016-08-28 23:36:21 484
原创 AIM Tech Round 3 (Div. 2) C.Letters Cyclic Shift
C. Letters Cyclic Shifttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a non-empty string s c
2016-08-25 03:18:56 410
原创 AIM Tech Round 3 (Div. 2) A.Juicer
A. Juicertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputKolya is going to make fresh orange juice. He has
2016-08-25 02:43:57 344
原创 MoodsNote2
暑期联训完结撒花\(≧v≦)o~~虽然A了俩题但都不是靠自己力量啊……想的差不多但是每次都会有很重要的点get不到……嘛~小腊鸡~一个月的联训生活收获也挺大的,虽然晚上睡觉没有空调真的怨念炒鸡大T^T。。。从完全不接触这方面只会暴力到接触了一点学会一些简单的算法……(联训时好像除了优先队列也没用上啥。。。)觉得这真的是一个很神奇的领域~计算机计算的复杂性终于能够被看见也是一件很有自豪感
2016-08-19 00:24:19 358 2
原创 HDU 1176 免费馅饼 (动态规划)
Problem Description都说天上不会掉馅饼,但有一天gameboy正走在回家的小径上,忽然天上掉下大把大把的馅饼。说来gameboy的人品实在是太好了,这馅饼别处都不掉,就掉落在他身旁的10米范围内。馅饼如果掉在了地上当然就不能吃了,所以gameboy马上卸下身上的背包去接。但由于小径两侧都不能站人,所以他只能在小径上接。由于gameboy平时老呆在房间里玩游戏,虽然在游戏中
2016-08-18 00:32:11 2083 2
原创 HDU 1423 Greatest Common Increasing Subsequence(动态规划+最长公共上升子序列)
Problem DescriptionThis is a problem from ZOJ 2432.To make it easyer,you just need output the length of the subsequence. InputEach sequence is described with M - its length (1
2016-08-18 00:11:52 385
原创 HDU 1248 寒冰王座(完全背包)
Problem Description不死族的巫妖王发工资拉,死亡骑士拿到一张N元的钞票(记住,只有一张钞票),为了防止自己在战斗中频繁的死掉,他决定给自己买一些道具,于是他来到了地精商店前.死亡骑士:"我要买道具!"地精商人:"我们这里有三种道具,血瓶150块一个,魔法药200块一个,无敌药水350块一个."死亡骑士:"好的,给我一个血瓶."说完他掏出那张
2016-08-17 18:00:27 351
原创 HDU 2602 Bone Collector(01背包)
Problem DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grav
2016-08-17 00:00:09 296
原创 HDU 1003 Max Sum
Problem DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the max sum in this sequence is 6 + (-1) + 5
2016-08-16 22:57:08 310
原创 HDU 5831 Rikka with Parenthesis II
Problem DescriptionAs we know, Rikka is poor at math. Yuta is worrying about this situation, so he gives Rikka some math tasks to practice. There is one of them:Correct parentheses sequences c
2016-08-16 10:58:21 516
原创 HDU 5826 physics(公式推导+sort)
Problem DescriptionThere are n balls on a smooth horizontal straight track. The track can be considered to be a number line. The balls can be considered to be particles with the same mass.At t
2016-08-16 08:21:39 335
原创 HDU 5795 A Simple Nim(Nim游戏博弈+SG函数)
Problem DescriptionTwo players take turns picking candies from n heaps,the player who picks the last one will win the game.On each turn they can pick any number of candies which come from the same
2016-08-11 09:31:24 545
原创 HDU 1272 小希的迷宫(并查集)
Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路
2016-08-11 00:46:51 329
原创 HDU 5818 Joint Stacks(优先队列+swap)
Problem DescriptionA stack is a data structure in which all insertions and deletions of entries are made at one end, called the "top" of the stack. The last entry which is inserted is the first on
2016-08-11 00:35:22 579
原创 HDU 1166 敌兵布阵 (线段树)
Problem DescriptionC国的死对头A国这段时间正在进行军事演习,所以C国间谍头子Derek和他手下Tidy又开始忙乎了。A国在海岸线沿直线布置了N个工兵营地,Derek和Tidy的任务就是要监视这些工兵营地的活动情况。由于采取了某种先进的监测手段,所以每个工兵营地的人数C国都掌握的一清二楚,每个工兵营地的人数都有可能发生变动,可能增加或减少若干人手,但这些都逃不过C国的监视
2016-08-06 00:42:03 407
原创 POJ 2823 Sliding Window(优先队列)
DescriptionAn array of size n ≤ 10 6 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the
2016-08-05 21:31:31 419
原创 HDU 5793 A Boring Question(逆元+快速幂)
#include #include using namespace std;typedef long long ll;const ll N=1000000007;ll pow_mod(ll a,ll n,ll m){ //快速幂运算 if(n==0) return 1; ll x=pow_mod(a,n/2,m); ll ans=x*x%
2016-08-05 21:08:22 468
原创 MoodsNote
第五场多校联赛结束~打了5场,A题数还保持在0。心情很沮丧呀,不光是自己水平的问题,也有平时的总结不够,咸鱼时间太长。可是总是无法集中精力,不能去专注于做题涨姿势,一直说着要追上男神结果却经常自暴自弃的我真是令人讨厌呀~唯一开心的是bestcoder至少A了一题,但平常很多时候还是跟不上大家的进度。会的东西太少、总是只能暴力、没有办法将自己想法用代码实现(大概是最大的不足)。上章的数据结构
2016-08-02 22:41:51 355 2
原创 HDU 5778 abs
Problem DescriptionGiven a number x, ask positive integer y\geq 2y≥2, that satisfy the following conditions:The absolute value of y - x is minimalTo prime factors decomposition of Y, every
2016-08-02 10:08:03 625
原创 HDU 5776 sum
Problem DescriptionGiven a sequence, you're asked whether there exists a consecutive subsequence whose sum is divisible by m. output YES, otherwise output NOInputThe first line of th
2016-08-02 10:02:13 577
原创 POJ 3349 Snowflake Snow Snowflakes(数字哈希)
DescriptionYou may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read information about a collection of
2016-08-02 09:56:22 683
原创 HDU 5524 Subtrees(完全二叉树)
Problem DescriptionThere is a complete binary tree with N nodes.The subtree of the node i has Ai nodes.How many distinct numbers are there of Ai? InputThere are multiple test cases,
2016-08-01 21:35:17 419
原创 HDU 1082 Matrix Chain Multiplication(堆栈的简单运用)
Problem DescriptionMatrix multiplication problem is a typical example of dynamical programming. Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Sinc
2016-08-01 21:01:31 316
原创 HDU 3791 二叉搜索树(数组实现)
Problem Description判断两序列是否为同一二叉搜索树序列 Input开始一个数n,(1 Output如果序列相同则输出YES,否则输出NO Sample Input25674325432675763420 Sample OutputYESNO
2016-08-01 19:17:33 960
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人