URAL 1161 Stripies(数学+贪心)】的更多相关文章

Our chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian - polosatiki, but the scientists had to invent an English name to apply for an international patent). The stripies are tr…
题目链接: PKU:http://poj.org/problem?id=1862 ZJU:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=543 Description Our chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian -…
Stripies Time Limit: 1000MS   Memory Limit: 30000K Total Submissions: 20456   Accepted: 9098 Description Our chemical biologists have invented a new very useful form of life called stripies (in fact, they were first called in Russian - polosatiki, bu…
Stripies 直接上中文了 Descriptions 我们的化学生物学家发明了一种新的叫stripies非常神奇的生命.该stripies是透明的无定形变形虫似的生物,生活在果冻状的营养培养基平板菌落.大部分的时间stripies在移动.当他们两个碰撞,会有新stripie生成,而旧的不见了.经过长期研究,他们发现新stripies的体重不等于消失的stripies的体重,而是:如果一个质量为m1和m2的stripies相撞,生成的stripies体重是2*sqrt(m1*m2) 现在,科学…
由于本人太蒻了,div1的没有参加,胡乱写了写div2的代码就赶过来了. T1 苏联人 题目背景 题目名称是吸引你点进来的. 这是一道正常的题,和苏联没有任何关系. 题目描述 你在打 EE Round 1,发现第一题非常无聊.于是你不打了,去下国际象棋了. 结果你发现,由于神秘力量的影响,你的棋子只剩下若干黑色的战车,若干黑色的主教和一只白色的国王了. 由于你很无聊,所以你把一些黑色棋子放在了 8×88\times 88×8 的棋盘上. 由于你很无聊,所以你想知道,国王放在哪些格子是安全的.换句…
题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&category=648&page=show_problem&problem=5159 In normal football games, the winner team gets 3 points, loser team gets 0 point, and if there is a drawgame, bot…
链接: http://acm.timus.ru/problem.aspx?space=1&num=1303 按照贪心的思想,每次找到覆盖要求区间左端点时,右端点最大的线段,然后把要求覆盖的区间改为这个右端点到M这个区间.依次类推下去,这样的话就只需要扫一遍就可以找去来. 要做的预备工作就是将线段按照左端点的升序排序就可以了. 它的时间复杂度就是O(n) 代码一直WA,望大神指教 #include<iostream> #include<stdio.h> #include<…
贪心: 保存连续的n-k个数,求最小的一段方差... .预处理O1算期望. .. Galaxy Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 752    Accepted Submission(s): 176 Special Judge Problem Description Good news for us: to relea…
主要思路:求出蚊子到达球的时间区间(用方程得解),对区间做一个贪心的选择,选择尽可能多的区间有交集的区间段(结构体排序即可),然后计数. #include <cstdio> #include <cmath> #include <iostream> #include <algorithm> using namespace std; #define ll long long #define maxn 100025 int n, m, x,y; ll r; int…
Buy Sticks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 868    Accepted Submission(s): 392 Problem Description Imyourgod need 3 kinds of sticks which have different sizes: 20cm, 28cm and 32cm…