shadow the dog and

CF1864A Increasing and Decreasing

## 思路 首先,给定了一个序列的首项 $a_1$ 和末项 $a_n$ 以及项数 $n$,要求构造一个严格递增,且差严格递减的序列。 因为是构造题,所以可以随便造,考虑差严格递减,所以从后往前构造比较合理。 因为严格递增,所以差至少为 $1$,所以 $a_{n-1}$ 就构造成 $a_n-1$,$a ......
Increasing Decreasing 1864A 1864 and

CF1864B Swap and Reverse

## 思路 刚看懂题意时感觉很难,但是观察样例后,大胆猜测,$k$ 为偶数时,直接排序;$k$ 为奇数时,分奇偶位排序。 快速了写了程序,一交果然 AC。 其实很简单,这里给出证明: 首先,操作 $1$ 保证了奇数位和偶数位上的字符可以任意变动顺序。 然后,操作 $2$ 当 $k$ 为偶数时,可以改 ......
Reverse 1864B 1864 Swap and

基于方面的情感分析的深度上下文和关系感知学习 Deep Context- and Relation-Aware Learning for Aspect-based Sentiment Analysis (ACL2021)

论文对方面级情感分析的三个任务提出了一个解决方案,三个任务共享编码层,通过简单的全连接层进行方面词和观点词的提取,情感分析任务首先做一个自注意力,之后分别与方面词和观点词提取的特征向量做互注意力,通过全连接层进行情感分类。另外,模型还设计了两个子任务,第一个将句子中的词屏蔽,预测这个词属于方面词、观 ......

[LeetCode][309]best-time-to-buy-and-sell-stock-with-cooldown

# Content You are given an array prices where prices[i] is the price of a given stock on the ith day. Find the maximum profit you can achieve. You may ......

Data structure and algorithm-Two

B树 扩容 找出不含重复字符的最长字串的长度 字母异位词分组 优化用一个长度26的整数数组来标识 ArrayKey的构造方法 判断是否存在重复元素 借鉴HashSet后的小优化版 put 自带一个返回值,返回的是添加前原位置的元素,若原位置为空,则返回null 添加,若遇到重复元素,则在集合中删除, ......
algorithm-Two structure algorithm Data and

XXX has been compiled by a more recent version of the Java Runtime (class file version 61.0)

## maven版本未指定导致编译失败问题 Execution default of goal org.springframework.boot:spring-boot-maven-plugin:3.1.3:repackage faile d: Unable to load the mojo 're ......
version compiled Runtime recent class

Simple and Convenient Diagnostic Tools: A Comprehensive Review

In today's technologically advanced world, the automotive industry has witnessed significant advancements in diagnostic tools. These tools have become ......

regulator-fixed and regulator-gpio

### 1、regulator-fixed 作用:指定固定的 regulator。一般是一个 GPIO 控制了一路电,只有开(enable) \ 关(disabled)两种操作 **device-tree node** ``` io_vdd_en: regulator-JW5217DFND { co ......

CF1851F - Lisa and the Martians

## 题目描述 Lisa was kidnapped by martians! It okay, because she has watched a lot of TV shows about aliens, so she knows what awaits her. Let's call inte ......
Martians 1851F 1851 Lisa and

How to fix the Tailwind CSS output.css not work All In One

How to fix the Tailwind CSS output.css not work All In One ......
Tailwind output work How CSS

F. Magic Will Save the World

F. Magic Will Save the World 观察之后可以发现,每次蓄力之后释放,等价于蓄力到最后一次性释放。每次蓄力water和fire增长的值的固定的,设最后蓄力cnt次,那么最终water = w * cnt,fire = f * cnt,如果要让蓄力次数尽可能少,容易想到要让wa ......
Magic World Will Save the

CF1586 f1,f2 Korney Korneevich and XOR 思维+dp

## CF1586 f1 f2 Korney Korneevich and XOR 思维+dp ### [题目链接](https://codeforces.com/problemset/problem/1582/F2) ### 题意: 给出长度为n的数组a,对于数组的严格递增子序列,计其异或和为xo ......
Korneevich 思维 Korney 1586 and

E. Kolya and Movie Theatre

观察一下可以发现,d产生的消耗只与最后一次电影的观看位置有关。设1 <= i <= n,那么由d产生的消耗就是i * d。同时能从1 ~ i 中取得的回报是这段区间里最大的m个正数。用一个优先队列维护最大的m个正数,用val维护d产生的消耗与最大的m个正数产生的回报,记录所有位置的最大值,最后判断一 ......
Theatre Kolya Movie and

linux下vi或vim操作Found a swap file by the name的原因及解决方法--九五小庞

在linux下用vi或vim打开Test.java文件时 [root@localhost tmp]# vi Test.java出现了如下信息: E325: ATTENTION Found a swap file by the name ".Test.java.swp" owned by: root ......
原因 方法 linux Found file

Idea 启动报错Error: A JNI error has occurred, please check your installation and try again Exception in thread "main"

idea运行程序的时候,出现Error: A JNI error has occurred, please check your installation and try again这个错误的话,抛出异常: java.lang.NoClassDefFoundError: org/springfram ......
quot installation Exception occurred please

spring boot - 开启异步 @EnableAsync 启动报错 The bean 'xxx' could not be injected because it is a JDK dynamic proxy

解决 注解 @EnableAsync 修改为 @EnableAsync(proxyTargetClass = true) 如 ......
EnableAsync injected because dynamic spring

Codeforces Round 888 (Div. 3)G. Vlad and the Mountains(数据结构,图论)

题目链接:https://codeforces.com/contest/1851/problem/G 大致题意: 给出n个点m条边的无向图,每个点有点权h【i】。从点 i 到 点 j会消耗 h【j】 - h【i】 的能量,如果小于0,那么就是恢复对应绝对值的能量。 进行q次询问,每次询问包含起点s, ......

Codeforces Round 885 (Div. 2)E. Vika and Stone Skipping(数学,质因数分解)

题目链接:https://codeforces.com/problemset/problem/1848/E 大致题意: 打水漂,某人在海岸线以 f (正整数)的力量扔出石头,会在f,f+(f-1),f+(f-1)+(f-2),........,f+(f-1)+.....+2+1,的位置接触水面; 现 ......
质因数 Codeforces Skipping 数学 Round

Codeforces Round 887 (Div. 1)C. Ina of the Mountain(数据结构,反悔贪心)

题目链接:https://codeforces.com/problemset/problem/1852/C 题意: 给定一个长度为n的序列和正整数k; 每次可以选取任意一个区间,将区间内每个数减1; 如果出现一个数变成0,那么那个数变成k; 问至少操作多少次可以使得每个数变成k; 分析: 将每个数值 ......

Educational Codeforces Round 151 (Rated for Div. 2)E. Boxes and Balls(数学,动态规划)

题目链接:https://codeforces.com/contest/1845/problem/E 题意: 给定长度为n且只含0和1的数组,你可以进行以下操作: 交换相邻的0和1; 给正整数k,问经过k次操作后,会有多少种本质不同的结果; 分析: 如果1比0多,我们可以把他们取反(让0比1多,结果 ......
Educational Codeforces 数学 动态 Boxes

Shadow Mapping (Games202)

# Shadow Mapping (Games202) ## 2-Pass Algorithm ### Pass 1. Render from Light Pass1需要知道光线能照射到的点,也就是从光源所在的视角去渲染模型,有哪些是能被渲染出,哪些会被遮挡住而不被渲染。 ![16928508543 ......
Mapping Shadow Games 202

Docker|--E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation

### 错误 ```bash apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 871920D1991BC93C E: gnupg, gnupg2 and gnupg1 do not seem to be installed, but ......
gnupg installed operation required Docker

Codeforces Round 885 (Div. 2) F. Vika and Wiki(数学,倍增)

题目链接:https://codeforces.com/problemset/problem/1848/F 大致题意: 长度为n(n是2的幂次),每轮让a【i】 = a【i】^a【i%n + 1】,(^为异或)问需要操作多少次后可以使得每个数为0; 解题思路: 我们来观察: 第一次相当于:a【i】 ......
Codeforces 数学 Round Vika Wiki

Educational Codeforces Round 152 (Rated for Div. 2)E. Max to the Right of Min(数据结构,分治)

题目链接:https://codeforces.com/problemset/problem/1849/E 大致题意: 长度为n的序列,求有多少个区间满足区间最大值在区间最小值的右边? 解题思路: (此题有使用线段树等其他做法,本处使用的是单调栈做法) 我们先求出每个a【i】 的左边的比他小的LMI ......

The 2022 ICPC Asia Xian Regional Contest

链接 C.Clone Ranran 题意:一个人要准备一场比赛,需要出c道题,他现在可以选择两种操作:1.花费a分钟自我复制一次。(复制的自己也可以接着复制)2.花费b分钟出一道题。问最短要多少分钟可以准备c道题。 思路:枚举自我复制的次数,挨个判断就行。 #include<bits/stdc++. ......
Regional Contest 2022 ICPC Asia

Infinity: Set Theory is the true study of Infinity

AN INTRODUCTION TO SET THEORY - Professor William A. R. Weiss, October 2, 2008 Infinity -> Set Theory -> Mathematics Set Theory is the true study of I ......
Infinity Theory study true Set

Long-read error correction: a survey and qualitative comparison (长读错误纠正:一项调查和定性比较)

Basic Information: Title: Long-read error correction: a survey and qualitative comparison (长读错误纠正:一项调查和定性比较) Authors: Pierre Morisse, Thierry Lecroq, ......

UE4.27, Packaging failed, "is found in memory and is an export but does not have all load flags"

打包时发生如下错误 "is found in memory and is an export but does not have all load flags" 通过查阅论坛,问题原因出在,某类的构造函数里包含xxx->SetChildActorClass(ActualOne) 整理到的解决办法并未 ......
quot Packaging failed export memory

CF1862G The Great Equalizer

## 思路 对于一个数组,每次操作会缩短排序后的数组的相邻两个数的差距,所以总共会执行 $k$ 次操作,其中,$k$ 为排序后的数组的相邻两个数的最大差距。 因为每次操作都会对最大数加 $1$,所以答案就是 $\text{数组中的最大数} + \text{排序后的数组的相邻两个数的最大差距}$。 因 ......
Equalizer 1862G Great 1862 The

CF1862F Magic Will Save the World

## 思路 假设总共耗时是 $s$ 秒,那么最多可以消灭的总生命值是 $s\times(w+f)$。 所以我们可以先求出所有怪物的生命值之和 $sum$,那么,至少需要时间 $t=\lfloor \frac{sum}{w+f} \rfloor$。 然后我们可以算出用这些时间最多可以用水魔法消灭的生命 ......
1862F Magic World 1862 Will