solution p9194 the of

Codeforces Round 730 (Div. 2) B. Customising the Track

有 \(n\) 条高速公路,第 \(i\) 条告诉公路上的车流为 \(a_i\) 。现在可以执行以下操作任意次: 将第 \(i\) 条高速公路上的一辆车移到第 \(j\) 条高速公路。 需要求最小的 \(\sum_{i = 1}^{n}\sum_{j=i+1}^{n} |a_i - a_j|\) 。 ......
Customising Codeforces Round Track 730

UVA10054 The Necklace 题解

好可恶一道题,怎么没人告诉我输出之间有空行( 思路是先抽象成图,然后跑一边dfs记录边的前后顺序。 对于不能成环的情况,只需要再开个数组记录度数判断奇点即可。 若存在奇点则break掉,剩下的跑dfs、 //produced by miya555 //stupid mistakes:1.多测要清空 ......
题解 Necklace 10054 UVA The

10 Rules of Good and Bad Studying 学习的10条好与坏规则

10 Rules of Good Studying 良好学习的10条法则 Use recall. After you read a page, look away and recall the main ideas. Highlight very little, and never highligh ......
Studying 规则 Rules Good Bad

The 2022 ICPC Asia Shenyang Regional Contest

C. Clamped Sequence 因为\(n\)的范围不大,并且可以猜到\(l,r\)中应该至少有一个在\(a_i,a_i-1,a_i+1\)上。所以直接暴力枚举\(l\)或\(r\)然后暴力的计算一下 #include <bits/stdc++.h> using namespace std; ......
Shenyang Regional Contest 2022 ICPC

P5299 [PKUWC2018] Slay the Spire

P5299 [PKUWC2018] Slay the Spire 洛谷:P5299 [PKUWC2018] Slay the Spire LOJ:#2538. 「PKUWC2018」Slay the Spire 前言:请分清楚 使用 和 抽取。九条要 抽取 \(m\) 张牌,但只会 使用 \(k\) ......
P5299 PKUWC Spire 5299 2018

《AT_abc322_g Two Kinds of Base》解题报告

好题,考场上想到做法了,没写出来,被薄纱了,记录一下。 主要是做的比较顺一下就想到了。 我们先转换一下 \(f\) 函数 \(f(S,a,b)=\sum\limits_{i=1}^k S_i\times (a^{k-i}-b^{k-i})\) 我们可以发现对于位数 \(>2\) 的,一定满足 \(a ......
报告 AT_abc Kinds Base 322

The name org.freedesktop.secrets was not provided by any .service files 报错问题

在搭建cicd docker 靶场的时候出现这个问题,由于是第一次遇到,就想记录下来 通过各种搜索资料搜索 发现只要安装如下包就没问题 1 apt -y install gnome-keyring 这样做之后,一切都可以 这样就可以了 ......
freedesktop provided secrets service 问题

CF1575I Illusions of the Desert

prologue 还是太菜了,这个 154 行的树剖20min才敲完。 analysis 首先,处理这个给到我们的这个式子。 \[\max(\mid a _ u + a _ v \mid, \mid a _ u - a _ v \mid) \]我们可以分类讨论: \(a > 0, b > 0\): ......
Illusions Desert 1575I 1575 the

The solution of P3012

problem & blog 很明显是个 DP。 于是我们定义 \(dp_{i,j,k}\) 为末尾的字符的 ASCII 码为 \(i\),有 \(j\) 个大写字母,\(k\) 个小写字母。 然后在枚举能接在 \(i\) 之后所有字母即可。 然后考虑 \(dp_{i,j,k}\) 给后面的 DP ......
solution P3012 3012 The of

The 2022 ICPC Asia Xi'an Regional Contest

C. Clone Ranran 最优解一定是先复制,在做题。最多只需要复制大约 30 次,直接枚举即可 #include <bits/stdc++.h> using namespace std; #define int long long int a , b, c; void solve(){ ci ......
Regional Contest 2022 ICPC Asia

Go - Logging to the System Log Service

Problem: You want to log in to the system log instead of your logfiles. Solution: Use the log/syslog package to write to syslog. Syslog is a standard ......
Logging Service System Log the

The solution of ABC144F

都不知道什么时候做的题了 problem & blog 一开始很容易想到枚举断边然后 DP 算代价。 于是很容易想到 DP 状态定义:设 \(dp_u\) 为从 \(u\) 出发到 \(n\) 的期望步数。 那么显然有 \(dp_u = \sum^{v_n}_{v_1} \dfrac{dp_{v_{ ......
solution 144F The ABC 144

vue_error_Runtime directive used on component with non-element root node. The directives will not function as intended

翻译: '运行时指令,用于非元素根节点的组件。这些指令将无法发挥预期的作用'; 这个错误发生在我将v-show放在自定义组件上时, 我想是因为自定义组件在渲染时会被自定义组件的内部元素替换, 因此设置是无效的 解决: 在自定义组件外加一个div, 把v-show写在div上 ......

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 ......
题解 Flamingoes Mystery 1425F 1425

Go - Change What Is Being Logged by the Standard Logger

Problem: You want to change what the standard logger logs. Solution: Use the SetFlags function to set flags and add fields to each log line. The defau ......
Standard Change Logged Logger Being

ABC211D Number of Shortest paths

分析 一道显然的最短路,用 dijkstra 算法。 计算最短路的同时,保存最短路个数,如果与当前最短路相同,最短路个数相加,否则到这个节点的最短路个数为上一个节点的最短路个数。 Accepted Code #include <bits/stdc++.h> using namespace std; ......
Shortest Number paths 211D ABC

Gym 104270 The 2018 ICPC Asia Qingdao Regional Programming Contest (The 1st Universal Cup, Stage 9: Qingdao)

A. Sequence and Sequence B. Kawa Exam 可以发现,对答案会产生影响的只有割边,把所有边双缩起来,然后就是一个森林。 考虑一个树的时候怎么做,就是对于每条边求出这条边两端的众数个数,考虑线段树合并,每次动态维护子树内的众数和子树外的众数。 #include<iost ......
Qingdao Programming The Universal Regional

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 ......
Dependent Multiple Packages Versions Using

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 ......
Dependent Requiring Packages Versions Local

Begin of PHP

打开直接就是一份php代码,分析代码发现需要闯关,一共有五关 直接用ai给我翻译一下 Level 1: 用户需要提供名为 'key1' 和 'key2' 的GET参数。 这两个参数的内容不应相同,但它们的MD5哈希值应该相同。 如果条件满足,将设置变量 $flag1 为True,否则会显示 "nop ......
Begin PHP of

Begin of HTTP

打开 GET get方式上传,直接在网址栏上传即可 POST 先找到secret,一般藏在网页前端代码里 解码得 得F12,用hackbar上传 Cookie 直接点击cookie,把他改成ctfer即 User-Agent 直接点击user-agent然后改变浏览器直接上传,注意此处不能有中文 R ......
Begin HTTP of

Road of the King

2023-09-28 题目 Road of the King 难度&重要性(1~10):8.5 题目来源 luogu 题目算法 (纯)dp 解题思路 一道非常好而有意思的题目,码量巨短。 首先观察数据范围,发现是 \(n\le 300\),考虑 \(O(n^3)\) 的 dp。 主要的难点在于如何去 ......
Road King the of

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 ......
commited actually memory much that

LOJ 6479 [ICPC World Finals 2017] 小小水管工 Son of Pipe Stream 题解

更好的阅读体验 题意 原题链接 给出 \(n\) 个城市和 \(m\) 条双向管道,以及两个实数 \(v\) 和 \(a\)。有两种液体,分别是水和 Flubber(下面简写为 W 和 F)。\(1\) 号和 \(2\) 号城市分别生产 Flubber 和水,并通过管道流入 \(3\) 号城市。对于 ......
题解 水管 Finals Stream World

pip安装包报错:PS C:\Users\Administrator\Desktop> pip install request ERROR: Could not find a version that satisfies the requirement request (from versions: none)

PS C:\Users\Administrator\Desktop> pip install requestERROR: Could not find a version that satisfies the requirement request (from versions: none)ERRO ......

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 ......
Out-of-Memory Syndrome Pagefile Memory Still

Solution -「JOISC 2020」建筑装饰 4

朴素的 DP 形式是定义 \(f_{i, j, A/B}\) 表示前 \(i\) 个元素选择了 \(j\) 个 \(A\) 的可达性. \(\mathcal O(n^2)\). 交换状态与值域, 定义 \(f_{i, A/B, A/B}\) 表示前 \(i\) 个元素中的最后一个元素 (即 \(i\ ......
建筑装饰 Solution JOISC 2020

qoj6735. Tree (The 1st Universal Cup. Stage 22: Shaanxi)

https://qoj.ac/contest/1287/problem/6735 考虑定一个根,然后把每个点的点权附属在父边权上,让每条边的边权变成一个 pair。 这样,一个符合条件的路径需要满足的条件是:路径内所有边的边权 pair 相同,以及 路径根节点(lca)的颜色符合。 对于当前树上每个 ......
Universal Shaanxi Stage 6735 Tree

Begin of Upload

wp 上传的文件后缀有要求 这个看出来是简单的客户端检测,直接用bp抓包改后缀即可 先将原来的.php改成.png上传再到bp改后缀名 放包直接蚁剑连接 根目录找到flag 正文 题目很简单,主要想分享一下过程中遇到的坑 要加http 就是连接蚁剑的时候网址需要加http不然会显示添加数据失败 添加 ......
Upload Begin of