containerization hpc-focoused different solutions

SQLAlchemy: What's the difference between flush() and commit()?

SQLAlchemy: What's the difference between flush() and commit()? https://pyquestions.com/sqlalchemy-what-s-the-difference-between-flush-and-commit A Se ......
SQLAlchemy difference between commit flush

Solution Set before NOIP2023

香蕉公司 题意:维护 \(n\) 的排列 \(a_0\) 与 \(p\)。\(q\) 次操作,交换 \(a_0\) 中两个值或 \(p\) 中两个值,或者比较 \(a_x\) 与 \(a_y\) 的字典序大小,其中 \(a_{k,i}=a_{k-1,p_i}\)。 \(n,q\le10^5\),\( ......
Solution before NOIP 2023 Set

Solution Set - DP

CF101E Candies and Stones Link&Submission. DP 的状态设计和转移都是显然的,唯一的问题在于需要输出方案,而这题卡空间。会发现如果用 bitset 存下所有位置的转移,空间刚好多了一点点。所以考虑分两次,第一次只存后 10000 行的转移,然后从最终状态倒退 ......
Solution Set DP

Solution Set - 组合计数

### CF40E Number Table [Link](https://codeforces.com/contest/40/problem/E)&[Submission](https://codeforces.com/contest/40/submission/221783054). 显然 $n ......
Solution Set

CF1615F O(n) solution

$O(n)$ 做法,目前 CF 最优解。 首先,考虑如何计算两个串的答案。 把奇数位置的值取反,那每次操作相当于 $01\to10$ 或 $10\to 01$。于是当两个串 $1$ 的个数相等时可以达成。 可以看作若干个 $1$ 在一条链上移动到新的位置。答案为距离之和,把移动贡献均摊到每条边上,那 ......
solution 1615F 1615 CF

codeforces div 3 contest 894 solutions

IOI失利day1了,打div 3休息一下吧 https://codeforces.com/contest/1862/ A. Gift Carpet 贪心寻找第一个v, 其他的找最早的i,k,a就好了。 应该不需要多说(?) B.Sequence Game 就是想想看当我们有4 3的时候应该怎么做? ......
codeforces solutions contest 894 div

What's the difference between Async Await and Promise in JavaScript All In One

# What's the difference between Async Await and Promise in JavaScript All In One > `Async` vs `Promise` ## demos --> ## (🐞 反爬虫测试!打击盗版⚠️)如果你看到这个信息, 说明 ......
JavaScript difference Promise between Async

2023.08.29T4 - light - solution

# light [P9111 [福建省队集训2019] 最大权独立集问题](https://www.luogu.com.cn/problem/P9111) ## Problem 给定一棵 $n$ 个节点的树,并给定每个点的点权 $a_i$。 定义一次操作为: - 选择一个未被删除的节点 $u$,$w ......
solution light 2023 08 29

A pure js Array reactive solution with Proxy and Reflect All In One

A pure js Array reactive solution with Proxy and Reflect All In One 纯 js 实现数组响应式 ......
reactive solution Reflect Array Proxy

2023.08.29T3 - summer - solution

# summer ## Problem ## Solution 挺好的题,题解也写得很清楚,因此我不过是把题解抄一遍。 赛时打了 $40$ 分,然后挂了 $20$ 分,因为不会前缀和(这个人暴力求区间和,铸币吧)。 前 $40$ 分就是记忆化搜索 + 单调栈: >首先考察对于一个确定的序列,如何求出 ......
solution summer 2023 08 29

2023.08.24T3 - brain - solution

# brain ## Problem 给定一棵以 $1$ 为根的树,给定树上所有点权与边权。 记 $d(i, j)$ 表示 $i$ 到 $j$ 的路径长度。定义一棵树的权值为: $$ \sum\limits_{i = 1}^{n - 1}\sum\limits_{j = i + 1}^{n}a_{i ......
solution brain 2023 08 24

【RL】L7-Temporal-difference learning

## TD learning of state values The data/experience required by the algorithm: - $\left(s_0, r_1, s_1, \ldots, s_t, r_{t+1}, s_{t+1}, \ldots\right)$ or ......

vue报错 Multiple assets emit different content to the same filename index.html

vue-cli版本:@vue/cli@5.0.8 报错现象:想把css和script全部内嵌到html文件中,就用了"HtmlInlineScriptPlugin"插件,打包后js代码被嵌到了head里,导致代码提前执行找不到#app,再配置HtmlWebpackPlugin插件通过inject: ......
different Multiple filename content assets

玄学记录2-一个关于struct封装的东西定义的位置的问题 暨 P2766Solution

# 后言 这是一道网络流的建模题 然后我这个板子是copy的 我把这个定义换了个位置结果就不一样 嗯 是这样的! 然后这篇东西会很杂 思路会比较简洁 因为把建边给讲清楚了就是模板了 # 题目 Problem : [problem on luogu](https://www.luogu.com.cn/ ......
玄学 Solution 位置 东西 struct

difference between store procedures and functions

Functions can't modify anything and must have at least one parameter. They also have to return a result. Stored procedures don't need a parameter, may ......

The difference between Chrome and Firefox

The difference about digital certificates. # Firefox See the alarm info. ![](https://img2023.cnblogs.com/blog/1552062/202307/1552062-20230731073214590 ......
difference Firefox between Chrome The

Solution to CF1840D Wooden Toy Festival

### Statement $T$ 组评测,每组数据给定长度 $n$ 与长度为 $n$ 的序列 $a$,你需要选三个数 $x,y,z$,输出可得到的最小的 $\max\{\min\{|a_i-x|,|a_i-y|,|a_i-z|\}\}$。 ### Solution 如果只要我们选一个数,显然我们要 ......
Solution Festival Wooden 1840D 1840

Solution to CF1840E Character Blocking

### Statement 给你两个字符串。 操作有: * 忽视两个字符串的同一位置一段时间。 * 交换某两个未被忽视的字符(可以跨越字符串)。 * 查询字符串未被忽视的部分是否相等。 ### Solution 考虑字符串哈希。 对每个字符设置一个 hash 值 $\mathrm{ref}$,对每个 ......
Character Solution Blocking 1840E 1840

Solution to AT_abc285_g Tatami

### Statement 请用若干个 $1 \times 1$ 和 $1 \times 2$ 的瓷砖(可以旋转)不重叠地完全覆盖 $H \times W$ 的长方形网格。第 $i$ 行第 $j$ 列的网格有字符 $c_{i,j}$,含义如下: - `1`:该网格只能用 $1 \times 1$ 的 ......
Solution AT_abc Tatami 285 abc

ABC311 Solution

## [A - First ABC](https://atcoder.jp/contests/abc311/tasks/abc311_a) ### Sol 考虑使用三个 `bool` 记录当前 `A` , `B` , `C` 是否出现过,枚举判断即可。 ```cpp #include using n ......
Solution ABC 311

AT_abc251_g Intersection of Polygons Solution

# AT_abc251_g Intersection of Polygons Solution ## Preface 由于某些 $\LaTeX$ 的原因,本文的公式无法正常查看,建议读者访问[博客](https://www.luogu.com.cn/blog/284754/solution-at-a ......
Intersection Polygons Solution AT_abc 251

Solution to AT_abc310_f Make 10 Again

## Statement 你有 $N$ 个骰子和一个序列 $A_i$,第 $i$ 个骰子能等概率掷出 $1 \sim A_i$ 的点数。 在同时掷出 $N$ 个骰子后,求下面所述的条件被满足的概率模 $998,244,353$ 的值: > 能够选出这些骰子的一个子集,使得子集内的骰子掷出的点数和为 ......
Solution AT_abc Again Make 310

[LeetCode] 1218. Longest Arithmetic Subsequence of Given Difference

Given an integer array arr and an integer difference, return the length of the longest subsequence in arr which is an arithmetic sequence such that th ......

Solution Set - “我将它捣成美梦愿你梦里无忧”

[TOC] $$ \text{So long lives this, and this gives life to thee.} \require{\cancel} \newcommand{\op}[1]{\operatorname{#1}} \newcommand{\anc}[0]{\op{anc ......
美梦 Solution Set

Solution Set of NFLS SImulations

在 nfls 的最后一天,来记录一些似乎有意义的题吧。 没有原题(或者我忘了原题)的就简要写下题意,不放原题面了。 [TOC] ![NOI2023 模拟赛 33](https://img2023.cnblogs.com/blog/2913835/202307/2913835-202307120824 ......
SImulations Solution NFLS Set of

【论文解析】EJOR 2011 A clustering procedure for reducing the number of representative solutions in the Pareto Front of multiobjective optimization problems

> 论文名称:A clustering procedure for reducing the number of representative solutions in the Pareto Front of multiobjective optimization problems ### 动机 假 ......

Solution Set - 2023 省队集训

## 2023-7-8 模拟赛 ### 铁路 (railway) Source: ROI 2017 D1T4 C 国有 $n$ 个城市与 $m$ 条铁路线,铁路均为单向,第 $i$ 号铁路线被从起点到终点的 $(s_i + 1)$ 个城市 $c_{i, 1}, c_{i, 2}, \cdots, c ......
省队 Solution 2023 Set

Solution Set - NOI级别真题选做

### [NOI2007] 社交网络 [Link](https://www.luogu.com.cn/problem/P2047)&[Submission](https://www.luogu.com.cn/record/114129998). ### [NOI2009] 管道取珠 [Link](h ......
真题 Solution 级别 Set NOI

Solution Set - “女孩是瑰宝我心动一丝不苟”

[TOC] $$ \text{1 1 4 5 1 4} \newcommand{\op}[1]{\operatorname{#1}} \newcommand{\son}[0]{\op{son}} \newcommand{\str}[1]{\underline{\texttt{#1}}} $$ 打一首 ......
瑰宝 一丝不苟 Solution 女孩 Set

「Solution Set」7/4

### 「SDOI / SXOI2022」无处存储 链加链求和。 考虑先搞出随机撒点,然后建虚树,这样比较好维护一点。 然后就是正常的整块打 tag,散块暴力加之类的。 我写的好麻烦/kk ### 「LibreOJ Round #11」Misaka Network 与 Accelerator 我们考 ......
Solution Set