div 1870 div1 div2

Codeforces Round 875 (Div. 2) A-D

## A. Twin Permutations 题意:给出一个由[1,2,...,n]组成的数组a,构造另一个由[1,2,...,n]组成的数组b,使得a[1]+b[1]>n; for(int i=1;i>a[i]; } for(int i=1;i>n; for(int i=1;i>a[i]; fo ......
Codeforces Round 875 A-D Div

Codeforces Round 875 (Div

# Codeforces Round 875 (Div. 2) C-D题解 ### C [Problem - C - Codeforces](https://codeforces.com/contest/1831/problem/C) 我们发现题述所形成的父亲节点一定比子节点先画出,并且如果子节点顺 ......
Codeforces Round 875 Div

Codeforces Round 875 (Div. 2)

# Preface 难得现场打一次,这天下午打了三个半小时的校内赛,然后八点打了两小时ARC,最后再接上两个半小时的CF真是爽歪歪 不过有一说一其实很多时候都在坐牢,这场CF也差不多,一个小时写完ABCD然后开始坐牢,其实E基本想出来了但是没想到用随机赋值的方法来实现 不过由于这场手很稳因此排名极高 ......
Codeforces Round 875 Div

CF1292 div.1 做题记录

## A [CF题面](https://codeforces.com/contest/1292/problem/A) 若某一列的第 $i$ 行禁止移动,那么看另一列的第 $i-1,i,i+1$ 行是否存在禁止移动的格子,若存在为 `No`,否则为 `Yes`,这个只需要在改变一个点状态时判断即可。 ......
1292 div CF

cf-div.2-875d

链接:https://codeforces.com/contest/1831/problem/D 脑子确实不好使,没啥思路,看jls代码之后豁然开朗。 思路:先枚举约数s,因为$b_i+b_j$不会超过4e5,所以第一层枚举所有约数为根号级别,第二层循环里枚举所有对数,统计$v = a_i*s-b_ ......
cf-div 875 div cf

Codeforces Round 874 (Div. 3)

# A. Musical Puzzle ```cpp #include using namespace std; void solve(){ int n; string s; cin >> n >> s; set cnt; for( int i = 0 ; i + 1 > t; while( t - ......
Codeforces Round 874 Div

Codeforces Round 875 (Div. 2) A-D

# Codeforces Round 875 (Div. 2) ## A. Twin Permutations ```c++ int a[N]; void solve(){ int n=read(); for(int i=1;i0?"YES":"NO"); //puts(ans>0?"Yes":"N ......
Codeforces Round 875 A-D Div

Codeforces Round #875 (Div. 2)

# Codeforces Round #875 (Div. 2) [bilibili: Codeforces Round #875 (Div. 2) 实况 | 完成度 \[4.01 / 6\]](https://www.bilibili.com/video/BV1bo4y137he) ## A `` ......
Codeforces Round 875 Div

Codeforces Round 875 (Div. 2) A~D

# Codeforces Round 875 (Div. 2) A~D ### A. Twin Permutations 构造$a[i]+b[i]=n+1$ ```c++ void work() { int n; cin >> n; rep (i, 1, n) { int x; cin >> x; ......
Codeforces Round 875 Div

Educational Codeforces Round 149 (Rated for Div.2) 题解 A~D

## [A](https://codeforces.com/contest/1837/problem/A). Grasshopper on a Line ### 题目大意 给定两个整数 $x$ 和 $k$,我们需要规划一条路线,从 $(0,0)$ 走到 $(0, x)$,同时满足我们每次走的距离不能 ......
题解 Educational Codeforces Round Rated

HTML中让上下两个div之间保持一定距离或没有距离

这篇文章主要为大家详细介绍了HTML 让上下两个DIV之间保持一定距离或没有距离,可以用来参考一下。 1、若想上下DIV块之间距离,只需设定:在CSS里设置DIV标签各属性参数为0div{margin:0;border:0;padding:0;} 这里就设置了DIV标签CSS属性相当于初始化了DIV ......
上下 之间 两个 HTML div

Educational Codeforces Round 149 (Rated for Div. 2)(A~F)

A. Grasshopper on a Line 题意:给出n,k,从0开始,每次可以加一个数,最快到达n需要,输出首先跳几次,然后每次跳多少,限制只有一个跳的长度不能整除k。 分析:n%k,有余直接跳,没余数,先跳一个,再跳剩余的长度。 代码: ``` #include #include #inc ......
Educational Codeforces Round Rated 149

Educational Codeforces Round 149 (Rated for Div. 2) 题解

https://codeforces.com/contest/1837 https://codeforces.com/contest/1837/problems 利益相关:上紫祭。 真的不要以为这道题放在 F 就不敢做。 压线过题的感觉真好。 ![image](https://img2023.cnb ......
题解 Educational Codeforces Round Rated

Educational Codeforces Round 149 (Rated for Div. 2)

# Preface 补题,本来这场想现场打的,但是玩**《Island》**玩的有点上头就没打了~~(逸一时,误一世~~ 然后今天发现2h30min就没啥难度的全写了,早知道昨天现场打给大号涨波分了 不过现场打以我的尿性也不知道会整出什么逆天操作,等下一个细节写挂心态一崩就开始坐牢~~(乐~~ # ......
Educational Codeforces Round Rated 149

用fetch处理的流,放到div中会有样式丢失的问题

最近在做fetch处理流的问题,发现接收到得流,在div中渲染得时候样式会丢失,特别是空格、换行之类得。为了解决问题去看看了css得样式处理发现css中有个属性white-space。 然后就去看了这个属性的定义和取值情况。 在css中white-space属性用来控制容器的文本中带有空白符、制表符 ......
样式 问题 fetch div

文字超过div容器的高度显示...

我们一般遇到的场景为超过一行或者2行,3行等等显示...,但是对于div容器 如果想实现超过div容器的高度才显示...,这该怎么实现呢 我们知道,当div只有内部只有一个文字时 此时空间足够,2个也是...那么第n个呢,所以思路来了,我们可以一直计算下去,知道超过容器高度为止 代码如下: <htm ......
容器 高度 文字 div

Codeforces Round 874 (Div. 3)

Codeforces Round 874 (Div. 3) A - Musical Puzzle 思路:记录两个长度字符串的种数 #include<bits/stdc++.h> using namespace std; typedef pair<int,int>PII; typedef pair<s ......
Codeforces Round 874 Div

Educational Codeforces Round 149 (Rated for Div. 2)

Educational Codeforces Round 149 (Rated for Div. 2) A - Grasshopper on a Line 思路:只有两种情况,x整除k时为x-1和1,否则为x void solve() { int x, k; cin >> x >> k; if (x ......
Educational Codeforces Round Rated 149

Codeforces Round 837 (Div. 2) F. Hossam and Range Minimum Query

[传送门](https://codeforces.com/contest/1771/problem/F) 大致题意: ** 给一个n,然后给一个数组a, 有m个询问,询问区间[l, r]出现次数为奇数的最小值,若没有输出0, 每次输入的l,r需要异或上上一个答案,在第一个询问的时候认为上一个答案为0 ......
Codeforces Minimum Hossam Round Range

Educational Codeforces Round 143 (Rated for Div. 2) A-D

Educational Codeforces Round 143 (Rated for Div. 2) A. Two Towers void solve(){ int n=read(),m=read(); string s,t; cin>>s>>t; int ans=1; for(int i=0;i ......
Educational Codeforces Round Rated 143

Codeforces Round 870 (Div. 2)

# Preface 补题,感觉这场挺对口味的说,E直接秒出,虽然刚开始并不觉得能跑得过去,不过写了一发直接艹过去了可海星 F题挺有意思的一个题,不过刚开始没想到只要三次询问就行了所以想偏了,不然也是挺简单的 # A. Trust Nobody 枚举说谎的人的个数$x$,统计出$l_i>x$的个数$c ......
Codeforces Round 870 Div

CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!) A-E

CodeTON Round 4 (Div. 1 + Div. 2, Rated, Prizes!) A. Beautiful Sequence int a[N],poi[N]; void solve(){ int n=read(),ans=0; for(int i=1;i<=n;i++){ a[i] ......
Div CodeTON Prizes Round Rated

【CSS】div宽度由内部文字宽度决定

默认 div 的宽度会占满全屏 或由父级决定 使用 width:fit-content; 可以解决 前后对比 前: 后: ......
宽度 文字 CSS div

JS DIV滚动条 下拉到底部触发事件

1.针对浏览器窗口滚动 <script type="text/javascript"> var pageNum = 1; //获取数据方法 function GetPageData() { } //分页 $(window).scroll(function () { //滚动到底部时 if ($(wi ......
事件 DIV JS

Educational Codeforces Round 148 (Rated for Div. 2) D1. Red-Blue Operations

[Easy Version传送门](https://codeforces.com/contest/1832/problem/D1) [Hard Version传送门](https://codeforces.com/contest/1832/problem/D1) 题目大意: ![](https:// ......

Codeforces Round 732 (Div

## [AquaMoon and Strange Sort](https://vjudge.net/problem/CodeForces-1546C) >有 $n$ 个人从左到右站成一排,从左数第 $i$ 个人的衣服上印着 $a_i$。每个人的朝向可以是朝左、朝右。一开始所有人的方向都是朝右。 > ......
Codeforces Round 732 Div

Educational Codeforces Round 148 (Rated for Div. 2)

# Preface 补题,这场比较简单,E之前的都能写出来,当然D的细节挺多的WA了好几发 感觉时间好不够用啊,想补的题那么多但效率好低,可能要等暑假才能集中攻克了 # A. New Palindrome 统计下出现了一次以上的字符有几种,如果大于等于两种就有解 ```cpp #include #i ......
Educational Codeforces Round Rated 148

Codeforces Round 874 (Div. 3) A-F

Codeforces Round 874 (Div. 3) A. Musical Puzzle map<int,int>mp; void solve(){ mp.clear(); int n=read(),cnt=0; string s; cin>>s; for(int i=0;i<n-1;i++) ......
Codeforces Round 874 A-F Div

Codeforces Round 862 (Div. 2) A-D

Codeforces Round 862 (Div. 2) A. We Need the Zero int a[N]; void solve(){ int n=read(),sum; for(int i=1;i<=n;i++){ a[i]=read(); if(i==1)sum=a[i]; else ......
Codeforces Round 862 A-D Div

Codeforces Round 873 (Div. 2) A~D2

## Codeforces Round 873 (Div. 2) A~D2 ### A. Divisible Array 因为$1$一定整除,构造$a_i=i$,再让$a_1$加上和模$n$的余数 ```c++ void work() { int n; cin >> n; vector a(n + ......
Codeforces Round 873 Div D2