problem cards query

CF938G Shortest Path Queries

Shortest Path Queries Luogu CF938G 题面翻译 给出一个连通带权无向图,边有边权,要求支持 \(q\) 个操作: \(1\) \(x\) \(y\) \(d\) 在原图中加入一条 \(x\) 到 \(y\) 权值为 \(d\) 的边 \(2\) \(x\) \(y\) ......
Shortest Queries 938G Path 938

[Codeforces] CF1740D Knowledge Cards

CF1740D Knowledge Cards 题意 有一个 \(n \times m\) 的棋盘。现在\((1,1)\)中有一个栈,你可以按照一定的顺序进行出栈操作,每次都可以移动一个卡片到一个相邻的空白位置,但是卡片不能重合。问,能否通过若干次操作,将\((1,1)\)中全部的卡片移动到\((n ......
Codeforces Knowledge 1740D Cards 1740

A Pattern to Solve Backtracking Problems

The backtracking solutions of most leetcode-problems have a similar pattern. Let's take a look on it. Subset 1. Recursion (Backtrack) - Time complexit ......
Backtracking Problems Pattern Solve to

[CF1603E] A Perfect Problem

A Perfect Problem 题面翻译 一个序列是好的当且仅当集合最大值乘上集合最小值大于等于集合元素的加和; 一个序列是完美的,当且仅当这个序列的任何子序列都是好的(包括自己不包括空集); 你要求的是:长度为 \(n\) 的并且每一个元素都大于等于 \(1\) 并且小于等于 \(n+1\) ......
Perfect Problem 1603E 1603 CF

F - Random Update Query

F - Random Update Query Problem Statement You are given an integer sequence $A = (A_1, A_2, \ldots, A_N)$ of length $N$. We will perform the following ......
Random Update Query

ElasticSearch之Node query cache settings

对于filter查询,ElasticSearch提供了缓存查询结果的特性,当缓存中存在满足查询条件要求的数据时,直接从缓存中提取查询结果。 对于ElasticSearch节点,该节点上的所有shard共享同一个缓存区域。 ElasticSearch基于LRU算法来管理缓存中的数据,当空间不足以承载最 ......
ElasticSearch settings query cache Node

power query索引列、重复列、拆分和提取

power query索引列、重复列、拆分和提取 一、索引列 1、 进入PQ编辑器 2、添加索引列 添加列——索引列——可自定义索引列 二、重复列 功能:数据清洗时想保证数据的完整性,但又需要对某些列进行拆分、提取等操作时,一般先重复想处理的列 1、添加列——选中要重复的列——点击‘重复列’ 三、拆 ......
索引 power query

power query自定义列和条件列

Excel从基础到M函数 Power Query超级整理 建议使用office365 进入PQ:选中表格任意位置——开始——数据——自表格区域——勾选表包含标题——确定——进入PQ编辑器 要使用PQ编辑器,表格只能支持两种格式: 1、公式里设置表格名称(选中表格任意位置——数据——自表格/区域——‘ ......
条件 power query

react-query使用

usequery const { isPending,isLoading, error, data } = useQuery({ //返回当前请求的状态,错误信息,以及返回的数据 queryKey: ['repoData'], //【必填】,自定义查询的键,类型为数组,也可以存放变量,[repoDa ......
react-query react query

【题解】AtCoder abc322_f Random Update Query

传送门:https://atcoder.jp/contests/abc332/tasks/abc332_f 容易发现,对于一个位置 $i$,$A_i$ 的最终值是由对 $i$ 的最后一次赋值操作决定的;因此,将所有操作按时间顺序倒过来考虑,则由第 $j$ 次操作决定 $A_i$ 最终值的概率为"在第 ......
题解 AtCoder Random Update Query

CF1904E Tree Queries

给定一棵 \(n\) 个节点的树与 \(q\) 次询问,每次询问给出一个 \(x\) 与一个大小为 \(k\) 的点集 \(a\),要求求出在删去了 \(a\) 中的点后从 \(x\) 出发的最长简单路径的长度。每次询问独立。 \(n, q, \sum k \le 2 \times 10^5\)。 ......
Queries 1904E 1904 Tree CF

转换考勤系统中的数据(II)(Power Query)

let 源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content], 添加姓名列 = Table.AddColumn(源, "姓名", each if [列10] = "姓名:" then [列5] & [列11] else null), 姓名列填充 = Ta ......
考勤系统 数据 系统 Power Query

CodeForces 1902F Trees and XOR Queries Again

洛谷传送门 CF 传送门 如果我们能把 \(x \to y\) 路径上的所有点权插入到线性基,那么可以 \(O(\log V)\) 查询。 但是因为线性基合并只能 \(O(\log^2 V)\)(把一个线性基的所有元素插入到另一个),所以只能倍增做 \(O((n + q) \log n \log^2 ......
CodeForces Queries 1902F Again Trees

[ABC241Ex] Card Deck Score 题解

题目链接 点击打开链接 题目解法 个人认为推式子很妙的生成函数题 暴力套上生成函数,\(ans=[x^m]\prod\limits_{i=1}^{n}(\sum\limits_{j=1}^{b_i}(a_ix)^j)\) \(\sum\limits_{j=1}^{b_i}(a_ix)^j=\frac ......
题解 Score Card Deck ABC

Vue路由params、query传参用法,以及form表单回车自动提交问题

一、路由参数用法 1.1 query参数 第一种方式传参:跳转路由并携带query参数,注意to的字符串写法 将id和title拼接字符串形成地址 <router-link :to="`/home/message/detail?id=${item.id}&title=${item.title}`"> ......
表单 路由 params 问题 query

F Trees and XOR Queries Again (树链剖分)

看了知乎一位大佬的文章,用st表优化了查询,在st表中维护线性基 让lognN^2的查询 少了个log加了很多优化的方法 但无济于事 但是这样跑了9000ms 依然没法过 优化了一下线性基的查询方式 从枚举位数变成了类似lowbit的__lg(返回最大的1的位置) 不知道具体怎么算的优化 现在时间大 ......
Queries Trees Again and XOR

【题解】CodeForces 1902F Trees and XOR Queries Again

传送门:https://codeforces.com/contest/1902/problem/F 数据结构题,这里讲两种思路。 $ST$ 表思路: 判定“从若干个数中能否取出其中一些,使得异或和为 $x$”的问题,第一时间想到线性基,本题要做的显然就是快速求出询问路径上所有数的线性基。两组数的线性 ......
题解 CodeForces Queries 1902F Again

F. Trees and XOR Queries Again

首先容易想到lca+线性基,\(O(nlognB^2+qlognB^2)\),显然T飞了。 #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #include<map> #include<vector> #i ......
Queries Trees Again and XOR

uva101The Blocks Problem

原题链接The Blocks Problem - 洛谷 | 计算机科学教育新生态 (luogu.com.cn) 一道模拟题。(水题) 但模拟过程很有意思,怎么样才能用最短的代码完成所有操作,使代码更简洁是很考验技术的。 #include<bits/stdc++.h> using namespace ......
Problem Blocks uva 101 The

Unity DOTS系列之System中如何使用SystemAPI.Query迭代数据

最近DOTS发布了正式的版本, 我们来分享一下System中如何基于SystemAPI.Query来迭代World中的数据,方便大家上手学习掌握Unity DOTS开发。 SystemAPI.Query的使用 System有两种,一种是Unmanaged 的ISystem,一种是managed 的S ......
SystemAPI 数据 System Unity Query

【题解】Trees and XOR Queries Again - Codeforces 1902F

https://codeforces.com/contest/1902/problem/F 方法一 可以从树上路径想到轻重链剖分(也可以用其他种类的LCA算法),然后从数的异或表示很容易想到线性基。 然后因为是无修改的,所以可以轻重链剖分+ST表+线性基。具体来说就是: 先进行轻重链剖分。然后把每次 ......
题解 Codeforces Queries Trees Again

D. Robot Queries

D. Robot Queries There is an infinite $2$-dimensional grid. Initially, a robot stands in the point $(0, 0)$. The robot can execute four commands: U — ......
Queries Robot

CF1902 D Robot Queries 题解

Link CF1902 D Robot Queries Question Robot 初始在 \((0,0)\) ,有一个字符串 \(s\) ,表示运行列表 \(U\):y+1 \(D\):y -1 \(L\) :x -1 \(R\) :x+1 之后有 \(Q\) 次询问,有\(L,R,x,y\), ......
题解 Queries Robot 1902 CF

SP1716 GSS3 - Can you answer these queries III 题解

题意: 给定一个长度为 $ n $ 的序列 $ a $ , $ q $ 次操作,每次操作为以下之一: \(0\) \(x\) \(y\):将 \(a_x\) 修改为 \(y\) \(1\) \(l\) \(r\):询问区间 \([l,r]\) 的最大连续子序列和 思路: 考虑线段树维护区间最大连续子 ......
题解 queries answer these 1716

F - Palindrome Query

F - Palindrome Query Problem Statement You are given a string $S$ of length $N$ consisting of lowercase English letters.Process $Q$ queries described ......
Palindrome Query

ABC 331 F - Palindrome Query(字符串哈希,树状数组)

字符串哈希 [OI-Wiki](字符串哈希 - OI Wiki (oi-wiki.org)) 分为两种哈希方式:以左为高位 和 以右为高位 如果只是快速查询每个字串的哈希值,用以左为高位比较简单,即 \[Hash[l...r]=Hash[1...r]-Hash[1...(l-1)]\times ba ......
数组 字符串 Palindrome 字符 Query

一列拆分成两列(BT拆)(Power Query)

问题:左表转成右表 let 源 = Excel.CurrentWorkbook(){[Name="表1"]}[Content], 分组的行 = Table.Group(源, {"机房名称", "网络制式"}, {"合并", each Text.Combine([BBU名称],",")}), 按分隔符 ......
Power Query

CodeForces 1526F Median Queries

洛谷传送门 CF 传送门 首先,如果我们确定了 \(1, 2\) 或 \(n - 1, n\) 的位置,我们就能求出原排列。因为题目给了 \(p_1 < p_2\),所以可以不考虑对称性。也就是说我们知道两个位置是 \(1, 2\) 或 \(n - 1, n\) 但不确定究竟是 \(1, 2\) 还 ......
CodeForces Queries Median 1526F 1526

关于解决vue报错"Problems loading reference 'https://schemastore.azurewebsites.net/schemas/json/package.json': Unable to load schema from...

打开setting时会看到有一条三角形的警告信息 看问题描述:无法从该网站加载 解决方法: 打开设置,找到扩展下的json项 设置之后可以在settings.json文件中看到新增加一项 "json.schemaDownload.enable": false 可以直接在界面上设置: "json.sc ......

P2522 [HAOI2011] Problem b

题意 求 \(\sum_{i = a} ^ {b} \sum_{j = c} ^ {d} [\gcd(i, j) = k]\)。 Sol 简单容斥一下。 \[\begin{aligned} \sum_{i = a} ^ {b} \sum_{j = c} ^ {d} [\gcd(i, j) = k] ......
Problem P2522 2522 2011 HAOI