interesting codeforces function 1538f

Educational Codeforces Round 151 (Rated for Div. 2) B. Come Together

给三个点 $A, B, C$ ,两个人一开始都在 $A$ 点,一个人希望最快到达 $B$ ,另一个人希望最快到达 $C$ ,且他们希望尽可能走一条路径。则这条路径最长是多长。 经典的高维可以由低维叠加的问题。 * 坐标问题 * 动态规划问题 并非所有高维问题都可由低维叠加,但任何二维问题都可由一维叠 ......
Educational Codeforces Together Round Rated

Educational Codeforces Round 149 (Rated for Div. 2) B. Comparison String

给一个长度为 $n$ 的字符串 $s$ ,只包含字符“”。 一个长度为 $n + 1$ 的数组 $a$ 与 $s$ 是兼容的当且仅当对于任意 $i$ : 1. $s_i$ is $$ ,当且仅当 $a_i > a_{i - 1}$ 定义一个数组的 $cost$ 为这个数组中不同数的个数。 求一个 $ ......

Educational Codeforces Round 143 (Rated for Div. 2) B. Ideal Point

给 $n$ 条一维线段,一条端点为 $l, r$ 的线段可以覆盖 $\forall i, l \leq i \leq r$ 。定义 $f(x)$ 为点 $x$ 被线段覆盖的次数。一个点 $x$ 称为是 “完美的” 如果 $y \neq x, f(x) > f(y)$ 。 给一个点 $k$ ,询问是否 ......
Educational Codeforces Round Rated Ideal

* Codeforces Round 890 (Div. 2) supported by Constructor Institute B. Good Arrays

————哪有岁月安好,只是有人为你负重前行 给一个长为 $n$ 的数组 $a$ ,称一个数组 $b$ 是 $good$ 的如果满足以下条件: 1. $\forall i, a_i \neq b_i$ 2. $\sum_{i=1}^{n}a_i=\sum_{i=1}^{n}b_i$ 判断对于一个 $a ......

* Codeforces Round 886 (Div. 4) D. Balanced Round

有 $n$ 个值,分别为 $a_1, a_2, \cdots, a_n$ 。希望做两个操作 1. 移除一些(可能是 $0$ 个)问题 2. 重排列剩下的问题 一组值是好的当且仅当任意对于 $\forall i, j,\ 1 \leq i,j \leq n,\ |i - j| = 1,\ s.t.\ ......
Round Codeforces Balanced 886 Div

$('.panel-collapse').on('show.bs.collapse', function () {})详解

`$('.panel-collapse').on('show.bs.collapse', function () {});` 这段代码是在使用 jQuery来绑定事件。 - `$('.panel-collapse')`部分是一个选择器,它选择了当前页面上所有有`panel-collapse`这个类的 ......
collapse 39 panel-collapse function panel

codeforce800

题目链接 [https://vjudge.csgrandeur.cn/contest/578660](https://vjudge.csgrandeur.cn/contest/578660#overview) 题解 [toc] ## A CodeForces 1859A United We Stan ......
codeforce 800

【题解】Educational Codeforces Round 145(CF1809)

## A.Garland ### 题目描述: 有 $4$ 只灯泡,第 $i$ 只灯泡的颜色为 $s_i$ 。 一开始,所有灯泡都是关着的,你需要把它们都打开。你可以进行数次操作,每次操作改变一个灯泡的状态,即打开原本关着的灯泡或关上原本亮着的灯泡。第一次操作可选择任何灯泡,此后每一次被操作的灯泡的颜 ......
题解 Educational Codeforces Round 1809

Educational Codeforces Round 154 (Rated for Div. 2)

# Educational Codeforces Round 154 (Rated for Div. 2) [比赛链接](https://codeforces.com/contest/1861) 我都快忘了还有这一场比赛,今天打开cf看见这场比赛正好有时间就补了!!! 2023.9.3也许是出去玩了 ......
Educational Codeforces Round Rated 154

TypeError: cb.apply is not a function 解决gitbook报错问题

TypeError: cb.apply is not a function 解决gitbook报错问题 编译报错内容 报错信息如下: /usr/lib/node_modules/gitbook-cli/node_modules/npm/node_modules/graceful-fs/polyfil ......
TypeError function gitbook 问题 apply

Educational Codeforces Round 7 A - E

# [Educational Codeforces Round 7](https://codeforces.com/contest/622) [TOC] ## [A - Infinite Sequence](https://codeforces.com/contest/622/problem/A) ......
Educational Codeforces Round

Educational Codeforces Round 6 A - E

# [Educational Codeforces Round 6](https://codeforces.com/contest/620) [TOC] ## [A - Professor GukiZ's Robot](https://codeforces.com/contest/620/probl ......
Educational Codeforces Round

Educational Codeforces Round 154 (Rated for Div. 2)

# Preface 太FW了现在,纯纯给队伍拖后腿,马上要成为我们队CF Rating最低的了 但换句话说徐神和祁神都这么猛,我直接躺着被嘎嘎带飞好像也很爽啊 不管怎么样还是要多练,不过接下来可能要按专题重点突破了,明天队里开个会确定下大家的主攻方向再说 # A. Prime Deletion 因为 ......
Educational Codeforces Round Rated 154

Educational Codeforces Round 23 A - F

# [Educational Codeforces Round 23](https://codeforces.com/contest/817) [TOC] ## [A - Treasure Hunt](https://codeforces.com/contest/817/problem/A) 往四个 ......
Educational Codeforces Round 23

Educational Codeforces Round 154 (Rated for Div. 2)(A—C)

# [A. Prime Deletion](http://codeforces.com/contest/1861/problem/A "A. Prime Deletion") ## 思路: 从1到9,每个数后面都可以加一个数构成一个含有两个数的质数,只需要从s[1]~s[9]中找到一个数与s[0]构 ......
Educational Codeforces Round Rated 154

【题解】Educational Codeforces Round 153(CF1860)

每次打都想感叹一句,Educational 名不虚传。 ## A.Not a Substring ### 题目描述: 有 $t$ 组数据,对于每一组数据,你需要判断能否构造一个只由左右括号组成且长度为已经给定字符串的 $2$ 倍且已经给定的字符串不是子串的合法字符串。注:合法的字符串是左右括号能完全 ......
题解 Educational Codeforces Round 1860

Educational Codeforces Round 113

稳定发挥4题 A题文件输出没去掉WA了一发 B题特殊情况没判到,WA了好几发,中间还交到D题去了 C题简单判断一下无解,然后组合数求一下就行 D题其实也挺简单的,考虑严格夹在两条竖线之间的点(不包括边界),如果它们不是在同一水平线上,则必然大于Manhattan距离,而且两个点对之间要么是x方向走多 ......
Educational Codeforces Round 113

Educational Codeforces Round 154 (Rated for Div. 2)

感觉edu的题目都比较有新意; A.Prime Deletion 题意:给定长度为9的数,且1-9每个数字出现一次,求按照原定顺序选几个数组成的质数(起码选择两个); 下意识写了一个dfs,过了; 1 #include<bits/stdc++.h> 2 using namespace std; 3 ......
Educational Codeforces Round Rated 154

Educational Codeforces Round 123

# A. Doors and Keys ```cpp #include using namespace std; #define int long long void solve() { string s; cin >> s; map pos; for( int i = 0 ; i > t; whi ......
Educational Codeforces Round 123

Educational Codeforces Round 15 A - E

# [Educational Codeforces Round 15](https://codeforces.com/contest/702) [TOC] ## [A - Maximum Increase](https://codeforces.com/contest/702/problem/A) ......
Educational Codeforces Round 15

Educational Codeforces Round 5 A-E

# [Educational Codeforces Round 5](https://codeforces.com/contest/616) ![image-20230901173739735](C:\Users\magicat\AppData\Roaming\Typora\typora-user- ......
Educational Codeforces Round A-E

Educational Codeforces Round 114

今天的D题有点惊险了,属于是,还剩9分钟搞出来。 B题开始猜到了结论,只要在最大值和最小值之间都是可以的,证明的话,可以先考虑从数量大的开始填,然后反证法一下(口胡) C题选择attack肯定是尽量跟,dragon的defence越接近越好 如果有相等就直接选,否则就选前面的或者后面的 本来写的是b ......
Educational Codeforces Round 114

Codeforces Round 894 (Div. 3)

## $A. Gift Carpet$ ```cpp void solve(){ int n=read(),m=read(); char a[n+1][m+1]; for(int i=1;i>a[i][j]; } } string s="vika"; int cnt=0; for(int i=1;i ......
Codeforces Round 894 Div

【题解】Educational Codeforces Round 154 A-E(CF1861)

感觉很不在状态啊,竟然没做出来 E。 ## A.Prime Deletion ### 题目描述: 质数是一个正整数,它正好有两个不同的正除数 $1$和整数本身。例如,$2$、$3$、$13$和$101$是质数;$1$、$4$、$6$和$42$不是质数。 给你一个从$1$到$9$的数字序列,其中**从 ......
题解 Educational Codeforces Round 1861

codeforces div 3 contest 894 solutions

IOI失利day1了,打div 3休息一下吧 https://codeforces.com/contest/1862/ A. Gift Carpet 贪心寻找第一个v, 其他的找最早的i,k,a就好了。 应该不需要多说(?) B.Sequence Game 就是想想看当我们有4 3的时候应该怎么做? ......
codeforces solutions contest 894 div

【CF1542C】Strange Function(数论)

**题目大意:** *** ```cpp #include using namespace std; typedef long long ll; const ll mod=1e9+7; ll n; ll lcm(ll x,ll y){ return x/__gcd(x,y)*y; } int mai ......
数论 Function Strange 1542C 1542

2023-08-31 chooseMedia:fail d.lookup(...).indexOf is not a function ==》图片类型不支持导致

小程序上传图片调uniapp的api:uni.chooseMedia 报错:chooseMedia:fail d.lookup(...).indexOf is not a function==》chooseMedia:fail d.lookup(…).indexOf不是函数 盲猜:我选择了一张该ap ......
chooseMedia function indexOf 类型 lookup

「题解」Codeforces 1863G Swaps

看成内向基环森林,操作 $u\to v$ 相当于让 $u$ 连向 $v$ 所连的点,$v$ 变成自环。发现如果一个点 $v$ 变成了自环,那么操作任意一个 $u\to v$ 都没有用。 从简单的情形出发,对于一个内向树(或者说环大小为 $1$ 的内向基环树),每次操作 $x\to fa_x$ 时,相 ......
题解 Codeforces 1863G Swaps 1863

Educational Codeforces Round 116

昨天只有3题,D题太难写了呜呜呜 A题上来写错WA了一发 B题开始写的二分,但是一直WA,前几天写二分写傻了,后面发现直接模拟不就完了吗? C题直接秒了,从低位往高位放,看看能不能够到下一个位置。 ```cpp #include #include #include #include #include ......
Educational Codeforces Round 116

【题解】Educational Codeforces Round 152(CF1849)

## A.Morning Sandwich ### 题目描述: 吃货小 C 喜欢三明治,他有三种材料:面包、芝士、火腿。正确的三明治组合应为一层面包和一层芝士或火腿之一轮流放置,以面包为结尾,例如面包-芝士-面包-火腿-面包就是合法的三明治。 给定每次做三明治的材料:$ b $ 面包,$ c $ 芝 ......
题解 Educational Codeforces Round 1849