div 1870 div1 div2

Educational Codeforces Round 151 (Rated for Div. 2)

# Preface 期末考终于结束了,终于可以回来写题了 这场是刚考完最后一门的那个晚上打的,因为太久没有写代码了所以不是很熟练而且脑子也不太灵光,只能堪堪写到D题而且手速感人 上次CF第二个号因为Rating被roll了导致从紫名掉下来了,这场就把它又打上去了,再这样后面兴许要用第三个号打了 由于 ......
Educational Codeforces Round Rated 151

Educational Codeforces Round 151 [div.2 #A-C] 赛后总结(contest/1845)

### [link](https://codeforces.com/contest/1845 "Educational Codeforces Round 151") $\textcolor{52C41A}{A}-\textcolor{FADB14}{B}-\textcolor{FADB14}{C}- ......
Educational Codeforces contest Round 1845

CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!)C

# CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!)C ## C(dp) [C](https://codeforces.com/contest/1842/problem/C) 题目给出一个数组,我们可以在这一个数组里面找出$a_i$和$a_j$其中$ ......
Div CodeTON Prizes Round Rated

Educational Codeforces Round 151 (Rated for Div. 2)(C,D)

# Educational Codeforces Round 151 (Rated for Div. 2)(C,D) ## C(dp,子序列自动机) [C](https://codeforces.com/contest/1845/problem/C) 题目大意就就是给你一个字符串$s$,还给出两个边 ......
Educational Codeforces Round Rated 151

Educational Codeforces Round 151 (Rated for Div. 2) A~D

A. Forbidden Integer 模拟: void solve(){ int n,k,x; cin>>n>>k>>x; if(x!=1){ cout<<"YES\n"<<n<<"\n"; for(int i=1;i<=n;i++) cout<<"1"<<" \n"[i==n]; return ......
Educational Codeforces Round Rated 151

Educational Codeforces Round 151 (Rated for Div

## C. Strong Password >给定一个字符串$s$,一个密码的长度$m$,下界字符串$l$和上界字符串$r$,上下界字符串长度均为$m$,且字符只在0~9范围内,上界字符串的第 $i$ 位非严格大于下界字符串的第 $i$ 位,密码的第 $i$ 位需要位于 $[l_i, r_i]$ 内 ......
Educational Codeforces Round Rated 151

echarts超出外部div

![image](https://img2023.cnblogs.com/blog/2456011/202306/2456011-20230629141317864-1270703604.png) 问题产生:先渲染dom 后渲染数据 解决方法: 1 可以延时渲染 2 监听resize事件 ``` t ......
echarts div

点击div打开弹窗,点击其他区域关闭弹窗

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi ......
区域 div

CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!) D. Tenzing and His Animal Friends

题面是真的抽象,翻译为人话之后大概就是,对于每个选择的集合当中,1必须选,n一定不能选,每个限制条件的意思是如果u和v不在一个集合里则最能玩y时间,则u或v独自玩最多玩y时间 如果在同一集合则可以玩无限时间 因此如果n和1不连通的话则一定为inf,否则的话就一定有限制,因为n一定不能选,则和n相连的 ......
Div CodeTON Friends Tenzing Animal

Codeforces Round 881 (Div. 3)

~~失踪人口回归~~ VP 打的 ### A. Sasha and Array Coloring ``` int n; int a[maxN]; void solve(){ n=rd(); fp(i,1,n) a[i]=rd(); sort(a+1,a+n+1); ll ans=0; for(int ......
Codeforces Round 881 Div

CF1834 Div.2 做题记录

## A [题面](https://codeforces.com/contest/1834/problem/A) 分类讨论即可 点击查看代码 ``` #include #define ull unsigned long long #define ll long long #define pii pa ......
1834 Div CF

CodeTON Round 5 (Div. 1 + Div. 2, Rated, Prizes!) C. Tenzing and Balls

一开始以为是贪心,后来发现不好贪于是选择了dp,但是dp有个小细节没注意到,后面wa了几发 我们以状态来分,f[i]表示考虑i的最大区间合长度,每次转移的时候考虑两种情况,一种是a[i]前面有一样的数字,比较选了a[i]和不选a[i]两种情况下的最大值,还有一种就是a[i]为第一个出现的数字则选区间 ......
Div CodeTON Tenzing Prizes Balls

CF Round 881 (Div. 3)

# CF Round 881 (Div. 3) > Div. 3 果然简单,虽然但是,我还是有 1 道题没有想出来。 ## A.Sasha and Array Coloring 排序双指针向内即可。 ## B.Long Long > 好啊,就是这道题没想出来。 `Virtual Contest` 上 ......
Round 881 Div CF

Educational Codeforces Round 150 (Rated for Div. 2) A-E

[比赛链接](https://codeforces.com/contest/1841) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n; cin >> n; if (n ......
Educational Codeforces Round Rated 150

Codeforces Round 875 (Div. 2) C. Copil Copac Draws Trees

bfs解法 如果是暴力求解的话就每次都扫描一次所有边直到所有点都和树连接 优化:每次扫描我们可以发现会重复扫描那些已经存在树中的边了,因此我们可以只扫描还没有存在树中的边且是没扫过的边 对于每次更新,比如由点a已经在树中,更新点b,我们只需判断点a被更新到树中点的编号和a-b边的编号的大小,如果比它 ......
Codeforces Round Copil Copac Draws

Codeforces Round #879 (Div. 2) A-E

[比赛链接](https://codeforces.com/contest/1834) # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n; cin >> n; int c ......
Codeforces Round 879 A-E Div

Codeforces Round 781 (Div. 2) E. MinimizOR (可持久化字典树)

[传送门](https://codeforces.com/contest/1665/problem/E) 题目大意: ** T组测试数据每组测试数据先输入一个n表示有一个长度为n的一维数组,然后输入n个数字表示这个一维数组。紧接着输入一个k表示有k个询问,对于每个询问会输入一个l和一个r表示询问数组 ......
字典 Codeforces MinimizOR Round 781

Codeforces Round 881 (Div

## E. Tracking Segments >给定初始长度为`n`,且全为`0`的序列`a`,然后给出`m`个线段,如果一个线段中`1`的个数严格大于`0`的个数,那么该线段称为一个漂亮线段,现在给出`q`次操作,每次操作使得序列`a`中位置`x`上的`0`变为`1`,请你求出第一次使得所有线段 ......
Codeforces Round 881 Div

Codeforces Round 877 (Div. 2)A-D

Codeforces Round 877 (Div. 2)A-D A: 有负数就输出,没有就输出最大值即可。 void solve(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } sort(a+1,a+1+n); if(a[1]<0){ c ......
Codeforces Round 877 A-D Div

Codeforces Round 766 (Div. 2) 比赛报告

## 0 比赛经过 比赛还没开始的时候就感觉状态不太好。果然。 总归到底都是一个心态问题。 ### A 题经过 看 A 题,结果**半天看不懂,一开始没有注意到一定要在黑格子上操作**。扔到 DeepL 上翻译了一下,再手玩一下样例就做出来了,速度有点慢。CF 怎么这么喜欢出分讨题啊。 看题目不能太 ......
Codeforces 报告 Round 766 Div

Codeforces Round 881 (Div. 3)--F2

F2. Omsk Metro (hard version) #include<bits/stdc++.h> using namespace std; typedef long long ll; #define endl "\n" #define int long long const int N=2 ......
Codeforces Round 881 Div F2

鼠标悬浮div或者列表li时,展示出button按钮

<template> <div class="item"> <span> <input type="checkbox" :checked="obj.done" @click="handleCheck(obj.id)"> </span> <span> {{obj.name}} </span> <spa ......
按钮 鼠标 button div

Codeforces Round 878 (Div. 3) D. Wooden Toy Festival

题目翻译:给定一个序列,你可以把序列分为任意的三组不要求顺序,对于每一组序列给出一个数字作为标准,求出序列中和该数字的差绝对值的最大值,现在要求你选顶三个数字使得三个序列的差最大值的最大值最小 解题思路:二分,要想方差最小,就让每一组的极差都最小,即最大值减最小值最小 #include <iostr ......
Codeforces Festival Wooden Round 878

Codeforces Round 881 (Div. 3) F2. Omsk Metro (hard version) (线段树 )

[传送门](https://codeforces.com/contest/1843/problem/F2) 大致题意: ** 动态给定一颗树,树上每个结点的权值一定为1或者-1。最开始有1号点,权值为1。** ** 输入n表示有n个操作,当第一个符号为+ a b表示添加结点操作,编号依次递增。a表示 ......
线段 Codeforces version Round Metro

Codeforces Round 881 (Div. 3)

## [A - Sasha and Array Coloring (CF1843 A)](https://codeforces.com/contest/1843/problem/A) ### 题目大意 给定一个数组,给每个元素涂色。求最大的代价。 代价为每个颜色的代价和。 每个颜色的代价为涂了该颜色 ......
Codeforces Round 881 Div

练习记录-cf-Codeforces Round 881 (Div. 3)A-F1

E是补的 太蠢了没想到 期末考完的复健 A. Sasha and Array Coloring 题意:可以给不同数字涂上很多颜色,每个颜色的贡献是同一个颜色内的数字最大值和最小值的差 思路:排序一遍,取头和尾的差 #include<bits/stdc++.h> #define close std:: ......
cf-Codeforces Codeforces Round 881 A-F

Codeforces Round 881 (Div. 3)

Codeforces Round 881 (Div. 3) A: void solve(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; } sort(a+1,a+1+n); int ans=0; int l=1; int r=n; for(in ......
Codeforces Round 881 Div

Codeforces Round 880 (Div. 2) C. k-th equality

看好久题目了,题目大意是给定三个位数A,B,C和一个k,要求求所有满足要求的a+b=c等式中的第k个等式 等式按字典序由小到大枚举,例如1+9=10和2+6=8中1+9=10比2+6=8小 思路我们首先求出a,b,c的取值范围,然后先确定a,对于每一个确定的a都有一个确定的b和c区间与之对应,并且a ......
Codeforces equality Round k-th 880

ChatGPT 问答00002 div百分比高度下如何设置滚动

当使用百分比高度时,设置滚动需要指定父元素的高度以及将子元素的高度设为100%。此外,我们还需要将 `overflow` 属性设置为 `auto` 或 `scroll` 以启用滚动。 以下是一个示例CSS代码: ```css .parent { height: 50%; overflow: auto ......
百分比 百分 高度 ChatGPT 00002

Codeforces Round 879 (Div. 2) 题解

寄!大!了! Rating -= 124. ![image](https://img2023.cnblogs.com/blog/3143679/202306/3143679-20230619222246244-5109748.png) (恼) https://codeforces.com/conte ......
题解 Codeforces Round 879 Div