码迷,mamicode.com
首页 >  
搜索关键字:hdu 1394 minimum inv    ( 34217个结果
C - Minimum Inversion Number
DescriptionThe inversion number of a given number sequence a1, a2, ..., an is the number of pairs (ai, aj) that satisfy i aj.For a given sequence of ....
分类:其他好文   时间:2014-05-05 11:42:13    阅读次数:276
hdu 4143 A Simple Problem (变形)
题目题意:给n,求x;直接枚举肯定超时, 把给的式子变形, (y+x)(y-x) = n;令y-x = b, y+x = a;枚举b, b 的范围肯定是sqrt(n), y = (a+b)/2; x = (a-b)/2;b越大, x越小, 所以倒着枚举b 1 #include 2 #include....
分类:其他好文   时间:2014-05-05 11:01:25    阅读次数:244
hdu 1598 find the most comfortable road
http://acm.hdu.edu.cn/showproblem.php?pid=1598 1 #include 2 #include 3 #include 4 #define maxn 2000 5 using namespace std; 6 const int inf=1<<30; 7...
分类:其他好文   时间:2014-05-05 10:53:38    阅读次数:344
hdu 1599 find the mincost route
http://acm.hdu.edu.cn/showproblem.php?pid=1599floyd找最小环。 1 #include 2 #include 3 #include 4 #define maxn 200 5 using namespace std; 6 const int inf...
分类:其他好文   时间:2014-05-05 10:52:15    阅读次数:315
hdu 2053 Switch Game 水题一枚,鉴定完毕
Switch GameTime Limit: 1000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10200Accepted Submission(s): 6175Proble...
分类:其他好文   时间:2014-05-05 10:41:58    阅读次数:314
HDU 3501 Calculation 2(欧拉函数的应用)
HDU 3501 Calculation 2大意:求1~n之间与n不互质的数的总和。思路:欧拉函数的应用;先用欧拉函数求出与n互质的总数m,计算m个数的总和,用n的总和减去m的总和就是想要的结果。 1 #include 2 #define LL __int64 3 4 int eular(int.....
分类:其他好文   时间:2014-05-05 10:29:56    阅读次数:308
hdu 3015 Disharmony Trees (离散化+树状数组)
Disharmony TreesTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 663Accepted Submission(s): 307Prob...
分类:其他好文   时间:2014-05-05 10:16:18    阅读次数:486
HDU 3036 拆点二分最大流
Escape Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 584    Accepted Submission(s): 117 Problem Description R's girl friend D is on m...
分类:其他好文   时间:2014-05-04 18:38:40    阅读次数:379
HDU-1015-Safecracker
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1015 深搜简单题 代码如下: #include #include #include #include using namespace std; string a; int t; int v,w,x,y,z; int vis[20]; int b[6]; int flag; int cmp(int...
分类:其他好文   时间:2014-05-04 18:09:00    阅读次数:352
HDU 3033 分组背包
题意: 给定n个物品 m元,k种商品 下面n行 tpye w v 表示物品的牌子,价格,价值(每个物品只有1件) 问:每个牌子至少买一件能获得的最大价值是多少 思路:分组背包 #include #include #include #include #include using namespace std; #define ll int ll n, m, k; l...
分类:其他好文   时间:2014-05-04 18:03:15    阅读次数:248
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!