码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
SnackDown Online Pre-elimination round A
1. 应该n是偶数,就行吧。应该判断1个人,只能出现一次吧。 1 #include<bits/stdc++.h> 2 #define pb push_back 3 typedef long long ll; 4 using namespace std; 5 typedef pair<int, int ...
分类:其他好文   时间:2017-06-01 23:46:15    阅读次数:458
Codeforces Round #404 (Div. 2)——ABCDE
题目这里 A.map裸题 #include <bits/stdc++.h> using namespace std; map <string, int> p; string s[] = { "Tetrahedron", "Cube", "Octahedron" , "Dodecahedron", " ...
分类:其他好文   时间:2017-05-31 16:44:56    阅读次数:252
bzoj1085题解
【解题思路】 A*(上下界剪枝)。 答案上界:15。 答案下界:当前步数+当前状态剩余步数估价。 这里我们简单地设计估价函数为当前状态与目标状态不相同的棋子数-1,与0的较大值。这样保证了0≤估价≤正确步数。 复杂度o(25*C(24,12))。 【参考程序】 1 #include <bits/st ...
分类:其他好文   时间:2017-05-30 20:54:37    阅读次数:130
LeetCode 476. Number Complement(easy难度c++)
题目: Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: Example 1: ...
分类:编程语言   时间:2017-05-29 22:57:43    阅读次数:276
codeforces round #415 div2
由于下午硬钢树套树和大力颓废就没补完 C:我傻逼比赛时没做出来。。。就是排个序然后算贡献 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int N = 300010, mod = 1000000007 ...
分类:其他好文   时间:2017-05-29 20:35:20    阅读次数:206
Gym Gym 101147G 第二类斯特林数
题目链接:http://codeforces.com/gym/101147/problem/G 题意:n个人,去参加k个游戏,k个游戏必须非空,有多少种放法? 分析: 第二类斯特林数,划分好k个集合后乘以阶乘; 1 #include <bits/stdc++.h> 2 3 using namespa ...
分类:其他好文   时间:2017-05-29 18:15:17    阅读次数:214
codeforces round #416 div2
A:暴力模拟 #include<bits/stdc++.h> using namespace std; int a, b; int main() { scanf("%d%d", &a, &b); int delta = 1, x = 0; while(1) { if(x == 0) { if(a < ...
分类:其他好文   时间:2017-05-29 12:06:06    阅读次数:234
HDU - 1671 Phone List
1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long ll; 4 struct Node { 5 int next[10]; 6 int num; 7 } node[100005]; 8 int len = 0; ...
分类:其他好文   时间:2017-05-28 22:24:17    阅读次数:211
Test
autumn#include<bits/stdc++.h> using namespace std; const int maxn = 200005; int p[maxn],a[maxn],b[maxn]; bool vis[maxn]; set<pair<int,int> >s[5]; int ...
分类:其他好文   时间:2017-05-28 16:50:44    阅读次数:225
HDU 1521 指数型母函数
方法一: DFS 方法二:生成函数 每个数可以重复一定次数,求排列组合数,这是裸的指数型生成函数; 1 #include <bits/stdc++.h> 2 3 using namespace std; 4 5 double c1[15],c2[15]; 6 int a[15]; 7 int num ...
分类:其他好文   时间:2017-05-28 12:25:55    阅读次数:153
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!