subsequence unique 125d arc

题解 [ARC153B] Grid Rotations

[[ARC153B] Grid Rotations](https://www.luogu.com.cn/problem/AT_arc153_a) 有思维含量的一题。 我们横纵坐标分开考虑,对于每一个矩形,每次操作会使其内部元素的横坐标上下对调。 纵坐标也同理,左右对调。 而这种反转操作我们显然可以直 ......
题解 Rotations 153B Grid ARC

题解 AT3726 [ARC087B] FT Robot

首先可以观察到一个非常重要的性质:对于一次前进的操作,如果前面有奇数次转向,则走上下,否则走左右。(当然如果一开始就前进就只能走右) 于是我们可以将其拆成许多的“块”,并分成两类,即前进方向为左右还是上下。 ![](https://cdn.luogu.com.cn/upload/image_host ......
题解 Robot 3726 087B 087

Intel Arc 显卡最新的驱动大幅提升 Linux 平台性能表现

导读 Intel 最新的显卡驱动使旗下 Arc Graphics DG2/Alchemist 以及即将推出的 Meteor Lake 系列显卡在 Linux 系统下的性能大幅提升。在基准测试中,CS:OL 速度提高了 11%,其他 Vulkan 应用程序 / 游戏也或多或少地受益。 最新的驱动补丁主 ......
显卡 性能 Intel Linux 平台

ef orm unique约束 uuid 创建前检查

# 设置uuid ```cs namespace EF6SQLiteTutorial.Models { public class People { public int Id { get; set; } // 设置uuid public Guid Uuid { get; set; } = Guid. ......
unique uuid orm ef

[ARC162D] Smallest Vertices

# [ARC162D] Smallest Vertices [Atcoder:[ARC162D] Smallest Vertices](https://atcoder.jp/contests/arc162/tasks/arc162_d) [洛谷:[ARC162D] Smallest Vertices ......
Smallest Vertices 162D ARC 162

ARC090E

果然自己想出来和看题解做出来是完全不同的感觉…… 首先考虑没有不相遇的限制条件怎么做。发现这个问题就是 P1144 再加上乘法原理。 然后思考如何处理相遇的情况。容易想到枚举相遇的点和边。首先从 $s$ 和 $t$ 开始各跑一遍最短路,$dis_{u,0/1},cnt_{u,0/1}$ 分别为点 $ ......
090E ARC 090

antd table提示Warning: Each child in a list should have a unique "key" prop.

## 参考: [表中的每条记录都应该有一个唯一的“key”属性,或者将“rowKey”设置为唯一的主键。 · 问题 #7623 · ant-design/ant-design](https://github.com/ant-design/ant-design/issues/7623) ## 解决 ` ......
quot Warning should unique table

[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 ......

ARC126F Affine Sort

[题面传送门](https://www.luogu.com.cn/problem/AT_arc126_f) 感觉这种带个极限的题目都非常奇怪。 首先三个变量不好做,设 $g(k)$ 表示 $c=k$ 的情况下 $a,b$ 的值,那么我们要求的东西可以看成 $\lim\limits_{K\to \in ......
Affine 126F Sort ARC 126

ARC147-做题记录

title: ARC147 做题记录 feature: false mathjax: true date: 2022-09-06 07:42:47 tags: - 贪心 - 计数 categories: 做题记录 cover: https://pic.imgdb.cn/item/6316994d16 ......
ARC 147

ARC133F FWT 做法

看见网上题解都是“二维生成函数”,就来传一下这个做法( 问题可以转化为:$n$ 枚硬币,每次随机翻一枚,求最后正面朝上硬币个数的期望。 把这个过程看作 XOR 卷积,并且需要卷积的两个数组有特性:在 popcount 相同的位置值相同。 这样只要对这种特殊的数组能做 fwt 就做完了。 于是现在要解 ......
做法 133F ARC 133 FWT

PAT-甲级-1007 Maximum Subsequence Sum C++

Given a sequence of K integers { N1​, N2​, ..., N​K }. A continuous subsequence is defined to be { Ni​, Ni+1​, ..., Nj​ } where 1≤i≤j≤K. The Maximum S ......
甲级 Subsequence Maximum 1007 PAT

[LeetCode] 2542. Maximum Subsequence Score

You are given two 0-indexed integer arrays nums1 and nums2 of equal length n and a positive integer k. You must choose a subsequence of indices from n ......
Subsequence LeetCode Maximum Score 2542

arc164_a Ternary Decomposition 题解

# [Ternary Decomposition](https://www.luogu.com.cn/problem/AT_arc164_a) ## 题意 共 $T$ 组数据,对于每组数据,给出两个整数 $n$ 和 $k$,问是否存在一个长度为 $k$ 的非负整数序列 $a$,使得 $\sum\li ......
题解 Decomposition Ternary arc 164

java.lang.IllegalStateException: No primary or single unique constructor found for interface java.util.List

错误:No primary or single unique constructor found for interface java.util.List(没有为List接口找到主要的或唯一的构造函数) 原因:请求的参数没有匹配上处理函数的参数 解决:为List参数添加@RequestParam注解 ......

ARC164 F

先进行一些转化。 每个点被翻转的次数固定,为其深度。(这里规定根节点的深度为 $0$) 所以每个人放颜色可以看做放什么得什么,而不需要考虑翻转。 先手选偶数层和后手选奇数层都会使得先手得分,反之不得分。所以先手和后手其实是一样的策略:尽可能选偶数层,而不选奇数层。 对于能够放颜色的点,一定是叶子,所 ......
ARC 164

[ARC164E] Segment-Tree Optimization

# [ARC164E] Segment-Tree Optimization 题目大意是让你构造一棵广义线段树,给定若干个询问使得询问出的区间最大深度最小并且最大神帝的个数最少。感官上,我们认为满二叉树很优美,所以可以朝着这个方向思考。 首先,不难看出有一些区间中所有数在所有询问中被绑在了一起,即要么 ......
Segment-Tree Optimization Segment 164E Tree

Atcoder ARC164B Switching Travel

称 $c_u \not= c_v$ 的边 $(u, v)$ 为普通边,$c_u = c_v$ 的边 $(u, v)$ 为特殊边。 能发现若满足条件则这个环应该是由一条特殊边和若干条普通便组成的(从特殊边的一个顶点出发一直经过普通边,最后走到特殊边的另一个顶点再走回来)。 于是若这个特殊边的两个顶点能 ......
Switching Atcoder Travel 164B ARC

ARC164

# ARC164 ## A 考虑先给$N$按三进制分解一下 然后对于$3^m\rightarrow3^{m-1}$,实际上可以加$2$的贡献,我们先计算$N$最小需要$S$ 然后可以发现只要$K-S$是偶数即可 ```cpp #include using namespace std; signed ......
ARC 164

Atcoder ARC159C Permutation Addition

设 $s=\sum\limits_{i = 1}^n a_i$,考虑加上排列 $p$,那么 $s\leftarrow s + \frac{n\times (n + 1)}{2}$。 当有解时,因为 $a_i$ 相等,所以有 $s\bmod n = 0$。 考虑 $n \bmod 2 = 1$ 时,$ ......
Permutation Addition Atcoder 159C ARC

Atcoder ARC160C Power Up

首先有个很朴素的 DP: 设 $f_{i, j}$ 为有 $j$ 个数 $i$ 能为数 $i + 1$ 产生贡献的方案数和,这个状态的转移方程要好想一些: $f_{i, \frac{j + c_i}{2}} = \sum\limits_{k = j}^{2\times10^5} f_{i - 1, ......
Atcoder Power 160C ARC 160

Atcoder ARC163C Harmonic Mean

首先考虑到分数裂项:$\frac{1}{x} - \frac{1}{x + 1} = \frac{1}{x\times (x + 1)}$,那就有 $\frac{1}{x} = \frac{1}{x + 1} + \frac{1}{x\times (x + 1)}$。 于是构造方法就很明显了啊,首先 ......
Harmonic Atcoder 163C Mean ARC

Atcoder ARC119D Grid Repainting 3

看到方格图,便想到把行和列当成图上的点,把红点当作连接行列的边,这样就能构造出二分图。 考虑把每个连通的二分图单独拎出来考虑,能发现对其建一个生成树,只要 $u$ 节点的操作与 $son_u$ 的操作相反,则 $son_u$ 是不会干扰到 $u$ 的。 这则说明每个连通的二分图消完后肯定是只剩一行或 ......
Repainting Atcoder 119D Grid ARC

Atcoder ARC162C Mex Game on Tree

发现如果子树内如果存在 $k$ 则 $mex$ 的值必定不为 $k$,所以 Bob 的策略即为在空位填上 $k$。 Alice 的决策便可以知道是在 Bob 出手前就要让这个子树满足条件,不让 Bob 破坏这个子树,考虑需满足哪些条件: - 至多 $1$ 个空位,否则 Bob 可以把 $k$ 填在子 ......
Atcoder 162C Game Tree ARC

Atcoder ARC161C Dyed by Majority (Odd Tree)

首先能发现对于树的叶子节点,与其连边的只有其父节点,所以该节点最终状态为 $\text{B/W}$ 其父节点的状态就一定为 $\text{B/W}$。 然后考虑它自己是什么状态,因为同样的与其连边的只有其父节点,所以其父节点最终状态为 $\text{B/W}$ 其状态就为 $\text{B/W}$。 ......
Majority Atcoder 161C Dyed Tree

【ARC104E】Random LIS 题解(期望)

[LG 传送门](https://www.luogu.com.cn/problem/AT_arc104_e) | [AtC 传送门](https://atcoder.jp/contests/arc104/tasks/arc104_e)。 期望。 ## Solution - 显然我们会发现 $n$ 非 ......
题解 Random 104E ARC 104

ARC107F Sum of Abs

# ARC107F Sum of Abs **[题目传送门——洛谷](https://www.luogu.com.cn/problem/AT_arc107_f)** **[题目传送门——AtCoder](https://atcoder.jp/contests/arc107/tasks/arc107_ ......
107F ARC 107 Sum Abs

[ARC096F] Sweet Alchemy

# [ARC096F] Sweet Alchemy [洛谷:[ARC096F] Sweet Alchemy](https://www.luogu.com.cn/problem/AT_arc096_d) [Atcoder:[ARC096F] Sweet Alchemy](https://atcoder ......
Alchemy Sweet 096F ARC 096

ARC063F题解

[ARC063F](https://www.luogu.com.cn/problem/AT_arc063_d) 白色区域一定是一个矩形。 假设我们已经知道了矩形的两个分界线 ![](https://cdn.luogu.com.cn/upload/image_hosting/d98y1jzi.png? ......
题解 063F ARC 063

ARC133E 题解

# [ARC133E] Cyclic Medians 题解 ## Links [Luogu](https://www.luogu.com.cn/problem/AT_arc133_e) [AtCoder](https://atcoder.jp/contests/arc133/tasks/arc133 ......
题解 133E ARC 133