easy_md bjdctf 2020 easy

【HTB】 Analytics 红队 easy

1、扫描端口、服务 nmap 10.10.11.233 -sCV 2、检查网页 1)访问 10.10.11.233,失败,出现一个域名 添加进 hosts echo '10.10.11.233 analytical.htb' >> /etc/hosts 再次访问,这下就能成功访问 2)检查页面信息 ......
红队 Analytics easy HTB

[WUSTCTF 2020](病假回归)

[WUSTCTF 2020]level1 下载下来后有俩文件,先看level1 查壳,无壳64位,拖入IDA中 看到其中的i&1,为按位与运算,取2进制整数 i 的最低位,如果最低位是1 则得1,如果最低位是0 则得0。 奇数 i 的最低位 是1,偶数i 的最低位 是0。 再看到output文件,里 ......
病假 WUSTCTF 2020

P6625 [省选联考 2020 B 卷] 卡牌游戏

题目描述 轩轩某天想到了一个卡牌游戏,游戏规则如下: 初始时轩轩的手中有自左向右排成一排的 \(n\) 张卡牌,每张卡牌上有一个整数分值。 接下来,轩轩每次可以选取卡牌序列最左边的连续若干张卡牌(至少 \(2\) 张),将它们替换为一张新卡牌。新卡牌将插入到序列的最左端,它的分值为本次操作中被替换掉 ......
P6625 6625 2020

P6624 [省选联考 2020 A 卷] 作业题

大力推式子+矩阵树题 简记 \(\gcd(w_1,w_2,...,w_{n-1})\) 为 \(G(W)\) \[\sum_{T\in E} \left(\sum_i^{n-1} w_i\right)\times G(W)\\ =\sum_g^M g\sum_{Tree\in E} \left(\s ......
作业题 P6624 6624 2020

【HTB】 Devvortex 红队 easy

1、端口扫描 2、网页检测 发现一个表单,查看源代码发现是假表单 可能发现一个自定义域名 3、子域名扫描 gobuster dir -w /usr/share/dirb/wordlists/common.txt -u http://dev.devvortex.htb/ --no-error 4、目录 ......
红队 Devvortex easy HTB

leetcode-1662-easy

Check If Two String Arrays are Equivalent 思路一:把第一个数组入队列,然后遍历比较第二个数组 public boolean arrayStringsAreEqual(String[] word1, String[] word2) { Deque<Charac ......
leetcode 1662 easy

leetcode-1732-easy

Find the Highest Altitude 思路一:直接遍历 public int largestAltitude(int[] gain) { int val = 0; int max = val; for (int i : gain) { val += i; max = Math.max( ......
leetcode 1732 easy

leetcode-1646-easy

Get Maximum in Generated Array You are given an integer n. A 0-indexed integer array nums of length n + 1 is generated in the following way: nums[0] = ......
leetcode 1646 easy

leetcode-2169-easy

Count Operations to Obtain Zero You are given two non-negative integers num1 and num2. In one operation, if num1 >= num2, you must subtract num2 from ......
leetcode 2169 easy

leetcode-2180-easy

Count Integers With Even Digit Sum Given a positive integer num, return the number of positive integers less than or equal to num whose digit sums are ......
leetcode 2180 easy

leetcode-1455-easy

Check If a Word Occurs As a Prefix of Any Word in a Sentence Given a sentence that consists of some words separated by a single space, and a searchWor ......
leetcode 1455 easy

leetcode-1464-easy

Maximum Product of Two Elements in an Array Given the array of integers nums, you will choose two different indices i and j of that array. Return the ......
leetcode 1464 easy

leetcode-1512-easy

Number of Good Pairs Given an array of integers nums, return the number of good pairs. A pair (i, j) is called good if nums[i] == nums[j] and i < j. E ......
leetcode 1512 easy

leetcode-1550-easy

Three Consecutive Odds Given an integer array arr, return true if there are three consecutive odd numbers in the array. Otherwise, return false. Examp ......
leetcode 1550 easy

leetcode-1572-easy

Matrix Diagonal Sum Given a square matrix mat, return the sum of the matrix diagonals. Only include the sum of all the elements on the primary diagona ......
leetcode 1572 easy

CF1824B1 LuoTianyi and the Floating Islands (Easy Version) 题解

题意: 思路: 由于 $ k ∈ [1,3] $ ,分类讨论: 当 $ k = 1 $ 时,有人结点自身即为好结点,每种情况的期望为 $ \frac{1}{n} $ , $ n $ 种情况的期望和为 $ 1 $ 。最终答案即为 $ 1 $ 。 当 $ k = 2 $ 时,$ 2 $ 个有人结点之间的 ......
题解 LuoTianyi Floating Islands Version

C1. Good Subarrays (Easy Version)

思路:我们枚举每一个左端点,对于每一个左端点,寻找最长的满足条件的区间,这个区间长度就是左端点对答案的贡献,可以发现具有单调性,右端点只会前进不会倒退。所以我们两个指针各扫一遍区间就可以。 #include <bits/stdc++.h> #define ls p<<1 #define rs p<< ......
Subarrays Version Good Easy C1

2020年高考数学真题一题多解

(2020理科数学20)已知\(A,B\)为椭圆\(E:\dfrac{x^2}{a^2}+y^2=1(a>1)\)的左右顶点,\(G\)为\(E\)上的上顶点,\(\overrightarrow{AG}\cdot\overrightarrow{GB}=8,P\)为直线\(x=6\)上的动点,\(PA ......
真题 数学 2020

C1. Good Subarrays (Easy Version)(推公式找性质)

思路: \[能想到平方是比较特殊的,因为x*x一定是x的倍数也就是说\sqrt[2]{x*x} = {x} \]\[所以需要考虑平法之间的数手模一下样例可以发现 [x^2 ,(x+1)^2)之间是x倍数的有x^2 \]\[x*(x+1), x*(x+2)这三个,所以可以知道平方之间有三个,只要讨论一 ......
公式 Subarrays 性质 Version Good

BUUCTF-RE-49-[羊城杯 2020]easyre

BUUCTF-RE-[羊城杯 2020]easyre 进入main,简单分析之后进入encode_one int __cdecl main(int argc, const char **argv, const char **envp) { int v3; // eax int v4; // eax ......
BUUCTF-RE BUUCTF easyre 2020 49

LOJ3405 「2020-2021 集训队作业」Gem Island 2

LOJ 传送门 组合计数神题。下文的 \(m\) 指原题面中的 \(d\),\(k\) 指原题面中的 \(r\)。 考虑最后每个人得到的宝石数量的序列 \(s_1, s_2, \ldots, s_n\),考虑这种方案的出现次数。首先要在 \(m\) 次操作中分别选 \(s_i - 1\) 次给第 \ ......
集训队 Island 3405 2020 2021

[Codeforces] CF1753A1 Make Nonzero Sum (easy version)

题目大意 给你一个数组 \([a_1,a_2,...a_n]\) ,其中每一项 \(a_i\) 都为 \(1\) 或 \(-1\) ,你需要构造一个划分 \([l_1,r_1],[l_2,r_2],[l_3,r_3],...[l_k,r_k]\) 使得: 将每一个区间内的数按照以下方法计算出\(s_ ......
Codeforces Nonzero version 1753A 1753

hackthebox broker easy

brief intruducton 1.The first breakthrouth is week password of admin at http://10.10.11.243/ website. if we could utilize admin/admin successfully acc ......
hackthebox broker easy

RuCode 2020 Division A+B. I ✖ [PR #5] 和平共处

前言 认认真真学习了一下这道题相关的做法以及有关的二分图网络流理论,感觉自己又刷新了一些东西的理解。 所以说我们就从普通的二分图匹配开始吧! 二分图匹配 众所周知, 题意 给定 #include <map> #include <cstdio> #include <algorithm> using n ......
Division 和平 RuCode 2020 PR

AutoCAD .NET 二次开发(2020版)找到折线上剩余的顶点

如果一条折线有两个顶点,已对其中一个顶点应用了圆角,则还剩下一个顶点。 如何通过代码找到这些剩余的顶点(可能不止一个)? 可通过遍历所有顶点,判断每个点连接的两边的线是否为直线 如果都为直线,则为顶点,不是圆角。 代码如下: for (int i = 1; i < polyline.NumberOf ......
折线 顶点 AutoCAD 2020 NET

AutoCAD .NET 二次开发(2020版)选择特定对象另存为新文件

如果需要从当前模型空间中选择部分图形,直接另存为一个新文件,可用如下方法 //spObjectId 对象的ID //path 保存路径 //注意,实际内部使用了ObjectIdCollection 对象,一次可以保存多个ID public static void SaveObject(ObjectI ......
对象 AutoCAD 文件 2020 NET

AutoCAD .NET 二次开发(2020版)将自定义网格作为坐标系

如图所示,是自由绘制的一个网格(间距符合实际距离),并且制作为了块。 本文不讨论如何绘制网格,而是在有了一个自定义网格之后,如何将网格当作可用坐标系,去获取到网格上的点的坐标。 这里的坐标指的是点相对于网格上显示的坐标,而不是实际的CAD模型空间的坐标。 如下图,若在(30,160)的位置画一个图形 ......
坐标系 网格 坐标 AutoCAD 2020

AutoCAD .NET 二次开发(2020版)在模态窗口中控制窗口的隐藏和显示

如果你创建了模态窗口,虽然一些API,例如Editor.GetSelection(),可以自动隐藏模式对话框,但如果从模态窗口出发与编辑器(编辑器指的模型空间,即你绘图的窗口)交互, 它会在GetSelection()完成后立即显示对话框,而你的其它代码可能仍在进行中,两者处于异步模式。 由于模式对 ......
模态 AutoCAD 2020 NET

2023.11.29 日记 Take it easy

很不想把文化课写到日记里。但今天有点烦了。 考试考的内容是要通过刷题得知的,并非学习。 我已经在别的平台抱怨过很多次当今教育现状了,无济于事是肯定的,反而会打消学习的积极性。 由于训练原因欠了很多课,再加上两个学校的进度不同、考试时间不同,我的学习成果实在像是被虫蛀了一样——既不扎实,也不空洞。 再 ......
日记 2023 Take easy 11