码迷,mamicode.com
首页 >  
搜索关键字:poj 暴力    ( 28865个结果
半平面交 模板 poj 3335 poj 3130 poj 1474 判断半平面交是否为空集
半平面交模板const double pi= acos(-1.0);#define arc(x) (x / 180 * pi)const double EPS = 1e-8;const int Max_N = 105;struct Point{ double x,y; Point(){}...
分类:其他好文   时间:2014-04-30 17:00:01    阅读次数:621
BNU 2418 Ultra-QuickSort (线段树求逆序对)
题目链接:http://acm.bnu.edu.cn/bnuoj/problem_show.php?pid=2418解题报告:就是给你n个数,然后让你求这个数列的逆序对是多少?题目中n的范围是n < 500000,所以,暴力是不行的。还是第一次学会用线段树求逆序数,这种方法的时间复杂度是n * lo...
分类:其他好文   时间:2014-04-29 21:38:23    阅读次数:463
hdu 1541/poj 2352:Stars(树状数组,经典题)
StarsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4052Accepted Submission(s): 1592Problem Descr...
分类:其他好文   时间:2014-04-29 21:00:23    阅读次数:621
POJ 1236
Network of SchoolsTime Limit:1000MSMemory Limit:10000KTotal Submissions:10500Accepted:4189DescriptionA number of schools are connected to a computer n...
分类:其他好文   时间:2014-04-29 20:33:42    阅读次数:567
hud 1397
没说的 暴力打表#include#includeusing namespace std;int a[62768];int b[42768];int prime[42768];int main(){ int n=0,j,i; memset(b,0,sizeof(b)); memset...
分类:其他好文   时间:2014-04-29 18:24:19    阅读次数:435
poj 1279 求半平面交的 面积
poj 1279 求半平面交的 面积题目来源:http://poj.org/problem?id=1279分析: 求半平面交的 面积代码如下:const double EPS = 1e-8;const int Max_N = 1505;struct Point{ double x,y; ...
分类:其他好文   时间:2014-04-29 16:35:46    阅读次数:499
POJ 3356 AGTC(DP-最小编辑距离)
DescriptionLetxandybe two strings over some finite alphabetA. We would like to transformxintoyallowing only operations given below:Deletion:a letter i...
分类:其他好文   时间:2014-04-29 16:22:00    阅读次数:450
poj~题目分类
一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法. (4)递推. (5)构造法.(poj3295) (6)模拟法.(poj1068,poj2632,poj1573,poj2993,poj2996)二.图...
分类:其他好文   时间:2014-04-29 11:27:47    阅读次数:489
Project Euler 126 - Cuboid layers
这题先是推公式…狂用不完全归纳+二次回归,最后推出这么一个奇怪的公式\[f(t,x,y,z)=4(t-1)(x+y+z+t-2)+2(xy+yz+xz)\]表示长宽高为\(x\)、\(y\)、\(z\)的立方体第\(t\)层放的立方体的个数。接下来就是算答案了…方法很简单:暴力但是暴力还是有技巧的,...
分类:其他好文   时间:2014-04-29 10:27:47    阅读次数:385
Codeforces Round #243 (Div. 2) C. Sereja and Swaps
由于n比较小,直接暴力解决#include #include #include #include #include #includeusing namespace std;int main(){ int n,k; cin >> n >> k; vector a(n); for...
分类:其他好文   时间:2014-04-29 09:18:46    阅读次数:412
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!