operations 063c agc add

[LeetCode] 2530. Maximal Score After Applying K Operations

You are given a 0-indexed integer array nums and an integer k. You have a starting score of 0. In one operation: choose an index i such that 0 <= i < ......
Operations LeetCode Applying Maximal After

AGC004B Colorful Slimes

$ {\scr \color {Orchid}{\text{生于尘埃,溺于人海,死于理想高台。}}} $ 题目链接:Colorful Slimes $ {\scr \color {Cyan}{\text{Solution}}} $ 分析 思路:挺神奇的$dp$ 一个比较显然的结论:最小值的方案中第$ ......
Colorful Slimes 004B AGC 004

Revit 二次开发 C# 添加配置 Add-In Manager

第一步:安装SDK,在SDK目录下获取Add-In Manager插件 第二步:将Add-In Manager文件夹整个拷贝到C:\ProgramData\Autodesk\Revit\Addins\2022目录下;(注意:不是Revit安装目录,而是Revit的ProgramData目录,默认:C ......
Manager Add-In Revit Add In

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation 解决方式 <dependency> <grou ......

AT_agc038_c 做题笔记

题目链接 莫反好题,不仅仅是莫反,还有很多思维含量。 由于推式子过程太过于漫长了,所以我仅仅讲下大概。 题目是给你一个长度为 $n$ 的数组,请求出 $\sum\limits_{i=1}^n\sum\limits_{j=i+1}^n \operatorname{lcm}(A_i, A_j)$ 莫反通 ......
笔记 AT_agc 038 agc AT

operator Demo07

package com.chen.operator; public class Demo07 { public static void main(String[] args) { int a = 10; int b = 20; a += b;// a = a + b a -= b;// a = a ......
operator Demo 07

operator Demo08

package com.chen.operator; // 导入这个包所有的类 *import com.chen.*;//三元运算符public class Demo08 { public static void main(String[] args) { // x ? y : z int scor ......
operator Demo 08

operator Demo05

package operator; //逻辑运算符public class Demo05 { public static void main(String[] args) { //与(and)或(or)非(取反) boolean a = true; boolean b = false; System ......
operator Demo 05

operator Demo01

package operator; public class Demo01 { public static void main(String[] args) { // 二元运算符 int a = 10; int b = 20; int c = 25; int d = 25; System.out.p ......
operator Demo 01

operator Demo02

package operator; public class Demo02 { public static void main(String[] args) { long a = 158975155916185L; int b = 123; short c = 10; byte d = 8; Sys ......
operator Demo 02

operator Demo03

package operator; public class Demo03 { public static void main(String[] args) { //关系运算符返回的结果: 正确,错误 布尔值 //if int a = 10; int b = 20; int c = 21; //取余 ......
operator Demo 03

operator Demo04

package operator; public class Demo04 { public static void main(String[] args) { // ++ -- 自增 自减 一元运算符 int a = 3; int b = a++;//执行完这行代码后,先给b赋值,再自增 // a ......
operator Demo 04

[AGC033C] Removing Coins题解

思路 可以看出,每次对一个点 \(u\) 操作一次,就相当于删除以 \(u\) 为根的所有叶节点。 当然我们还是没有什么思路,我们可以想简单一点:在一条链上的情况。 如果 \(u\) 是链的端点:以 \(u\) 为根节点的叶节点只有一个,所以链的长度减一。 如果 \(u\) 不是链的端点:以 \(u ......
题解 Removing Coins 033C AGC

[AGC009B] Tournament 题解

思路 考虑树形 \(\text{dp}\)。 我们将每个人与把自己淘汰的人连边。 得到一颗以一为根的树。 由于我们需要求出必须赢的场数最多的那位选手,至少要赢多少场。 考虑最多的限制。 可以使用树型动态规划。 每一次两个人比赛的代价为: \[dp_i=\max(dp_i,dp_j)+1 \]这样就达 ......
题解 Tournament 009B AGC 009

[AGC037D] Sorting a Grid 题解

学长给我看了这道题,感觉很有趣啊!想了想想出来了。 考虑先把每个数还原到对应行上,然后用最后一次把它们斗出来。 那么我们就是要在第一次操作后,对于每种颜色使得它平铺在这个块上。 那么我们直接网络流或二分图匹配构造一下方案就做完力! ......
题解 Sorting 037D Grid AGC

Hadoop-Operation category READ is not supported in state standby 故障解决

在查询hdfs时或者执行程序向hdfs写入数据时遇到报错:Operation category READ is not supported in state standby 意思是:该主机状态为待机,不支持操作类别READ. 你会发现最基本的hdfs命令都不能执行,例如:hadoop fs -ls ......

[AGC013E] Placing Squares 题解

Placing Squares 关键是将问题从抽象的“正方形面积”转为具象的形式:一段长度为 \(d\) 的区间,有两个不同的小球要放进去,则总放置方案就是 \(d^2\) ,且不同的区间间方案是通过乘法原理结合的,刚好是题目中 \(\prod d^2\) 的形式。 于是我们可以设计 DP:设 \( ......
题解 Placing Squares 013E AGC

[AGC030F] Permutation and Minimum 题解

Permutation and Minimum 看到 300 的数据范围,再加上计数题,很容易就往计数 DP 方向去想。 为方便,我们将 \(n\) 乘二。 因为是两个位置取 \(\min\),于是我们便想到从小往大把每个数填入序列。于是DP数组第一维的意义便出来了:当前已经填入了前 \(i\) 小 ......
题解 Permutation Minimum 030F AGC

Backtrader - Add new custom value in data feeds 新増自定義的值

1. Add new custom value in data feeds 新増自定義的值 class PandasDataV2(bt.feeds.PandasData): lines = ('close', 't5') params = (('datetime', None), ('open', ......
Backtrader custom feeds value data

[AGC003D] Anticube题解

首先对每个数分解只因数,然后把只因数的指数对3取模,把 \(s\) 划分成多个等价类。对于每一个等价类,有唯一对应的另一个等价类不能同时选,取最多的即可。 分解只因数用 polard's rho 算法,时间复杂度 \(O(nw^{0.25})\) code: #include<bits/stdc++ ......
题解 Anticube 003D AGC 003

[AGC002D] Stamp Rally 题解

整体二分板题 首先瑞平翻译。 考虑整体二分,用分治函数 solve(l,r,L,R) 解决答案在 \([L,R]\) 之间的边。每次我们加入所有 \([1,MID]\) 之间的边,查询这时的询问是否满足要求,进行整体二分即可。 由于多次加入边比较麻烦,我们用可撤销并查集维护。 时间复杂度 \(O(n ......
题解 Stamp Rally 002D AGC

[AGC001E] BBQ Hard 题解

一道十分有趣的题。 一眼推式子,发现自己不会。 看了题解,发现是有趣思维题。但是由于我的朋友学习了有趣的思维题做法,因此我决定学习更有趣的生成函数做法!!! 考虑把原式拆开, \[\frac{1}{2}\times \left( \sum_{i=1}^{n}\sum_{j=1}^{n} \binom ......
题解 001E Hard AGC 001

[AGC001D] Arrays and Palindrome 题解

非常有意思的思维题。 首先我先瑞平一下翻译,我根本没看懂,还是去看英文题面看懂的。 首先可以发现整个字符串被拆成了若干个奇回文串与偶回文串。现考虑如何判是否合法。可以发现一个回文串就是要求部分位置匹配。我们对这些匹配的位置建边,如果得到的图是联通的,那么就只能填入 \(1\) 种字符,否则就可以填入 ......
题解 Palindrome Arrays 001D AGC

【AGC】云托管状态一直是“上线中”的问题

​【关键字】 AGC、云托管、网址域名 【问题描述】 有开发者反馈开通了云托管服务,然后进行了相关域名设定,等待激活,无法活动,状态一直是‘上线中’。 ​​ ​ 开通托管已经一天了一直卡着,状态一直是“上线中”。并且表示,域名是有备案的。 ​​ 【解决方案】 一、一般情况下,后台正在处理30分钟即可 ......
状态 问题 AGC

ERROR in node_modules/rxjs/dist/types/internal/operators/combineLatest.d.ts(3,61): error TS1005: ‘,’ expected.

原文链接:https://www.longkui.site/error/error-in-node_modules-rxjs/4839/ angular项目,启动的时候报错。详细的报错如下: 这个报错的原因比较简单,rxjs的版本不对,我用的是angular7可能和rxjs版本不匹配。 解法方法也很 ......

ERROR Error: No component factory found for Edit2Component. Did you add it to @NgModule.entryComponents?at noComponentFactoryError (core.js:9877:1)

原文链接:https://www.longkui.site/error/no-component/4843/ angular项目调用组件的时候开始报这个错误,大概的意思是NgModule中没有Edit2Component这个组件。 解决方法: 我们找到组件的xxxx.module.ts。在entry ......

devres_add添加设备资源

参考:https://zhuanlan.zhihu.com/p/517974143 1.背景 每当driver probe一个具体的device实例的时候,都需要建立一些私有的数据结构来保存该device的一些具体的硬件信息。 以往都是通过kmalloc或者kzalloc来分配内存,但这会引入一些潜 ......
devres_add devres 设备 资源 add

日期格式转换异常:Java 8 date/time type `java.time.LocalDateTime` not supported by default: add Module \"com.fasterxml.jackson.datatype:jackson-datatype-jsr310

异常信息: "unexpected error: Type definition error: [simple type, class java.time.LocalDateTime]; nested exception is com.fasterxml.jackson.databind.exc.I ......

set通过operator <去重、排序

如何定义类的operator<以保证set去重、有序 STL 自定义比较器的要求是必须为严格弱序,因为STL内部就是这样做的。 x<x 为假 (反自反) x<y 为真则y<x 为假 (反对称) x<y 且y<z 则x<z (传递性) x<y 为假且y<x 为假,y<z 为假且z<y 为假,则x<z ......
operator set lt

CF1842G Tenzing and Random Operations 题解

题意 给定一个长度为 \(n\) 的正整数序列 \(a\),对该序列进行 \(m\) 次操作,定义每次操作如下: 从 \(\left[1, n\right]\) 中等概率选取一个 \(i\),对于 \(j \in \left[i, n\right]\),执行操作 \(a_j \leftarrow a ......
题解 Operations Tenzing Random 1842G