码迷,mamicode.com
首页 >  
搜索关键字:ll    ( 5333个结果
2014百度之星程序设计竞赛
资格赛Energy Conversion水题。#include #include #include #include #include #include #define ll long longusing namespace std;int main(){ int T; scanf("%...
分类:其他好文   时间:2014-06-07 05:10:51    阅读次数:371
hdu-4302-Holedox Eating-线段树-单点更新,有策略的单点查询
一开始实在是不知道怎么做,后来经过指导,猛然发现,只需要记录某个区间内是否有值即可。 flag[i]:代表i区间内,共有的蛋糕数量。 放置蛋糕的时候很好操作,单点更新。 ip:老鼠当前的位置 寻找吃哪一个蛋糕的时候: 1,要寻找0-ip这个区间内,位置最大的一个蛋糕的位置,记为ll。 2,要寻找ip-n这个区间内,位置最小的一个蛋糕的位置,记为rr。 找到ll,rr之后,就可以根据l...
分类:其他好文   时间:2014-05-26 03:24:13    阅读次数:366
HDU 4832(DP+计数问题)
HDU 4832 Chess 思路:把行列的情况分别dp求出来,然后枚举行用几行,竖用几行,然后相乘累加起来就是答案 代码: #include #include #include using namespace std; typedef long long ll; const ll MOD = 9999991; const int N = 1005; int t, n, m, ...
分类:其他好文   时间:2014-05-25 21:55:04    阅读次数:280
2014年百度之星程序设计大赛 - 初赛(第二轮)
1001 暴力 #include #include #include using namespace std; const int maxn = 100100; int ll[maxn], rr[maxn]; struct node { int x, y, bj; }e[maxn]; int main() { int cas = 1; int T; scanf("%d...
分类:其他好文   时间:2014-05-25 21:32:50    阅读次数:268
Ubuntu 修改bash
ubuntu下/bin/sh的指向   ubuntu 下 /bin/sh 默认是dash,用ll /bin/sh就可以看出来sh是指向dash的链接,有时候会导致使用bash脚本的时候出问题。   如果遇到这个问题了,就要把sh指向bash。   用下面的命令把dash修改为bash   用sudo dpkg-reconfigure dash 选择否 查看当前的she...
分类:其他好文   时间:2014-05-25 21:31:45    阅读次数:224
hdu 3629 Convex(计数问题)
题目链接:hdu 3269 Convex 题目大意:给出n个点,问任选四个点可以组成多少个凸四边形。 解题思路:和uav11529的做法是一样的,只不过求的东西不一样。 #include #include #include #include #include using namespace std; typedef long long ll; const int N =...
分类:其他好文   时间:2014-05-25 18:38:17    阅读次数:155
poj 2449 Remmarguts' Date(K短路,A*算法)
http://poj.org/problem?id=2449 大致题意:给出一个有向图,求从起点到终点的第K短路。 K短路A*算法讲解: #include #include #include #include #include #include #include #include #include #include #define LL long...
分类:其他好文   时间:2014-05-24 23:39:47    阅读次数:352
2014辽宁ACM省赛 Prime Factors
问题 L: Prime Factors 时间限制: 1 Sec  内存限制: 128 MB 提交: 36  解决: 28 [提交][状态][论坛] 题目描述 I'll give you a number , please tell me how many different prime factors in this number. 输入 There is multiple te...
分类:其他好文   时间:2014-05-24 20:52:54    阅读次数:311
Modified LCS (扩展欧几里德)细写了对这个算法思路的理解
题目:Modified LCS 为过此题去仔细研究了下扩展欧几里德算法,领悟了一些精华。 模板为: void gcd(ll a, ll b, ll& d, ll& x, ll& y) { if(!b) {d = a; x = 1; y = 0;} else{ gcd(b, a%b, d, y, x); y -= x*(a/b);} } 这里算出来的x,y是对于方...
分类:其他好文   时间:2014-05-23 00:26:20    阅读次数:377
hdu 4416 水题 浙大计算机研究生复试上机考试-2005年 可是发现自己写代码有问题
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1228 1、 没读清题就交-----a==0 && b==0 我以为zero zero借书 2、范围估计,100+100。。。。 3、代码设计,,,, #include #include using namespace std; #define SIZE 111 #define ll long...
分类:其他好文   时间:2014-05-22 18:46:45    阅读次数:513
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!