简介 使用感觉类似动态规划的思路进行计算 code class Solution { public: int maxProfit(vector<int>& prices) { int inf = 1e9; int minPrice = inf; int maxProfit = 0; for(auto ...
分类:
其他好文 时间:
2021-05-24 13:09:51
阅读次数:
0
checksec发现保护全开,程序扔入IDA 发现程序支持两个功能,读和写 读入部分: 其中0x202860为一个文件标识符,对应的是/dev/urandom,获取的是随机数,程序输出0x202060 + 8 * v1 处的数据 写入部分: 允许输入一个v2,程序在0x202060 + 8 * v2 ...
分类:
其他好文 时间:
2021-05-24 13:05:12
阅读次数:
0
https://www.cnblogs.com/hezhiyao/p/7833867.html import numpy as np x = np.array([[[0], [1], [2]]]) print(x) """x= [[[0] [1] [2]]] """ print(x.shape) # ...
分类:
其他好文 时间:
2021-05-24 13:02:32
阅读次数:
0
这题考察的是读者对于for循环的基础能力,考点为True与False的理解,难度为:1颗星 1 #include<stdio.h> 2 void fun(int n) 3 { 4 // 质数:只有两个正因数(1和自己)的自然数即为质数。 5 // 比1大但不是素数的数称为合数。1和0既非素数也非合数 ...
分类:
其他好文 时间:
2021-05-24 12:46:45
阅读次数:
0
比如计算3的10次方 将10写成二进制:1010 将这个二进制数拆分成8+2 所以3的10次方可以表示为3^2*3^8 任何一个整数,都可以拆分成二进制和的形式,由下面某几个个数字求和 1、2、4、8...... 快速幂模板 int qpow(int a, int b, int p) { int a ...
分类:
其他好文 时间:
2021-05-24 12:45:02
阅读次数:
0
算法代码 C#代码 using System; namespace Prim { class Program { static void Main(string[] args) { int numberOfVertexes = 9, infinity = int.MaxValue; int[][] ...
分类:
编程语言 时间:
2021-05-24 12:41:56
阅读次数:
0
学习记录,仅供参考,希望可以指出错误 根据带头结点的线性链表改编,即elemtype也变成了struct结构 #include<stdio.h> #include<stdlib.h> //改由带头结点的线性链表 #define OK 1 #define ERROR 0 typedef int sta ...
分类:
其他好文 时间:
2021-05-24 12:40:12
阅读次数:
0
补题链接:Here 算法涉及:DP + 离散化 \(l\) 的范围太大,无法作为数组下标,所以先离散化,再DP。两点间的距离d大于t时,一定可以由 \(d\ \%\ t\) 跳过来,所以最多只需要t+d%t种距离的状态就可以表示这两个石子之间的任意距离关系。这样就把题目中的 \(10^9\) 压缩成 ...
分类:
其他好文 时间:
2021-05-24 12:38:52
阅读次数:
0
第一步,下载并准备安装exa软件 1.安装依赖 exa软件由rust编写,所以首先必须安装rust 在合适的位置下载软件 wget https://static.rust-lang.org/rustup.sh 运行 sudo sh rustup.sh 2.下载软件 来到exa官方网站:https:/ ...
分类:
系统相关 时间:
2021-05-24 12:38:39
阅读次数:
0
public class WindowSell2 { private int num=0; public synchronized void increade() throws InterruptedException{ while (num != 0){ this.wait(); } num++; ...
分类:
编程语言 时间:
2021-05-24 12:36:19
阅读次数:
0