ACM进阶之排序
NYIST_TC_LYQ
这个作者很懒,什么都没留下…
展开
-
CodeForces 610B-Vika and Squares,有坑点,不是很难~~
B. Vika and Squarestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVika has n jars with paints of distinct原创 2016-04-12 11:24:41 · 702 阅读 · 0 评论 -
NYOJ660逃离地球,贪心!
逃离地球时间限制:1000 ms | 内存限制:65535 KB难度:2描述据霍金的《时间简史》所述,在几亿年之后将再次发生宇宙大爆炸。在宇宙大爆炸后,地球上将新生出许多生物而不再适合人类生存。当然其中的生物有好有坏,我们规定其中名叫Angel和Devil分别是善良和邪恶的两种生物。 -->所以当主人公Be.St遇到了Angel他将获得该Angel身上的相应HP的一半,原创 2016-03-11 18:59:08 · 560 阅读 · 0 评论 -
Codeforces Round #402 (Div. 2) A+B+C+D
Codeforces Round #402 (Div. 2) A. Pupils Redistribution 模拟大法好。两个数列分别含有n个数x(1int v1[N],v2[N];int main(){ int n原创 2017-02-27 13:29:10 · 501 阅读 · 0 评论 -
POJ 1971-Parallelogram Counting,暴力1063ms!
Parallelogram Counting 刚学hash还不会用,看到5000ms的时限于是想着暴力来一发应该可以过。以前做过类似的题,求平行四边形个数,好像是在CF上做的,但忘了时限是多少了,方法是一样的。 题意:给出n个点坐标,求平面中有多少个平行四边形。 思路:我们知道,平行四边形的条件是两条边平行且相等。我们把每条边分解成x和y方向的向量,只要原创 2017-01-15 11:36:08 · 349 阅读 · 0 评论 -
POJ-1065 Wooden Sticks,排序+最长单减子序列!
Wooden Sticks 题意:有一台机器处理木材,最开始需要一分钟准备,如果后面处理的木材比前面处理的木材更长更重,则不需要准备时间,否则需要分钟准备时间。 思路:按长度排序然后求重量的一个最长单减子序列就好了。struct node{ int x,y;}a[N];int b[N];int cmp(node a,node b){ if(a.x原创 2017-01-09 15:33:04 · 311 阅读 · 0 评论 -
Codeforces Round #211 (Div. 2)-D. Renting Bikes,二分!感谢队友出思路!
D. Renting Bikes 读懂题后一开始和队友都以为是贪心。可是贪心又怎么贪呢。。我们无法确定到底能买多少车但肯定是最便宜的前x辆。除了公共预算每个人的钱只能自己用,也无法确定每个人买哪一辆车。。比赛快结束时我去看最后一题,队友还在 想,突然他想到了用二分的思路,然后验证了一下是正确的,但时间不够了。今天回来就这道题都快写了两小时了。 题意:n个人,每个人原创 2016-12-04 11:21:09 · 459 阅读 · 0 评论 -
ZOJ3860-Find the Spy
Find the SpyTime Limit: 2 Seconds Memory Limit: 65536 KBWhoooa! There is a spy in Marjar University. All we know is that the spy has a special ID card. Please find him out!InputTher原创 2016-03-18 07:39:44 · 529 阅读 · 0 评论 -
BC#76.2DZY Loves Balls
DZY Loves Balls Accepts: 659 Submissions: 1393 Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)问题描述DZY喜欢玩球。他有nn个球,装进一个大盒子里。每个球上面都写着一个整数原创 2016-03-20 09:48:18 · 568 阅读 · 0 评论 -
CF651B-Beautiful Paintings
greedy, sortings原创 2016-03-20 21:19:58 · 530 阅读 · 0 评论 -
C. The Smallest String Concatenation-C++sort排序~~
C. The Smallest String Concatenationtime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou're given a list of原创 2016-03-23 13:58:58 · 432 阅读 · 0 评论 -
『NYIST』第九届河南省ACM竞赛队伍选拔赛[正式赛二]-最小内积(第八届北京师范大学程序设计竞赛决赛)
H. 最小内积 Time Limit: 1000msMemory Limit: 65536KB64-bit integer IO format: %lld Java class name: Main 向量是几何中的一个原创 2016-04-08 16:46:44 · 1327 阅读 · 0 评论 -
HDU1412-{A} + {B},通过率并不高,但同样是用一个很简洁的函数unique,超短代码水过~
{A} + {B}Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) http://acm.hdu.edu.cn/showproblem.php?pid=1412Problem Description给你两个集合,要求{A} + {B}.注:同一个集原创 2016-04-23 10:33:31 · 934 阅读 · 0 评论 -
数据结构课程设计《火车售票管理系统》
题目:火车售票管理系统需求分析:要求能够实现售票、退票、余票查询等功能方法设计:可以用结构体和栈模拟买票退票的过程。车票打印效果如下:+-------------------------------------------------------+| K13010030 候车地点:1楼第1候车室 || 南阳 K1301 ...原创 2016-12-27 17:34:58 · 8825 阅读 · 1 评论