码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
bzoj4869
http://www.lydsy.com/JudgeOnline/problem.php?id=4869 终于A了。。。参考了下dalao的代码。。。 拓展欧几里得定理,改了几次就不变了,但是用的时候要在快速幂里判是不是要用。 #include<bits/stdc++.h> using namesp ...
分类:其他好文   时间:2017-05-09 21:47:32    阅读次数:169
费用流做题记录
BZOJ1221:http://www.lydsy.com/JudgeOnline/problem.php?id=1221 trick:将每天用完的,和要用的分来开处理,避免花费的重叠计算,也就是拆点 #include<bits/stdc++.h> using namespace std; #pra ...
分类:其他好文   时间:2017-05-09 20:48:33    阅读次数:198
CSU - 1556 Jerry&#39;s trouble(高速幂取模)
【题目链接】:click here 【题目大意】:计算x1^m+x2^m+..xn^m(1<=x1<=n)( 1 <= n < 1 000 000, 1 <= m < 1000) 【解题思路】:高速幂取模 代码: solution one: #include<bits/stdc++.h> #defi ...
分类:其他好文   时间:2017-05-09 18:57:26    阅读次数:193
int-整数+bool-布尔功能介绍
# age = 50 # v = age. # print(v) def bit_length(self): # real signature unknown; restored from __doc__ """ int.bit_length() -> int Number of bits nece ...
分类:其他好文   时间:2017-05-09 11:19:00    阅读次数:168
bzoj2004
http://www.lydsy.com/JudgeOnline/problem.php?id=2004 矩阵快速幂。。。并没有想出来。。。 理解地不是很好 先挖个坑 #include<bits/stdc++.h> using namespace std; typedef long long ll; ...
分类:其他好文   时间:2017-05-09 00:41:29    阅读次数:170
A - Visible Lattice Points SPOJ - VLATTICE 容斥原理/莫比乌斯反演
1 #include <bits/stdc++.h> 2 using namespace std; 3 typedef long long LL; 4 const int N=1e6+10; 5 const int INF=0x3f3f3f3f; 6 int cas=1,T; 7 int c[N]; ...
分类:其他好文   时间:2017-05-08 23:12:31    阅读次数:317
CDOJ 1221 Ancient Go
#include<bits/stdc++.h>usingnamespacestd;boolok;charmaze[15][15];charMap[12][12];boolvis[15][15];intx[4]={0,0,1,-1};inty[4]={1,-1,0,0};structST {intii;intjj; }; queue<ST>que;voidBFS(intcur_i,intcur_j) {intdot=0;while(!que.empty()) que.pop(); STn..
分类:其他好文   时间:2017-05-08 18:38:18    阅读次数:126
Codeforces Round #412 (rated, Div. 2, base on VK Cup 2017 Round 3) B. T-Shirt Hunt
1 #include <bits/stdc++.h> 2 using namespace std; 3 int p,x,y,a[26]; 4 bool init(int s) 5 { 6 int i=s/50%475; 7 for (int j=0;j<25;j++) 8 { 9 i=(i*96+4 ...
分类:其他好文   时间:2017-05-08 16:01:51    阅读次数:278
Team Formation
1 #include<bits/stdc++.h> 2 3 const int Maxn = 1000005; 4 5 #define ll long long 6 using namespace std; 7 int x[Maxn], pos[33]; 8 int main() { 9 int T ...
分类:其他好文   时间:2017-05-08 00:19:10    阅读次数:180
51nod 1215 数组的宽度
题目链接:http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1215 题意: 分析: 计算出每一个数字作为最大值,最小值的范围; 然后结果就是乘法原理,因为,左右端点可以任意组合; 1 #include <bits/stdc+ ...
分类:编程语言   时间:2017-05-07 00:15:32    阅读次数:223
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!