码迷,mamicode.com
首页 >  
搜索关键字:ll    ( 5333个结果
uva 12745 Wishmaster(2-sat)
12745 Wishmaster view code#include #include #include #include using namespace std; typedef long long ll; const int N = 200010; const int M = Nn?x-n:x+...
分类:其他好文   时间:2014-08-22 22:20:49    阅读次数:140
URAL 1748. The Most Complex Number 反素数
题目来源:URAL 1748. The Most Complex Number 题意:求一个小于等于n的因子最多的数 思路:搜索+剪枝 #include #include using namespace std; typedef unsigned __int64 LL; LL prime[16] = {2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53...
分类:其他好文   时间:2014-08-22 21:12:09    阅读次数:228
Codeforces Round #262 (Div. 2)-A,B,C,D
A. Vasya and Socks 水题就不用多说了,直接暴力枚举就完事了。 #include #include #include #include #include #include #include using namespace std; #define LL __int64 int main() { int n,k; while(~scanf("%d%d",&n,&...
分类:其他好文   时间:2014-08-22 16:30:59    阅读次数:332
hdu 3641 数论 二分求符合条件的最小值数学杂题
http://acm.hdu.edu.cn/showproblem.php?pid=3641 学到: 1、二分求符合条件的最小值 /*==================================================== 二分查找符合条件的最小值 ======================================================*/ ll ...
分类:其他好文   时间:2014-08-22 00:25:15    阅读次数:204
HDU 4974 A simple water problem(贪心)
HDU 4974 A simple water problem 题目链接 签到题,很容易贪心得到答案是(sum + 1) / 2和ai最大值的最大值 代码: #include #include #include using namespace std; const int N = 100005; typedef long long ll; int t, n; ll...
分类:其他好文   时间:2014-08-21 22:53:25    阅读次数:304
Codeforces 460C
比较裸的二分,但是比赛的时候脑抽,用树状数组瞎搞过了,但是边界条件没注意让hack了。 后来看到有人写了很简单的版本,又过了一遍,提醒一下自己不能忘记基本算法。 #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; in...
分类:其他好文   时间:2014-08-21 22:52:45    阅读次数:238
Codeforces 459C
构造题 最多可以是k的d次方的学生不成为朋友 循环节的长度以k为倍数翻倍 注意long long #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; int main() { ll n,m,d,maxx=1...
分类:其他好文   时间:2014-08-21 21:17:34    阅读次数:211
HDU 4972 A simple dynamic programming problem
随机输出保平安 #include #include #include #include #include using namespace std; typedef long long ll; const int N = 100005; int a[N]; int main() { int T, cas = 0; scanf("%d", &T); while(T-...
分类:其他好文   时间:2014-08-21 19:27:34    阅读次数:171
HDU 4974 A simple water problem 模拟(水
水题。 #include #include #include #include using namespace std; typedef long long ll; priority_queue q; int main() { int T, cas = 0; scanf("%d", &T); while(T-- > 0) { int n; ...
分类:其他好文   时间:2014-08-21 19:27:14    阅读次数:196
幂取模
1 typedef long long ll; 2 #define MOD 1000000007 3 ll pow_mod(ll a, ll n) 4 { 5 if(n == 0) return 1; 6 ll x = pow_mod(a, n/2); 7 ll ans ...
分类:其他好文   时间:2014-08-21 16:45:24    阅读次数:190
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!