codeforces divisible numbers version
Node Sass version 8.0.0 is incompatible with ^4.0.0.
这是因为当前版本与4.0.0不兼容 卸载当前版本sass: npm uninstall node-sass 安装指定版本sass: npm install node-sass@4.14.1 参考这里 https://www.cnblogs.com/lisir-blogshare/p/15439088 ......
220-You are user number 3 of 50 allowed.
File Transfer Protocol (FTP)ftp220 Welcome to Pure-FTPd [privsep] [TLS] 220-You are user number 3 of 50 allowed.220-Local time is now 22:12. Server po ......
Educational Codeforces Round 116 (Rated for Div. 2)
题目链接 A 核心思路 这个题目相当的玄学,所以如果遇到实在不会的题目。那么直接从样例入手吧,我们可以从样例发现每次改的都是开头或者最后的一个。于是大胆的猜测啊。会不会只要改动开头或者是结尾的呢。 结论:如果开头和结尾相同就不需要改,如果需要就要改。 数学归纳法: n=3,aba这种情况显然成立。 ......
Codeforces Round 760 (Div. 3) D. Array and Operations(贪心)
https://codeforces.com/contest/1618/problem/D 题目大意: 给定一个长度为n的数组a,我们可以进行m次操作: 每次操作可以任意选择两个不同的下标的数字x和y,并把它两删除,替换成x/y(但是x/y不可以再被选择进行除数运算了)。 问我们这样剩下来的数列的最 ......
Windows 10, version 22H2 (updated March 2023) 简体中文版、英文版下载
Windows 10 22H2 2023 年 3 月更新 请访问原文链接:https://sysin.org/blog/windows-10/,查看最新版。原创作品,转载请保留出处。 作者主页:sysin.org Windows 10 更新历史记录 Windows 10, version 22H2, ......
Could not find a version that satisfies the requirement ModuleName
pip换源 pip使用官方源常见错误Could not find a version that satisfies the requirement ModuleName, 推荐永久修改成豆瓣源. pip config set global.index-url https://pypi.douban. ......
Codeforces 70D. Professor's task
题目链接:D - Professor's task 题目大意:初始给三个点,之后要求实现两种操作:加点;判断给定点是否在凸包内部。 动态凸包板子题,留档怕忘了,参考 https://www.cnblogs.com/enzymii/p/8413480.html #include<bits/stdc++ ......
Codeforces Round 644 (Div. 3) D. Buying Shovels(数论)
https://codeforces.com/contest/1360/problem/D ###D. Buying Shovels 题目大意: 一个人想买正好n把铲子。店内有k种包装的铲子:第i种包装正好由i把铲子组成(1≤i≤k)。这家商店有无限数量的包装。 选择一种类型的包装,然后购买几个(一 ......
Edu Round 板刷计划 2. Educational Codeforces Round 2 题解
Change Log: 2023.03.22 开坑. A - Extract Numbers ......
Codeforces Round 859 (Div
F. Bouncy Ball 给定$n×m$矩形,起点$st$,终点$ed$,有一小球从起点出发,每次可以选择4个方向,如果碰到边界就反弹,询问最后能否到达终点 题解:$DFS$ + $map$记录状态 按照题意$dfs$模拟分类讨论即可,但是我们这边说一下什么情况下不会到达终点,也就是我们到达了以 ......
version "go1.16.4" does not match go tool version "go1.20.2"
1、访问golang中国官网,下载适用于Linux的Go1.20.2安装包。 2、打开终端并导航到下载的安装包所在的目录。 3、解压缩安装包,例如:tar -C /usr/local -xzf go1.20.2.linux-amd64.tar.gz。 4、将Go二进制文件的路径添加到PATH环境变量 ......
Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified
最近在写代码时碰到如下错误: java.lang.IllegalArgumentException: com.example.imdemo: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG ......
【题解】Codeforces Round 858(CF1806) A-C,E
比赛体验表示极差,分类讨论相当崩溃,甚至前两个题 $30min$ 才过。 A. Walking Master 题目分析: 慢慢分析一下,看看到底能不能走过去以及走到什么地方就好了。 一个前置知识,$x \to y$,如果只能 $+1$ 或 $-1$ 的最小操作步骤是 $|x - y|$ 代码: 点击 ......
Codeforces Round 368 (Div. 2) D. Persistent Bookcase 主席树维护bitset
在学主席树时找到了这道题 本来yyyy了一个二维的主席树这种东西,然后发现很多信息好像维护不了 观察到n和m都很小,考虑把一整行看成一个节点,开一个bitset 然后区间取反、单点修改,就都可以直接做啦。 最开始不敢直接这么做,总觉得在结构体里再封装一个bitset太大 但其实还好,时间复杂度100 ......
Edu Round 板刷计划 1. Educational Codeforces Round 1 题解
Change Log: 2023.03.21 开坑. A - Tricky Sum 简单题. 注意到 $n$ 以内 $2$ 的幂次只有 $O(\log n)$ 个,因此只要先算出 $1$ ~ $n$ 里所有数的和再减去 $2$ 的幂次的和的 $2$ 倍即可. 时间复杂度 $O(t\log n)$. ......
CF 1738C Even Number Addicts
题目地址 题意:有一个数组,Alice和Bob每次拿走其中的一个数,Alice先拿,问最后Alice拿的数的和是否为偶数 Solution 博弈论,这里的数据量不大,dp+记忆化搜索 dp[cnt1][cnt2][c][s]表示剩余cnt1个奇数和cnt2个偶数时,当前的操作人为c,Alice拿的数 ......
Codeforces Round 857 (Div. 2) C-The Very Beautiful Blanket
题目地址 题意:构造一个二维数组,使得任意一个4*4的子矩阵满足: A11⊕A12⊕A21⊕A22=A33⊕A34⊕A43⊕A44 A13⊕A14⊕A23⊕A24=A31⊕A32⊕A41⊕A42 Solution(思路来源:知乎xioachou) 对于4个数来说,任意一个二进制位上的1和0都为偶数, ......
Codeforces Round 855 (Div. 3) 题解集
CF1800题解集 包含
CF1800A CF1800B CF1800C1 CF1800C2 CF1800D CF1800E1 CF1800E2
七道题解(附详解及代码) ......
[LeetCode] 2348. Number of Zero-Filled Subarrays
Given an integer array nums, return the number of subarrays filled with 0. A subarray is a contiguous non-empty sequence of elements within an array. ......
Codeforces Round 858:B. Mex Master
一、来源:Problem - B - Codeforces 二、题面 三、思路 题面:n个非负正数,随机排列并由相邻两个数相加构成n-1个数并进行升序排列,求从0开始的第一个MEX(Minimum Excluded) 两种思考模型: 首先可知0的数至少要过一半,接下来 递归:考虑1是否能以相同情况考 ......
Educational Codeforces Round 143 (Rated for Div. 2) A-E
比赛链接 A 题意 有两座塔由红蓝方块组成,分别有 $n,m$ 个方块,一次操作可以把一座塔塔顶的方块移动到另一座塔的塔顶,问通过操作是否能使每座塔中没有颜色相同的相邻方块。 题解 知识点:贪心。 注意到,操作最多能拆掉一对相邻的方块,因此统计两座塔不合法的对数。 如果超过 $1$ 对,那么无解。 ......
Codeforces Round #851 (Div. 2) A-E
比赛链接 A 题意 给一串只包含 $1,2$ 的数,找到最小的 $k$ 使得 $\prod_{i=1}^k a_i = \prod_{i=k+1}^n a_i$ 。 题解 知识点:枚举。 因为只有 $1,2$ ,所以考虑左右两边 $2$ 的个数即可。 时间复杂度 $O(n)$ 空间复杂度 $O(n) ......
Codeforces Round #844 (Div.1 + Div.2) CF 1782 A~F 题解
点我看题 A. Parallel Projection 我们其实是要在这个矩形的边界上找一个点(x,y),使得(a,b)到(x,y)的曼哈顿距离和(f,g)到(x,y)的曼哈顿距离之和最小,求出最小值之后加h就是答案了,因为我们不可能在竖着的墙面上来回走,只可能走一次。进一步发现我们在上底面和下底面 ......
Codeforces Round #846 (Div. 2) A-E
比赛链接 A 题意 给 $n$ 个正整数,找到三个数,使得他们的和为奇数,输出他们的下标。 题解 知识点:贪心。 找到三个奇数或者一个奇数两个偶数即可,其他情况无解。 时间复杂度 $O(n)$ 空间复杂度 $O(n)$ 代码 #include <bits/stdc++.h> using namesp ......
Codeforces Round #844 (Div. 1 + Div. 2, based on VK Cup 2022 - Elimination Round) A-D
比赛链接 A 题意 设计一条线路要贴着6个墙面走,从 $(a,b)$ 到 $(f,g)$ ,线路长度最短。 题解 知识点:模拟。 分类取最短即可。 时间复杂度 $O(1)$ 空间复杂度 $O(1)$ 代码 #include <bits/stdc++.h> #define ll long long u ......