desertification china of
2022 China Collegiate Programming Contest (CCPC) Mianyang Onsite
Preface 久违地VP一场,由于CCPC桂林在即因此最近就自主VP一下去年的CCPC 这场打的时候全队不在状态,签完到后我就因为A题一个corner case没考虑到卡了快两个小时 然后好不容易搞过去徐神上来有狂WA E题,最后也是喜提+11 后面写的D题也是需要特判,好家伙又是快到比赛结束才看 ......
CF1425F Flamingoes of Mystery 题解
题目传送门 前置知识 前缀和 & 差分 解法 令 \(sum_k=\sum\limits_{i=1}^{k} a_k\)。考虑分别输入 \(sum_2 \sim sum_n\),故可以由于差分知识得到 \(a_i=sum_i-sum_{i-1}(3 \le i \le n)\),接着输入 \(a_2 ......
ABC211D Number of Shortest paths
分析 一道显然的最短路,用 dijkstra 算法。 计算最短路的同时,保存最短路个数,如果与当前最短路相同,最短路个数相加,否则到这个节点的最短路个数为上一个节点的最短路个数。 Accepted Code #include <bits/stdc++.h> using namespace std; ......
Go - Using Multiple Versions of the Same Dependent Packages
Problem: You want to use multiple versions of the same dependent packages in your code. Solution: Use the replace directive in the go.mod file to rena ......
Go - Requiring Local Versions of Dependent Packages
Problem: You want to use local versions of the dependent packages. Solution: Set up Go to use a vendor directory by running go mod vendor. Local versi ......
Begin of PHP
打开直接就是一份php代码,分析代码发现需要闯关,一共有五关 直接用ai给我翻译一下 Level 1: 用户需要提供名为 'key1' 和 'key2' 的GET参数。 这两个参数的内容不应相同,但它们的MD5哈希值应该相同。 如果条件满足,将设置变量 $flag1 为True,否则会显示 "nop ......
Begin of HTTP
打开 GET get方式上传,直接在网址栏上传即可 POST 先找到secret,一般藏在网页前端代码里 解码得 得F12,用hackbar上传 Cookie 直接点击cookie,把他改成ctfer即 User-Agent 直接点击user-agent然后改变浏览器直接上传,注意此处不能有中文 R ......
Road of the King
2023-09-28 题目 Road of the King 难度&重要性(1~10):8.5 题目来源 luogu 题目算法 (纯)dp 解题思路 一道非常好而有意思的题目,码量巨短。 首先观察数据范围,发现是 \(n\le 300\),考虑 \(O(n^3)\) 的 dp。 主要的难点在于如何去 ......
34 GB of commited memory but no app actually commited that much
34 GB of commited memory but no app actually commited that much Ask Question Asked 3 years, 8 months ago Modified 3 years, 8 months ago Viewed 493 tim ......
LOJ 6479 [ICPC World Finals 2017] 小小水管工 Son of Pipe Stream 题解
更好的阅读体验 题意 原题链接 给出 \(n\) 个城市和 \(m\) 条双向管道,以及两个实数 \(v\) 和 \(a\)。有两种液体,分别是水和 Flubber(下面简写为 W 和 F)。\(1\) 号和 \(2\) 号城市分别生产 Flubber 和水,并通过管道流入 \(3\) 号城市。对于 ......
The Out-of-Memory Syndrome, or: Why Do I Still Need a Pagefile?
The Out-of-Memory Syndrome, or: Why Do I Still Need a Pagefile? July 19, 2016 aziusMemory Management 13 Comments Windows’ memory management—specifical ......
Begin of Upload
wp 上传的文件后缀有要求 这个看出来是简单的客户端检测,直接用bp抓包改后缀即可 先将原来的.php改成.png上传再到bp改后缀名 放包直接蚁剑连接 根目录找到flag 正文 题目很简单,主要想分享一下过程中遇到的坑 要加http 就是连接蚁剑的时候网址需要加http不然会显示添加数据失败 添加 ......
Solution of 洛谷-P1896
并不会有更好的阅读体验 \(\text{Sol}\) 我们先看一眼数据范围: \(1 \le N \le 9\) 没关系,DFS 会出手。 好吧,正经的说,如果暴搜的话复杂度会涨到 \(\text O(2^{n^2})\),\(\text T\) 到飞起。 此时我们发现有个东西叫状压 \(\text ......
2022 China Collegiate Programming Contest (CCPC) Mianyang Onsite GCHMAD
2022 China Collegiate Programming Contest (CCPC) Mianyang Onsite 目录2022 China Collegiate Programming Contest (CCPC) Mianyang OnsiteVP 情况G - Let Them E ......
The 2021 China Collegiate Programming Contest (Harbin) JBEIDG
The 2021 China Collegiate Programming Contest (Harbin) 目录The 2021 China Collegiate Programming Contest (Harbin)VP概况J - Local MinimumB - Magical Subseq ......
[ARC124C] LCM of GCDs 题解
题面 给定 \(N\) 个正整数对 \((a_i, b_i)\) 和两个初始为空的集合 \(S, T\),你可以选择将每个数对的两个元素划分到两个不同的集合中。求 \[\max\operatorname{lcm}(\gcd\limits_{x \in S}x, \gcd\limits_{y \in ......
连接正负极Connection of positive and negative poles
不要把物理公式看作数学公式,请也尊重自然的经验法则。 Don't see the physical formulas as mathematical formulas, please also respect the experience rules of nature. 连接正负极 Connect ......
CS61A: Structure and Interpretation of Computer Programs 笔记
Functions Environment Diagrams:左侧为 Frames,右侧为 Objects。 Name 类似变量名,它们存储在 Frame 中,指向各种各样的 Objects,比如值或函数。一个 Name 同时只能指向一个 Object,但可以改变自身指向,不受“类型”影响(Name ......
Docker|--E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation
错误 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them ......
Go - Live reload of configurations
main.go: package main import ( "encoding/json" "fmt" "log" "os" "time" "github.com/fsnotify/fsnotify" ) type config struct { Name string `json:"name"` ......
nginx访问报错“maximum number of descriptors supported by select() is 1024 while connecting to upstream”问题的处理
1、问题背景 项目:一个人力的系统,主要用于考勤打卡 环境:windows server nginx版本:1.22 问题说明:当早上访问人数增加的时候,就会出现nginx的异常 nginx的后台报错日志: maximum number of descriptors supported by sele ......
[892] Change the background color of a table in a Word document
ref: python-docx Changing Table Cell Background Color. To change the background color of a table in a Word document using Python, you can use the pyth ......
Shrine( Flask SSTI of config )
来自: [WesternCTF2018]shrine 打开是一段源码,这里贴一下: import flask import os app = flask.Flask(__name__) app.config['FLAG'] = os.environ.pop('FLAG') #注册了一个名字为FLAG ......
How to get the original size of an image using JavaScript All In One
How to get the original size of an image using JavaScript All In One
如何使用 JavaScript 获取一个图片像的原始大小
naturalWidth & naturalHeight
aspect ratio / 纵横比
......
爱数anybackup——控制台建立对应的ofs卷、重删卷、自备份卷、元数据卷
以admin登录系统,点击【存储】>【节点管理】>【配置】>【卷管理】 选择对应的【卷类型】 点击【+新建】 输入【卷名称】,选择【挂载路径】,输入【容量】,然后点击创建即可 ......
Knights of the Round Table
prologue 相信很多人都感觉这个题不就是求一下这个二分图的最大独立集嘛,有什么难的,(劈里啪啦、库里跨啦、叮里哐啷)好,不对,好好好,题解! analysis 这个题目实际上并不是一个完整的最大独立集问题,因为在这个题里面,是可以有相互仇恨的骑士的,只要不让他们二人坐成同桌就行。 那么我们就不 ......
How to fix TypeScript error: expression of type can't be used to index type All In One
How to fix TypeScript error: expression of type can't be used to index type All In One
type guard
......
CF1879D Sum of XOR Functions
异或和按位处理的典型例题。 要求所有子区间异或和乘区间长度的总和,朴素的方法是 \(O(n^2)\) 地枚举区间,显然无法通过。 因为涉及异或和,而异或运算不进位,故自然地想到把 \(a_i\) 写成二进制形式,单独研究每一位的贡献,最后再合并。这是处理此类问题的一般思路。 1. 二进制拆分 比方说 ......