码迷,mamicode.com
首页 >  
搜索关键字:unsigned    ( 4409个结果)
POJ 2377
水一发,最小生成树。注意不连通情况。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define LL unsigned __int64 7 using namespace std; 8 9 cons...
分类:其他好文   时间:2015-03-10 13:41:13    阅读次数:163
[LeetCode]Reverse Bits
Reverse bits of a given 32 bits unsigned integer. For example, given input 43261596 (represented in binary as 00000010100101000001111010011100), return 964176192 (represented in binary as 001...
分类:其他好文   时间:2015-03-10 12:04:14    阅读次数:101
[LeetCode] Number of 1 Bits 位1的个数
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For example, the 32-bit in...
分类:其他好文   时间:2015-03-10 12:02:17    阅读次数:138
[leetcode] Number of 1 Bits
Number of 1 BitsWrite a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For exampl...
分类:其他好文   时间:2015-03-10 12:02:10    阅读次数:112
课堂练习——随机运算2设计思想
1.题目避免重复:包含“time.h”头文件,利用srand(unsigned)time(NULL)语句避免题目重复2.(1)是否有乘除法:如果没有乘除法,就用随机产生0,1来控制加减法,如果有乘除法,就随机产生0,1,2,3来控制加减乘除法 (2)是否有括号: 由于真分数是a/b的格式,所以当.....
分类:其他好文   时间:2015-03-10 10:08:19    阅读次数:125
输入一个年份,输出该年份的日历
假定输入的年份合法正确。刚开始毫无思路,觉得很难,写着写着就有灵感了。其实不难,只要掌握好循环控制就好了。写完之后,感觉其实没什么想法。就直接粘代码吧。 1 #include 2 #include 3 4 void printf_cal(unsigned); 5 int is_lea...
分类:其他好文   时间:2015-03-10 00:09:15    阅读次数:535
POJ 2375
BFS+强连通。输出max(缩点后出度为0的点数,缩点后入度为0的点数)。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define LL unsigned __int64 7 using...
分类:其他好文   时间:2015-03-09 23:57:08    阅读次数:218
用位运算实现十进制转换为二进制
代码如下: 1 #include //将十进制数转化为二进制数,位运算的取位操作 2 using namespace std; 3 int main() 4 { 5 unsigned short i; 6 cout > i; 8 for(in...
分类:其他好文   时间:2015-03-09 23:54:43    阅读次数:261
基于51单片机8位数码管(74HC595芯片)的使用方法
#include #include // 函数原形定义 #define uchar unsigned char void main (void); // 主函数 void LED_out(uchar X); // LED单字节串行移位函数 void LED_print (uchar p, uchar...
分类:其他好文   时间:2015-03-09 22:22:35    阅读次数:276
Leetcode-Reverse Bits
Reverse bits of a given 32 bits unsigned integer.For example, given input 43261596 (represented in binary as00000010100101000001111010011100), return ...
分类:其他好文   时间:2015-03-09 20:52:28    阅读次数:160
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!