码迷,mamicode.com
首页 >  
搜索关键字:bits    ( 3873个结果
PAT 乙级 1030完美序列(25)
戳我直达原题~ 本题求一个序列满足 MAX <=MIN *p 的最长子序列个数 排序后暴力搜,有两个重要的代码优化如注释。 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 #include <bits/stdc++.h> typedef l ...
分类:其他好文   时间:2017-02-15 00:26:59    阅读次数:171
HDU - 1286 找新朋友
版本一: 1 #include<bits/stdc++.h> 2 #define IO ios_base::sync_with_stdio(0);cin.tie(0); 3 using namespace std; 4 int prime[32770], phi[32770]; 5 int main ...
分类:其他好文   时间:2017-02-14 20:38:04    阅读次数:257
LCT 填坑系列
清华冬令营 T1用了LCT 这个东西以前有写过 然而并不熟练 发现没了板子根本就不会写 只能填一填坑辣 1 #include <bits/stdc++.h> 2 #define N 30010 3 #define ls c[x][0] 4 #define rs c[x][1] 5 using nam ...
分类:其他好文   时间:2017-02-13 22:06:43    阅读次数:261
[CSAPP] Chapter 1 Overview of Computer
1.1 information is bits + context All computer programs are just a sequence of bits, each with a value of 0 or 1, organized in 8-bit chunks called by ...
分类:移动开发   时间:2017-02-13 08:47:13    阅读次数:325
Number Complement
Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation. Note: The given inte ...
分类:其他好文   时间:2017-02-12 18:53:30    阅读次数:178
四平方和书
给定一个小于5000000的数,将之分解为至多4个数的平方和。 #include<bits/stdc++.h> #define maxn 5000005 using namespace std; bool a2b2[maxn]; int main() { memset(a2b2,0,sizeof(a ...
分类:其他好文   时间:2017-02-11 11:26:01    阅读次数:154
在vs中使用bits/stdc++.h的方法-转自CF
solution to include bits/stdc++.h in visual c++ By Tensor, 2 years ago, , This is just a method i used to make me able to include bits/stdc++.h in vis ...
分类:编程语言   时间:2017-02-10 20:37:30    阅读次数:4154
鸟哥 第零章、计算器概论
计算机单位1 Byte = 8 bits 频率就是 CPU 每秒钟可以进行的工作次数。 Intel 的i7-4790 CPU 频率为3.6GHz, 表示这颗 CPU 在一秒内可以进行3.6x109 次工作,每次工作都可以进行少数的指令运作之意。 ...
分类:其他好文   时间:2017-02-08 21:06:58    阅读次数:183
hdu 4405 Aeroplane chess(概率DP)
题目链接:hdu 4405 Aeroplane chess 题意: 一个0到n的数轴上掷色子前进,中间有直达部分,问到终点需要掷色子的期望。 题解: 无环的期望DP,直接递推就行。 1 #include<bits/stdc++.h> 2 #define F(i,a,b) for(int i=a;i< ...
分类:其他好文   时间:2017-02-07 19:24:40    阅读次数:179
UVA - 12545 Bits Equalizer (比特变换器)(贪心)
题意:输入两个等长(长度不超过100)的串S和T,其中S包含字符0,1,?,但T只包含0和1,你的任务是用尽量少的步数把S变成T。有以下3种操作: 1、把S中的0变成1。 2、把S中的“?”变成0或1。 3、交换S中任意两个字符。 分析: 1、为保证步数最少,先统计两串中1的个数和1的位置。如果cn ...
分类:其他好文   时间:2017-02-07 18:01:13    阅读次数:210
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!