码迷,mamicode.com
首页 >  
搜索关键字:int    ( 143001个结果
[GO]golang实现AES加解密
直接上代码: package tools import ( "bytes" "crypto/aes" "crypto/cipher" ) func PKCS5Padding(ciphertext []byte, blockSize int) []byte { padding := blockSize ...
分类:其他好文   时间:2021-07-19 16:44:12    阅读次数:0
有意思的问题
#1.输出本身的代码 #include<cstdio> char s[]="#include<cstdio>%cchar s[]=%c%s%c;int main(){printf(s,10,34,s,34);}";int main(){printf(s,10,34,s,34);} ...
分类:其他好文   时间:2021-07-19 16:39:21    阅读次数:0
Python用函数判断输入的字符是不是数字,以及它是否大于等于0,如果大于0,返回它,小于0,返回它的相反数。
# 判断输入的字符是不是数字,以及它是否大于等于0,如果大于0,返回它,小于0,返回它的相反数。def function(x): if x.isdigit() and int(x) >= 0: # 判断是否都是数字,是的话赋予int型 return x elif x.isalpha(): # 判断是 ...
分类:编程语言   时间:2021-07-19 16:38:52    阅读次数:0
【LG P4310】绝世好题
分析 令 \(dp_i\) 表示数列到目前为止最后一项第 \(i\) 位为 \(1\) 的最大子序列长度,每读入一个数时就大力转移。一个数可以被它所有的二进制位的 \(dp\) 值转移,然后把它转移到它的所有二进制位的 \(dp\) 值上。 复杂度 \(O(n\log_2n)\)。 代码 #incl ...
分类:其他好文   时间:2021-07-19 16:38:33    阅读次数:0
算法学习刷题记录-210717
3768. 字符串删减 - AcWing题库 思路 双指针的练习 C++代码 #include <iostream> #include <cstring> #include <algorithm> using namespace std; int main() { int n; string s; ...
分类:编程语言   时间:2021-07-19 16:34:51    阅读次数:0
实现线程池-Linux C版本
线程池的作用 在多线程的应用中,线程的频繁创建和销毁会浪费时间,从而影响效率,所以引进线程池和概念,将多个线程维护在线程池中,避免了线程频繁创建与销毁的开销问题 线程池的结构 结构体 struct threadpool_t { pthread_mutex_t lock; //互斥锁 pthread_ ...
分类:编程语言   时间:2021-07-19 16:30:19    阅读次数:0
选择排序
public static void main(String[] args) { int[] aa = {5, 86, 21, 231, 4, 3, 1, 74}; paixu(aa); printaaaa(aa);}public static void paixu(int[] aa) { for ...
分类:编程语言   时间:2021-07-19 16:29:05    阅读次数:0
C++ 获取 PE 文件的各种信息
首先感谢 cyxvc 老哥,他的代码可读性超高,精简有用以理解,我找这方面的资料好久了,这篇文章对我帮助很大。 参考代码: #include "stdafx.h" #include <Windows.h> extern void DirectoryString(DWORD dwIndex); int ...
分类:编程语言   时间:2021-07-16 17:42:56    阅读次数:0
c++ 结构体容器(vector)类型初始化及结构体vector指针传递
1 #include <iostream> 2 #include <stdio.h> 3 #include <vector> 4 5 6 struct BoxInfo 7 { 8 int label; 9 float score; 10 }; 11 12 13 int bbox_init(std:: ...
分类:编程语言   时间:2021-07-16 17:31:29    阅读次数:0
消除 if else 判断
1.if..else public int calculate(int a, int b, String operator) { int result = Integer.MIN_VALUE; if ("add".equals(operator)) { result = a + b; } else ...
分类:其他好文   时间:2021-07-15 18:58:38    阅读次数:0
143001条   上一页 1 2 3 4 5 ... 14301 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!