codeforces round 872 a-d

round函数

round(double a, int d):四舍五入,返回保留d位小数的近似值。要注意:四舍五入只考虑d+1小数位,如:round(1.449,1)返回1.4,round(1.49,1)返回1.5。 select round(3.141,1) 返回 3.1 ......
函数 round

Codeforces Round 892 (Div. 2)

# Codeforces Round 892 (Div. 2) [TOC] ## A United We Stand > 给定长度为$n$的数组`a`,可以将`a`中元素添加到空数组`b`或`c`中,满足两个数组均非空,且`c`中的元素不是`b`中元素的约数。若不能满足输出`-1`。 `c`中的元素 ......
Codeforces Round 892 Div

2023.08.12 codeforces round 893 div2

年轻人的第四场div2 rank:8217 solved:2 rating change:+31 new rating:1354 A.Buttons 题意:给定a,b,c三种按钮的数量,a按钮只能被Anna按,b按钮只能被Katie按,两个人都可以按c按钮,最后没有按钮可以按的人输,Anna先手,问 ......
codeforces round 2023 div2 893

Codeforces Round 891 (Div. 3)

比赛链接:https://codeforces.com/contest/1857 ## A. Array Coloring **题意**:一个数列,问能否分成两个和的奇偶性相同的集合 **思路**:因为偶数不改变奇偶性,咱们就统计奇数的个数,能平分成两组就行 ## B. Maximum Roundi ......
Codeforces Round 891 Div

Educational Codeforces Round 107 (Rated for Div. 2)

Educational Codeforces Round 107 (Rated for Div. 2) A - Review Site 思路:数1和3的个数 #include<bits/stdc++.h> using namespace std; #define int long long //#d ......
Educational Codeforces Round Rated 107

Codeforces Round 765 (Div. 2) A-E

## **A. Ancient Civilization** 好像就是对每个二进制位看一下0多还是1多,选择多的那个数就好了。 vp的时候直接猜的,交了一发直接过了 ```cpp void solve(){ int n=read(),m=read(); vectorcnt0(m+1),cnt1(m+ ......
Codeforces Round 765 A-E Div

Codeforces Round 893 (Div. 2)

Codeforces Round 893 (Div. 2) A - Buttons 思路:将第三种按钮平分给两人,若第一个人的按钮数大于第二个人则First #include<bits/stdc++.h> using namespace std; #define int long long //#d ......
Codeforces Round 893 Div

Codeforces Round 893(div2)

# Codeforces Round 893(div2) [A题传送门]([Problem - A - Codeforces](https://codeforces.com/contest/1858/problem/A)) ## A题意: 我们有a+b+c个瓶盖,选手1可以拿指定的a个或者c个里面的 ......
Codeforces Round div2 893 div

CodeForces 1858D Trees and Segments

[洛谷传送门](https://www.luogu.com.cn/problem/CF1858D "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1858/D "CF 传送门") 美丽度的式子可以写成 $(a - 1) \tim ......
CodeForces Segments 1858D Trees 1858

Codeforces Round 892 (Div. 2)

# Codeforces Round 892 (Div. 2) ## A. United We Stand ### 简述题意 给定一个长度为 $ n $ 的数列 $ a $ ,要求将 $ a $ 的每个元素分配到数列 $ b $ ,$ c $ 中,满足以下两个要求 1. $ b,c $ 不为空,即 ......
Codeforces Round 892 Div

Codeforces Global Round 15

Codeforces Global Round 15 A - Subsequence Permutation 思路:找出原串与排序后的串不同的个数 #include <bits/stdc++.h> using namespace std; void solve(){ int n;cin>>n; st ......
Codeforces Global Round 15

Codeforces Round 892 (Div. 2) A-E

## A. United We Stand 题意:给出一个长为$n$的数组$a$,将其中的元素分别放到空数组$b$和$c$中,使得$c$中的任意一个元素都不是$b$中任意一个元素的因数,并且两个数组都不是空数组 ### Solution 把$a$中最小的数放到$b$,其它的都放到$c$,一定可以保证 ......
Codeforces Round 892 A-E Div

[补题] Codeforces Round 892 (Div. 2)

## Codeforces Round 892 (Div. 2) ~~感觉被诈骗了ww~~ ### A #### Translate & Description 你有一个$a$数组,你可以将$a$数组的每一个数放到$b$数组或者$c$数组中。构造完后你需要确保$\forall b_i$%$\fora ......
Codeforces Round 892 Div

Codeforces Ronud 892(Div.2)

# Codeforces Ronud 892(Div.2) 关于A题我有话说 [传送门](https://codeforces.com/contest/1859/problem/A) ## 题意 给定一个长度为n的数组a,问能否将元素全部放入两个空数组b和c中,使得b和c数组同时满足非空,且c数组中 ......
Codeforces Ronud 892 Div

CodeForces-1798#B 题解

## 正文 开个数组 $last_k$ 统计 $a_{i,j}$ 最后买彩票的时间,再开一排桶 $day_t$ 记录该天最后买彩票的有哪些人(即:有 $p$ 满足 $last_p=t$ 的集合)。 将 $last_k$ 放入 $day_t$ 中,判断 $day_t$ 中是否存在空桶,若有则无解(因为 ......
题解 CodeForces 1798

2023.08.12 codeforces round 892 div2

年轻人的第三场div2(已完成:ABCDE) rank:1265 solved:4 rating change:+276 new rating:1323 A.United We Stand 题意:给定一个数列a,问是否能分成两个非空的数列b和c,使得c中任意一个数不是b中任意一个数的因子; 若x是y ......
codeforces round 2023 div2 892

牛客周赛 Round 7

# [牛客周赛 Round 7 ](https://ac.nowcoder.com/acm/contest/63091) ## [A-游游的you矩阵_牛客周赛 Round 7 (nowcoder.com)](https://ac.nowcoder.com/acm/contest/63091/A) ......
Round

Codeforces Round 892 (Div. 2)

c题jls的代码,拿过来仔细研究了一番,终于弄明白了。 https://codeforces.com/contest/1859/problem/C jls代码 ``` #include using i64 = long long; struct DSU { std::vector f, siz; D ......
Codeforces Round 892 Div

Codeforces Round 878 (Div. 3)

比赛链接:https://codeforces.com/contest/1840 ## A. Cipher Shifer **题意**:给你一个加密后的字符串,加密规则是将原字符串每个字符连续写两次,并在其中添加任意长度大于等于零的子串,求解原字符串 **思路**:不用管添加的子串,从第一个字符开始 ......
Codeforces Round 878 Div

Codeforces Round 892 (Div. 2)

# Preface 最接近橙名的一场,可惜给我一个小时也没想到E的关键点,后面徐神一点拨就懂了 虽然现在这个号已经到渡劫局了但因为之前有场比赛给了ztc一份代码然后他直接没咋改交上去了,估计下次roll Rating的时候这个号要掉200来分了 嘛不过也无所谓反正下次打另一个号冲分,而且像我这种永远 ......
Codeforces Round 892 Div

2023年多校联训NOIP层测试7+【LGR-149-Div.3】洛谷基础赛 #2 & qw Round -1

# [2023年多校联训NOIP层测试7,集训欢乐赛,绝对欢乐,童叟无欺](http://www.accoders.com/contest.php?cid=4470) 赛时在回家的路上+睡觉,所以没打。 ## $T1$ 近似[ybtOJ 2049:【例5.19】字符串判等](http://ybt.s ......
基础 Round 2023 NOIP 149

Codeforces Round 892 (Div. 2)(vp)

# [Codeforces Round 892 (Div. 2) ](https://codeforces.com/contest/1859) ## A United We Stand **题意:给一个数组,让你把它分成两个数组,第二个数组里的数不能是第一个数组里的数的除数,先输出两个数组的长度,依 ......
Codeforces Round 892 Div vp

【题解】Educational Codeforces Round 146(CF1814)

而且怎么感觉 E,F 比 D 要简单很多,大概是因为比较套路吧[惊恐] ## A.Coins ### 题目描述: **本题一共有 $t$ 组数据。** 每组数据包含两个整数 $n$ 和 $k$,如果存在两个非负整数 $x,y$,满足 $2\times x+k\times y=n$,输出 `YES`, ......
题解 Educational Codeforces Round 1814

Codeforces Round 892 (Div. 2)

手速慢了,掉分 ## C. Another Permutation Problem [Problem - C - Codeforces](https://codeforces.com/contest/1859/problem/C) ### 题意 给定一个正整数$n$,设序列$p$为$n$的排列,求$ ......
Codeforces Round 892 Div

Codeforces Round 892 div2.C

这C真的魔幻,官方题解完全和写的不一样,太玄学了,打表发现的规律 这是打表代码: int main() { cin >> n; vector<int> a(n + 1); for (int i = 1; i <= n; i++) a[i] = i; LL ans = 0; do { auto b = ......
Codeforces Round div2 892 div

Codeforces Round 892 (Div.2)

## A. United We Stand >![image-20230813113018886](https://zeoy-typora.oss-cn-hangzhou.aliyuncs.com/image-20230813113018886.png) ### 题解 >* 赛时想复杂了 >* 题目 ......
Codeforces Round 892 Div

Codeforces Round 764 (Div. 3)(vp)

# [Codeforces Round 764 (Div. 3) ](https://codeforces.com/contest/1624) ## A Plus One on the Subset **题意:判断最大和最小差多少即可** ```c++ void solve() { int n; c ......
Codeforces Round 764 Div vp

Codeforces Round 874 G题解

# 做不动那么多题了,来个G G就是问你一棵树能切成多少个大小为3的链,想了半天,想过dp啥的,但是后来发现这个贪心就好了,可以证明贪心找不到的,其他方法也找不到 好久没复健了,这是第一次,感觉以后要多做题才可以 ```cpp #include using namespace std; conste ......
题解 Codeforces Round 874

【LGR-149-Div.3】洛谷基础赛 #2 & qw Round -1

## T1 签到。 ## T2 送分题。 ## T3 大模拟,但是TLE两个点。 ```cpp #include #define ll long long #define int long long #define re register using namespace std; const int ......
基础 Round LGR 149 Div

Codeforces Round891(Div3)

说在前面的话: 心血来潮想要补一场Div3,这些题目确实很有意思。英文题面真的难懂,但是洛谷上的简洁题面无疑降低了难度。 然后通过这次补题经历,更加感到了**不开long long见祖宗**,所以,读者可以发现有几道题用了`signed`(源代码已经改成这样力,不想被long long再搞一次了)。 ......
Codeforces Round Div3 891 Div