counting another path abc
ABC243F
发现直接记录有哪些奖品被选是不可能的,所以考虑转换一下思路:设 $dp_{i,j,p}$ 为只考虑前 $i$ 个奖品,抽了 $j$ 次,有 $p$ 种不同奖品的的概率。 这个状态相当于是维护一个操作(抽奖)序列。考虑每次加入 $q$ 个第 $i$ 种奖品,就相当于是将原序列和一个由 $q$ 个 $i ......
abc089 <前缀和>
### 题目 [D - Practical Skill Test](https://atcoder.jp/contests/abc089/tasks/abc089_d) ### 思路 - 计算出所有结点在跳转过程中的前缀和, 从而O1查询 - 根据数据范围, 实际上不需要二分, 直接开相同大小的数组 ......
abc088 <bfs 最短路>
### 题目 [D - Grid Repainting](https://atcoder.jp/contests/abc088/tasks/abc088_d) ### 思路 - bfs找到从起点到终点的最短路, +1(起点), 即为至少留下的白色块的个数 - 则答案 = 总白色块数 - (最短路+1 ......
abc086d <二维前缀和 同余>
### 题目 [D - Checker](https://atcoder.jp/contests/abc086/tasks/arc089_b) ### 思路 - 坐标对 2k 取余, 通过二维前缀和计算满足条件的个数; - 也可对 k 取余, [参考](https://www.luogu.com.c ......
abc085d <贪心>
### 题目 [D - Katana Thrower](https://atcoder.jp/contests/abc085/tasks/abc085_d) ### 思路 - 关键: 连续使用ai与投掷bi并无冲突, 可先使用ai再投掷bi - 找到ai中的最大值maxa; 首先从大到小使用bi中比 ......
abc084d <素数筛 前缀和>
### 题目 [D - 2017-like Number](https://atcoder.jp/contests/abc084/tasks/abc084_d) ### 思路 - 筛出数据范围`1e5`范围内的素数 - 检查每个素数是否为 2017-like - 对`1~1e5`内的2017-lik ......
abc083d <思维 贪心>
### 题目 [D - Wide Flip](https://atcoder.jp/contests/abc083/tasks/arc088_b) ### 思路 参考[live4m的博客](https://blog.csdn.net/weixin_44178736/article/details/1 ......
abc082d <bitset 状压dp>
### 题目 [D - FT Robot](https://atcoder.jp/contests/abc082/tasks/arc087_b) ### 思路 - 动态规划的方式记录每次行动后, 机器人在坐标系中所有可能位置 - 通过bitset对状态进行压缩, 即每个位置有机器人true or 没 ......
配置问题-Error creating bean with name 'user' defined in class path resource [bean.xml]
正在学习 IoC 使用的 jdk 版本为 jdk 17 依赖为: ```xml org.springframework spring-core 6.0.6 org.springframework spring-context 6.0.9 org.junit.jupiter junit-jupiter ......
深入浅出WPF——P91把子集集合的元素当Path
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); List <Country> countryList = new List<Country>() { new Country ......
vim E447: cannot find file iostream in path
查看c/c++文件中的头文件,可以使用gf跳转,但是有时会出现Error 447:not found in path1, 命名模式中输入,临时修改:set path=.,/usr/include,,/usr/include/c++/*/2, 修改vimrc增加set path+=.,/usr/inc ......
mac git clone error:xcrun:error:invalid active developer path(/Library/Developer/CommandLineTools)
背景升级Mac系统后,在终端使用git clone等相关命令失败,报错 xcrun:error:invalid active developer path(/Library/Developer/CommandLineTools),missing xcrun at:/Library/Developer ......
[ABC135D] Digits Parade
> [Digits Parade の 传送门](https://www.luogu.com.cn/problem/AT_abc135_d) ## Solution 首先看到 > $1\le |S|\le 10^5$ 考虑 DP。 定义 $f_{i,j}$ 表示前 $i$ 个位置的数除以 $13$ 的 ......
ABC222D-Between Two Arrays(前缀和优化dp)
题意:给定两个递增数列A和B,构造一个ai <= ci <= bi 的递增数列C,询问满足条件的C的个数。 普通dp会超时,用前缀和优化 n=int(input()) a=list(map(int,input().split())) b=list(map(int,input().split())) ......
A Randomized Algorithm for Single-Source Shortest Path on Undirected Real-Weighted Graphs 部分翻译
A Randomized Algorithm for Single-Source Shortest Path on Undirected Real-Weighted Graphs Ran Duan , Jiayi Mao , Xinkai Shu , and Longhui Yin 这篇翻译必定有相 ......
通过<util:property-path /> 动态配置JedisCluster 节点
配置文件(统一命名): # redis cluster redis.node1.host=192.168.1.61 redis.node1.port=7000 redis.node2.host=192.168.1.62 redis.node2.port=7000 redis.node3.host=1 ......
defined in class path resource [de/codecentric/boot/admin/server/config/AdminServerWebConfiguration$
搭建springbootadmin监控时出现的,经排查是版本过低 ,换个高版本的,顺利进入网页界面 <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-server</artifac ......
【Azure App Service】Web Job 报错 UNC paths are not supported. Defaulting to Windows directory.
问题描述 PHP的Web Job,通过artisan来配置路径启动PHP任务,相关启动脚本如下: artisan_path = "d:\\home\\site\\wwwroot"; cd ${artisan_path} echo "\n" pwd php artisan schedule:run 但 ......
Nginx:client_body_temp_path 指令的上传文件测试
### 结论 硬盘必须要有上传文件**3倍**大小的剩余空间。否则会报错“no space left on device”。 需要注意,这3份数据都会写到硬盘。大文件上传,实时观察硬盘剩余空间`watch -n 0.1 "df -hm /"`,会看到很大的波动。 ### 默认临时文件路径 - 文档 ......
AtCoder Beginner Contest 309 Ex Simple Path Counting Problem
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc309_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc309/tasks/abc309_h "AtCoder 传送门") 挺妙的题。 考虑 ......
[LeetCode] 931. Minimum Falling Path Sum
Given an n x n array of integers matrix, return the minimum sum of any falling path through matrix. A falling path starts at any element in the first ......
CF1486F Pairs of Paths 总结--zhengjun
需要保持: - 写代码前先仔细考虑一下细节,分类讨论清楚再开始码。 警告: - namespace 里面写了个 n,想调用全局 n 的时候没加 2*冒号。 思路大概就是分类讨论然后计数就完事了。 ### 代码 ```cpp #include using namespace std; using ll ......
[ABC134E] Sequence Decomposing
[Sequence Decomposing の 传送门](https://www.luogu.com.cn/problem/AT_abc134_e) ### 前置知识 > [multiset](https://zh.cppreference.com/w/cpp/container/multiset) ......
ABC309G Ban Permutation
### Problem > 求有多少个 $1$ 至 $n$ 的排列 $P$,满足对于任意 $i$ 都有 $|i-p_i|\ge X$。 > $1\le n\le 100$,$1\le X\le 5$。 ......
abc081d <思维 构造>
[D - Non-decreasing](https://atcoder.jp/contests/abc081/tasks/arc086_b) ``` // https://atcoder.jp/contests/abc081/tasks/arc086_b // // 两种情况非常容易构造 : 全整 ......
abc080d <区间重叠>
[D - Recording](https://atcoder.jp/contests/abc080/tasks/abc080_d) ``` // https://atcoder.jp/contests/abc080/tasks/abc080_d #include #include using na ......
Atcoder ABC 309 F
# [Atcoder ABC 309 F](https://atcoder.jp/contests/abc309/tasks/abc309_f) ## 题意 n个盒子,长宽高为$x,y,z,$(长宽高是相对的,可以任意调换),问是否有一个盒子可以完全容纳另一个盒子,即存在一个$A_i={x_i,y_ ......
django python manage.py migrate 后报错字段长度超了 django.db.utils.OperationalError: (1118 'Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.
现象: 在models.py 将CharField字段的maxlength=修改后,执行ython manage.py migrate 报错django.db.utils.OperationalError: (1118 'Row size too large. The maximum row siz ......
abc079d <Floyed>
[D - Wall](https://atcoder.jp/contests/abc079/tasks/abc079_d) ``` // https://atcoder.jp/contests/abc079/tasks/abc079_d // #include #include #include # ......