码迷,mamicode.com
首页 >  
搜索关键字:to the gcc binary    ( 19550个结果
Codeforces Round #678 (Div. 2) C. Binary Search (二分,组合数)
题意:有长度$n$的序列,让你构造序列,使得二分查找能在$pos$位置找到值$x$.问最多能构造出多少种排列? 题解:题目给出的$pos$是固定的,所以我们可以根据图中所给的代码来进行二分,确定有多少数小于$x$和大于$x$,然后根据排列组合即可算出答案. 代码: int n,x,pos; ll f ...
分类:其他好文   时间:2020-10-27 11:38:34    阅读次数:29
攻防世界 CRYPTO sherlock
打开txt ,观察反常必有妖: 提取全文故意大写的字母; kali@kali:~/桌面$ strings sherlock.txt | grep -o '[A-Z]' | tr -d '\n' strings 打印文件中可打印的字符 grep -o 只显示匹配到的字符串 tr -d 删除指定字符 发 ...
分类:其他好文   时间:2020-10-27 11:34:08    阅读次数:27
Leetcode 95 Unique Binary Search Trees II
题目介绍 给定正整数n,利用1到n构造所有可能的二叉树,并返回。 Example: Input: 3 Output: [ [1,null,3,2], [3,2,null,1], [3,1,null,null,2], [2,1,3], [1,null,2,null,3] ] Explanation: ...
分类:其他好文   时间:2020-10-26 11:19:06    阅读次数:17
Leetcode 98 Validate Binary Search Tree
题目介绍 判断给定二叉树是否为一棵二叉搜索树。 Examples: 2 / \ 1 3 Input: [2,1,3] Output: true 5 / \ 1 4 / \ 3 6 Input: [5,1,4,null,null,3,6] Output: false Solution 仅仅使用递归判断 ...
分类:其他好文   时间:2020-10-26 11:18:28    阅读次数:24
Leetcode 114 Flatten Binary Tree to Linked List
题目介绍 给定二叉树,将其原地变成一个链表。 Example: 1 / \ 2 5 / \ \ 3 4 6 1 \ 2 \ 3 \ 4 \ 5 \ 6 Solutions 直观解法 发现链表的结果与先序遍历一致,因此先进行先序遍历,再根据遍历的结果构造链表。 # Definition for a b ...
分类:其他好文   时间:2020-10-26 11:17:57    阅读次数:15
【CF1436C】Binary Search 题解
原题链接 题意简介 要求有多少种 n 的排列,能够通过二分法正确地找到放在 pos 处的数字 x。 答案对 1e9+7 取模。n<=1000。 采用的二分法如下图: 思路分析 首先,这个排列中有一个位置是固定的,就是 a[pos] = x 。 我们知道,二分查找的过程是不断缩小区间的过程,想要找到一 ...
分类:其他好文   时间:2020-10-26 10:58:44    阅读次数:23
二叉树后续遍历的几种方式
二叉树的后续遍历(Leetcode 145) 数据结构定义: // Definition for a binary tree node. public class TreeNode { int val; TreeNode left; TreeNode right; TreeNode() {} Tre ...
分类:其他好文   时间:2020-10-24 10:25:33    阅读次数:22
分布式文件存储数据库 MongoDB
MongoDB 简介 Mongo 并非芒果(Mango)的意思,而是源于 Humongous(巨大的;庞大的)一词。 MongoDB 是一个基于分布式文件存储的 NoSQL 数据库。由 C++ 语言编写。旨在为 WEB 应用提供可扩展的高性能数据存储解决方案。关于什么是 NoSQL 可阅读《学了那么 ...
分类:数据库   时间:2020-10-24 09:44:20    阅读次数:25
CentOS 7 安装redis
1. su root进入root模式 2. 安装gcc套装: yum install cpp yum install binutils yum install glibc yum install glibc-kernheaders yum install glibc-common yum insta ...
分类:其他好文   时间:2020-10-21 21:00:03    阅读次数:24
阿里云CentOS 8 安装Nginx
1、安装nginx yum -y install gcc make zlib-devel pcre pcre-devel openssl-devel sudo yum install -y nginx 2、配置防火墙80与443 sudo firewall-cmd --permanent --zon ...
分类:其他好文   时间:2020-10-20 16:25:08    阅读次数:28
19550条   上一页 1 ... 28 29 30 31 32 ... 1955 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!