码迷,mamicode.com
首页 >  
搜索关键字:codeforces 466b    ( 12211个结果
Codeforces 15B Laser
题目链接:点击打开链接 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define N 5005 #define ll __int64 inline ll Abs(ll x){return x>...
分类:其他好文   时间:2014-06-29 23:48:09    阅读次数:362
Codeforces 18D Seller Bob java大数+贪心
题目链接:点击打开链接 java: import java.math.BigInteger; import java.util.Scanner; public class Main { static int N = 5005; static BigInteger[] er = new BigInteger[N]; static BigInteger E = new BigInteger...
分类:编程语言   时间:2014-06-29 23:47:09    阅读次数:367
Codeforces 6D Lizards and Basements 2 dfs+暴力
题目链接:点击打开链接 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define N 110 #define ll int ll n, a, b; ll h[N]; vectorG,ans; voi...
分类:其他好文   时间:2014-06-29 23:30:37    阅读次数:465
CodeForces 18E Flag 2 dp
题目链接:点击打开链接 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define N 505 #define inf 1000000009 #define siz 26 char s[N][N]; i...
分类:其他好文   时间:2014-06-29 22:04:26    阅读次数:194
Codeforces Round #249 (Div. 2)-D
这场的c实在不想做,sad。 D: 标记一下每一个点8个方向不经过黑点最多能到达多少个黑点。 由题意可知,三角形都是等腰三角形,那么我们就枚举三角形的顶点。 对于每一个定点,有8个方向可以放三角形。 然后枚举8个方向,然后枚举腰的长度。然后判断是否可行。 #include #include #include #include #include #include #inclu...
分类:其他好文   时间:2014-06-29 20:32:05    阅读次数:145
Codeforces 442A Borya and Hanabi
有五种花色 外加 五种点数 共25张牌,每次有n张牌,主人知道这n张牌中有哪些牌,并且哪种牌有几张,但是不知道具体是哪张牌,他可以问某种花色,然后知道了哪几张是该花色,也可以问点数,然后就知道了哪几张是这个点数。最终可以把所有牌都确定下来,问最少要询问几次。这个题目一开始想到枚举(事实证明最后就是枚...
分类:其他好文   时间:2014-06-29 19:53:00    阅读次数:203
Codeforces 439E Devu and Birthday Celebration(计数问题)
题目链接:Codeforces 439E Devu and Birthday Celebration 题目大意:给出q,表示询问的次数,每次询问有n和f,问有多少种分类方法,将n分成f份,并且这f份的最大共约数为1. 解题思路:如果不考虑说最大共约数为1的话,那么问题很简单,就是f个数的和为n的种数C(f?1n?1).所以我们就尽量将问题转化成说f数的和为s的子问题。用容斥原理,总的可...
分类:其他好文   时间:2014-06-28 07:02:46    阅读次数:278
Codeforces 12E Start of the season 构造 一个n*n矩阵使得每行恰好有一个[0,n-1]且对称
题目链接:点击打开链接 题意: 给定一个n 构造 一个n*n矩阵使得每行恰好有一个[0,n-1]且关于主对角线对称 且主对角线必须全为0 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #defin...
分类:其他好文   时间:2014-06-27 10:15:19    阅读次数:139
Codeforces 12D Ball 树状数组模拟3个元素的排序
题目链接:点击打开链接 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define N 500005 #define ll int ll n; ll c[N], maxn; inline ll...
分类:其他好文   时间:2014-06-27 09:06:04    阅读次数:183
CodeForces 7D Palindrome Degree 字符串hash
题目链接:点击打开链接 #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define N 5001000 #define mod 1000000007 #define he...
分类:其他好文   时间:2014-06-27 07:35:50    阅读次数:178
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!