码迷,mamicode.com
首页 >  
搜索关键字:int b)将整数n转换为以b进制的数保存到s中    ( 143001个结果
union和bit field巧妙进行寄存器位操作
1. 用union结构区分大小端 #define read_bits(stc, field)({stc.raw = 0x12345678; stc.bits.field;}) union a{ unsigned int raw; struct { unsigned int bit_a : 8; un ...
分类:其他好文   时间:2021-04-23 12:09:11    阅读次数:0
【Java笔试】输入输出模板
笔试算法题中,有时候是要自己处理输入,比如从键盘中接收一个数,整理了一些常用的,真正笔试之前可以看一看。 输入 循环输入: Scanner sc = new Scanner(System.in); while (sc.hasNextLine()){ String s = sc.nextLine(); ...
分类:编程语言   时间:2021-04-23 12:06:51    阅读次数:0
面试题 08.11. 硬币
1.状态定义 dp[i]表示组成面额 i,有多少种方案。 2.状态转移方程 int[] coins = new int[]{1,5,10,25}; for(int coin: coins) { dp[k] += dp[k - coin]; } 比如dp[36] = dp[36-1] + dp[36 ...
分类:其他好文   时间:2021-04-23 12:06:20    阅读次数:0
__cxa_demangle
typeid操作符可以用来获取一个类型/表达式的名称: #include <iostream> #include <typeinfo> using namespace std; int main() { std::cout << typeid(int).name() << std::endl; re ...
分类:其他好文   时间:2021-04-23 12:05:50    阅读次数:0
矩阵转换
java 矩阵转换: class ImageUtil{ public static int[][] convert2DArray(int[][] arr){ int height=arr.length; int width=arr[0].length; int[][] result=new int[ ...
分类:其他好文   时间:2021-04-23 12:03:31    阅读次数:0
递归函数底层原理浅析
一、递归函数 看如下递归函数: 1 int f(int n){ 2 if(n == 1){ 3 return 1; 4 } 5 return f(n - 1) + 1; 6 } 客户端调用该递归函数时传入n = 5, 返回的函数值为5。那么它的调用堆栈(call stack)是怎么样的?又是如何计算 ...
分类:其他好文   时间:2021-04-23 12:01:13    阅读次数:0
debian 升级内核
今天决定把Debian 10.1自带的4.19内核升级到5.2.14。 需要的工具automake、make、g++(包含gcc)、bison、flex、libelf-dev、libssl-dev、bc。 懒人命令: sudo apt install -y automake make g++ bis ...
分类:其他好文   时间:2021-04-23 11:58:49    阅读次数:0
L1-063 吃鱼还是吃肉 (10 分)
水题。 int h[]={129,130}; int w[]={25,27}; int main() { int T; cin>>T; while(T--) { int sex,height,weight; cin>>sex>>height>>weight; vector<string> res; ...
分类:其他好文   时间:2021-04-23 11:57:55    阅读次数:0
python---opencv常用函数
求点的最小外接矩 rect1 = cv2.minAreaRect(box): def back_forward_convert(coordinate, with_label=True): """ :param coordinate: format [x1, y1, x2, y2, x3, y3, x ...
分类:编程语言   时间:2021-04-23 11:53:53    阅读次数:0
linux shell if语句
1、测试1 [root@centos7 test2]# ls a.txt [root@centos7 test2]# if [ -e a.txt ]; then echo "exist";else echo "no nxist"; fi exist [root@centos7 test2]# if ...
分类:系统相关   时间:2021-04-23 11:53:02    阅读次数:0
143001条   上一页 1 ... 87 88 89 90 91 ... 14301 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!