codeforces round sort with

Codeforces Round 866 (Div. 2)

A. Yura's New Name 一个简单的 dp,状态是$f[i][0/1]$表示前$i$位变成合法的且最后一位是^或_的最小代价。 如果是_只能从^转移过来,如果是^则都可以转移过来 #include <bits/stdc++.h> using namespace std; void sol ......
Codeforces Round 866 Div

Codeforces Dp

Zero Remainder Sum 采用辅助数组 $ ndp[m + 1][\frac{m}{2}][k] $ 来求出每一行中在当前第 $ i $ 列,取了 $ j $ 个物品,总和模 $ k $ 的余数是 $ t $ 的最大和是多少。用 $ dp[n + 1][k] $ 来转移每一行的状态。 # ......
Codeforces Dp

is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

指定允许连接不成功的最大尝试次数。5.7默认是100;如果到达这个数,那么服务器将不再允许新的连接,即便mysql仍正常对外提供服务。所以可以将这个参数设置为几万。 show variables like 'max_connect_errors'; //最大链接错误次数 可以提供最大的链接错误次数 ......

Codeforces 1810G - The Maximum Prefix(DP)

挺小清新的一道计数题。 首先先分析下这个“最大前缀和”,按照最朴素的思路就是扫一遍每个前缀,然后记录一下当前的 $sum$ 与前面的 $mx$,但是如果你一直陷在这个思路上你就似了,因为按照这个思路做,你 DP 状态里需要记录 $sum$ 和 $mx$ 两个维度,算上下标一维总共是 $n^3$,并且 ......
Codeforces Maximum Prefix 1810G 1810

Codeforces 793G - Oleg and chess(网络流+优化建图)

很 trivial 的一道题,评到 3400 非常不理解。 首先一眼二分图匹配,关键点在于建图。显然需要数据结构优化,关键是怎么个优化法,很 trivial 的想法是考虑每一行,将极长的白格对应的连边用线段树优化掉,但是这样显然是不行的,因为一个黑白交错的图就可以把它卡成 $n^2$。 考虑借鉴二维 ......
Codeforces chess 网络 793G Oleg

An item with the same key has already been added.

开发环境:.Net Core 3.1,NPOI 2.6.0 前言:复制行数据时,提示错误如下: An item with the same key has already been added. Key: 0 at System.Collections.Generic.Dictionary`2.Tr ......
already added item been with

mysql——with xxx as生成临时表

1、with xxx as (select "a" as name,1 as age union all select "b",2) 生成一张叫xxx的临时表 name age a 1 b 2 2、with xxx as (select a字段 from b表),xxx2 as (select a2 ......
mysql with xxx

Plugin ‘Android WiFi ADB’ is compatible with IntelliJ IDEA only because it doesn’t define any explicit module dependencies

Plugin ‘Android WiFi ADB’ is compatible with IntelliJ IDEA only because it doesn’t define any explicit module dependencies Android Studio 中安装 Android ......

How to fix use the cURL to connect to GitHub with a 443 HTTPS error All In One

How to fix use the cURL to connect to GitHub with a 443 HTTPS error All In One curl: (7) Failed to connect to raw.githubusercontent.com port 443: 拒绝连接... ......
to connect GitHub HTTPS error

Jenkins官网实例----Build a Java app with Maven

Build a Java app with Maven 来自 <https://www.jenkins.io/doc/tutorials/build-a-java-app-with-maven/> 先创建network docker network create jenkins 运行容器jenkin ......
实例 Jenkins Build Maven Java

Codeforces Round 625 (Div. 1, based on Technocup 2020 Final Round) A. Journey Planning(dp)

https://codeforces.com/contest/1320/problem/A ###A. Journey Planning 题目大意: 给定一组数,问我们ai-aj==i-j的时候就可以把ai的值加起来,问我们可以凑到的最大总值是多少? input 6 10 7 1 9 10 15 o ......
Round Codeforces Technocup Planning Journey

Codeforces Round 866 (Div. 2) ABC

https://codeforces.com/contest/1820 ###A. Yura's New Name 题目大意: 给定一个字符串,每次这个表情^^或者这个表情^_^就是合法的 问我们这个字符串至少要添加多少东西使得怎么看都是合法的? input 7 ^______^ ___^_^^^_ ......
Codeforces Round 866 ABC Div

论文解读《Automatically discovering and learning new visual categories with ranking statistics》

论文信息 论文标题:Automatically discovering and learning new visual categories with ranking statistics论文作者:K. Han, Sylvestre-Alvise Rebuffi, Sébastien Ehrhard ......

启动SSH服务报:Job for ssh.service failed because the control process exited with error code.......

Job for ssh.service failed because the control process exited with error codesee systemctl status ssh.service and journalctl -xe for details.然后按照提示输入: ......
because control service process failed

论文解读(PAWS)《Semi-Supervised Learning of Visual Features by Non-Parametrically Predicting View Assignments with Support Samples》

论文信息 论文标题:Semi-Supervised Learning of Visual Features by Non-Parametrically Predicting View Assignments with Support Samples论文作者:Mahmoud Assran, Mathi ......

安装anaconda遇到问题:Error: Due to incompatibility with several Python libraries, 'Destination Folder' cannot contain non-ascii characters (special characters or diacritics). Please choose another location.

-今天安装anaconda遇到一个问题:Error: Due to incompatibility with several Python libraries, 'Destination Folder' cannot contain non-ascii characters (special cha ......

Codeforces Round 866 (Div. 2)(持续更新)

Preface 不知道为什么现在对不想打游戏刷B站什么的一点兴趣都没有,打开HBR就只想清下体力下线去写题 但学校的DS专题能抢一血的题都被抢的七七八八了,剩下几个难得要死都是些我OI时期都不会的东西(吉司机线段树、划分树之类的) 然后突然想起来昨天这场CF还没写博客,E明天再抽个时间想一下然后写吧 ......
Codeforces Round 866 Div

Codeforces Round 832 (Div2)

Swap Game Alice 和 Bob 两个人在玩游戏。 有一个长度为 $n$ 的序列 $a$,Alice 和 Bob 两人轮流完成一个操作,Alice 先开始。 每个人可以将数列的第一个数减 $1$,并将它与后面序列的一个数进行交换,如果一个人操作之前发现当前序列中的第一个数为 $0$,这个人 ......
Codeforces Round Div2 832 Div

Codeforces Round 764 (Div. 3) -- E. Masha-forgetful

** 题目大意:取去模板串中的子串可以组成一个给定的目标串,每个子串可以用无数次, 输出组成的所需的串的信息 题目中的取得子串必须 “>= 2” 很好的提示了我们, 想到一个式子 2 * x + 3 * y 可以等于任何数, 所以从之前的串都取长度为2, 为3。 在进行匹配。 ** struct n ......

【JS】- 排序浅记(sort)

字母或数字,默认排序顺序为按字母升序 和 array.reverse() 配合可以实现倒序 array.sort() 在对象数据中,使用函数进行规则配置 var array = [{ num: 4 }, { num: 2 }, { num: 3 }]; // 从小到大 array.sort((a, ......
sort

Codeforces Round 856 (Div2)

Counting Factorizations 任何一个正整数 $m$ 都可以被唯一的分解为 $p_1^{e_1} \cdot p_2^{e_2} \ldots p_k^{e_k}$ 的形式。将正整数 $m$ 的唯一质数分解转化为一个长度为 $2k$ 的 可重集合 记为 $f(m)$。 $$ f(m ......
Codeforces Round Div2 856 Div

Deep graph clustering with enhanced feature representations for community detection

论文阅读03-EFR-DGC:Enhanced Feature Representations for Deep Graph Clustering 论文信息 论文地址:Deep graph clustering with enhanced feature representations for co ......

FastGCN Fast Learning with Graph Convolutional Networks via Importance Sampling

Chen J., Ma T. and Xiao C. FastGCN: fast learning with graph convolutional networks via importance sampling. ICLR, 2018. 概 一般的 GCN 每层通常需要经过所有的结点的 prop ......

Codeforces Round 866 (Div. 2) A~C

这场,非常快落!是难得对中国选手友好的时间(17:05) A观察一下,发现在连续的___中插入^就好,然后特判一下首尾,发现很像小学奥数的那个植树问题哇( 注意特判一下只有一个^ #include<bits/stdc++.h> using namespace std; void solve(){ s ......
Codeforces Round 866 Div

[LeetCode] 1042. Flower Planting With No Adjacent

You have n gardens, labeled from 1 to n, and an array paths where paths[i] = [xi, yi] describes a bidirectional path between garden xi to garden yi. I ......
LeetCode Adjacent Planting Flower 1042

how to use cURL with a variable in the URL string All In One

how to use cURL with a variable in the URL string All In One 如何在 cURL 的 URL 字符串中使用变量 系统变量 环境变量 shell 变量 ......
variable string cURL with how

骗分记录(1)-INOH Round 1

这场比赛算是骗分的最高境界了——排名#16! 首先看T1。 第一眼总司令。得到 $10$ pts。但作为骗分高手,不可能就此结束。于是继续。 注意到Sub0 $T=3$。每一组数据只有 $2$ 种情况 Yes 和 No。所以一共只有 $8$ 种情况。根据测试发现测试点#1 $n=8$,于是再枚举答案 ......
Round INOH

Stochastic Training of Graph Convolutional Networks with Variance Reduction

Chen J., Zhu J. and Song L. Stochastic training of graph convolutional networks with variance reduction. ICML, 2018. 概 我们都知道, GCN 虽然形式简单, 但是对于结点个数非常多的 ......

Codeforces Round 770 (Div. 2)题解

A 题目: 给定一个串,我们拥有他的一个反串,进行k次操作,每一次把当前的串加上反串加在后面,或者加在前面,问最后我们可以得到最多几种序列? 思路: 模拟一下会发现,当一个串是回文的,最终的结果一定是1。 如果最开始的串不是回文的,经过一次操作之后也会变为回文串。(所以k==0时输出1.k>0时输出 ......
题解 Codeforces Round 770 Div

Ian and Array Sorting

题目链接 题目描述: To thank Ian, Mary gifted an array $a$ of length $n$ to Ian. To make himself look smart, he wants to make the array in non-decreasing order ......
Sorting Array Ian and