codeforces round 860 div

Codeforces Round891(Div3)

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

Codeforces Round 799 (Div. 4)(vp)

# [Codeforces Round 799 (Div. 4)](https://codeforces.com/contest/1692) ## A Marathon ```c++ void solve() { vector a(4); int goal; cin >> goal; int ans ......
Codeforces Round 799 Div vp

Codeforces 1854E - Game Bundles

ll k;int ord[35],a[65];mt19937 rng(time(0)); int main(){ scanf("%lld",&k); if(kk){--n;break;} for(int i=60;i>=a[n];i--)dp[i]+=dp[i-a[n]]; }ll rk=k-dp[ ......
Codeforces Bundles 1854E 1854 Game

2023.8.11 Pure GJ Round

评价:无思维场,纯码力场,给我这种无码力选手区分了 -200pts Fact:因为有补题环节所以打得很激进写了 4 题正解然后开始调 T2,3,4 最后只有 T2,3 过了样例。快结束的时候还给自己都 hack 了。最后喜提暴力分。好处是补题改改就过了() ## B - Luogu P4334 省略 ......
Round 2023 Pure 11 GJ

CodeForces 1610F Mashtali: a Space Oddysey

[洛谷传送门](https://www.luogu.com.cn/problem/CF1610F "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1610/F "CF 传送门") 比较有启发性的题。 首先,设 $a_u$ 为与点 ......
CodeForces Mashtali Oddysey 1610F Space

【题解】Educational Codeforces Round 147(CF1821)

自己做出来了 A-E,F 算是搞懂 GF 后第一道符合我这个菜鸡水平的实战,可惜的是根本没意识到可以 GF。 ## A.Matching ### 题目描述: 整数模板是**每位均为数字或问号**的字符串。 如果可以用数字**替换**模板中的每个问号,从而获得该**正整数(严格大于 $0$)** 的十 ......
题解 Educational Codeforces Round 1821

Codeforces Round 874 (Div. 3) 题解

# A. Musical Puzzle 字符串 $s$ 的不同的长度为 $2$ 的子串个数就是答案 可以用 set 处理 # B. Restore the Weather 将 $a$ 数组排序后,在 $b$ 数组中找到第一个大于等于 $a_i-k$ 的元素与 $a_i$ 对应即可 可以用 multi ......
题解 Codeforces Round 874 Div

Codeforces Round 878 (Div. 3) 题解

# A. Cipher Shifer 从头开始扫一遍即可,扫到两个相同的表示某一个字符的解密结束 # B. Binary Cafe 首先,我们不妨把题意转换为 **有多少种不同的花钱方案** 因为每一种咖啡就是一个二进制有 $k$ 位的数字的其中一位,而对于不同的方案,其二进制位不完全相同,则每一个 ......
题解 Codeforces Round 878 Div

div左右两边50%拖拽功能

<template> <div id="app"> <div class="container"> <div class="left" :style="{ width: leftWidth + '%' }"> <h1>Left Content</h1> </div> <div class="drag ......
功能 div 50%

2023牛客周赛 Round 6

https://ac.nowcoder.com/acm/contest/62622/C # c题 ### 从x!作为切入点,阶乘增长的非常快,我们可以枚举x,从而达到固定x,只剩y一个变量,问题转变为一次函数绝对值求最小值的数学问题,显然可以o(1)。 $$13!=6227020800 =6.227 ......
Round 2023

20230723牛客round4D题:给出一个大数的所有约数,通过dfs用质因子反向构造约数

# 两个正整数a,b,请问a∗b有哪些因子 #1≤a,b≤1e9 # 求因子的数量并给出所有因子 ### 本题无脑的暴力显然不能过,但用set存数,加上考虑到a*b的所有约数其实就是a的所有约数和b的所有约数分别相乘(核心) # 补充常识:int范围内数的约数个数最多为1600,2e9数的约数个数最 ......
约数 大数 因子 20230723 round4D

HDU 多校 Round #6 题解

# HDU 多校 Round #6 题解 $\text{By DaiRuiChen007}$ ## A. Count [Problem Link](https://acm.hdu.edu.cn/showproblem.php?pid=7336) **题目大意** > 求有多少个长度为 $n$,字符集 ......
题解 Round HDU

【题解】Educational Codeforces Round 148(CF1832)

## A.New Palindrome ### 题目描述: 给你一个由小写字母组成的回文字符串,问你是否能在重排其之后构造出另一个与原串不同的回文字符串。 多测,$t \le 1000,2 \le |s| \le 50$ ### 题目分析: 考虑其实就是前 $\lfloor \frac{n}{2} ......
题解 Educational Codeforces Round 1832

SMU Summer 2023 Contest Round 11(2022-2023 ACM-ICPC Nordic Collegiate Programming Contest (NCPC 2022))

# [SMU Summer 2023 Contest Round 11](https://codeforces.com/group/L9GOcnr1dm/contest/466605)(2022-2023 ACM-ICPC Nordic Collegiate Programming Contest ......
Contest 2023 2022 Programming Collegiate

ROUND#14 love

# ROUND#14 love ## 0x01 程序开启NX和canary保护 ![image-20230810123951784](https://raw.githubusercontent.com/lmarch2/images/main/typora/202308101239901.png) v ......
ROUND love 14

Codeforces 1857E:Power of Points 区间?

# [1857E.Power of Points](https://codeforces.com/contest/1857/problem/E "Codeforces 1857E") ## Description: - $n$ 个数:$x_1,···,x_n$,从左向右扫,当 $s=x_i$ 时,可 ......
区间 Codeforces Points 1857E Power

『STAOI』G - Round 3

# [『STAOI』G - Round 3](https://www.luogu.com.cn/contest/102479) 因为在 $STAOI$ 团里,所以赛时没打。 # $T1$ [luoguP9508 『STA - R3』存在](https://www.luogu.com.cn/probl ......
STAOI Round

Codeforces Round 881 (Div. 3)

# A. Sasha and Array Coloring 为了让贡献最大,每种颜色只能染两个数 显然这两个数为最大值与最小值、次大值与次小值、第三大值与第三小值……以此类推即可 # B. Long Long 为了让和最大,我们需要的就是把所有负数变成正数 那么第一问的答案就是 $\sum_{i=1 ......
Codeforces Round 881 Div

Codeforces Round 891 (Div. 3) A-G

偷偷摆烂导致小号掉了16分,但是队友涨了16分,~~一定是米哈游的问题!~~ ## A. Array Coloring 题意:给出一个长为$n$的数组,问能否把所有元素分别染成两种颜色中的一种,并且使得同种颜色的元素和它们最后的奇偶性相同。 ### Solution 算出奇数个数看是不是奇数个即可 ......
Codeforces Round 891 A-G Div

CF1857B Maximum Rounding 题解

[题面](https://codeforces.com/problemset/problem/1857/B) ## 题目大意 给定 $T$ 组数据,每组数据一个自然数 $n$,可以多次选择第 $k$ 位数进行四舍五入,求出四舍五入后该数的最大值。 ## 分析思路 思想:**贪心**。 这里给定了两种 ......
题解 Rounding Maximum 1857B 1857

Codeforces Round 891 (Div. 3)

# A. Array Coloring ```cpp #include using namespace std; void solve() { int n; cin >> n; int sum = 0; for( int i = 1 , x ; i > x , sum += x; if( sum % ......
Codeforces Round 891 Div

Codeforces Round 891(Div. 3)

# Codeforces Round 891(Div. 3) ## A. Array Coloring > 给你一个由 $n$个整数组成的数组。你的任务是确定是否有可能用两种颜色给数组中的所有元素着色,使得两种颜色元素的和具有相同的奇偶性,并且每种颜色至少有一个元素被着色。 > > 例如,如果数组是 ......
Codeforces Round 891 Div

div 全屏后,内部的 modal 无法正常显示

vue 3.2.x + antdv 3.2.x 需求: 使用了某个复合组件,组件内按钮点击将使用弹窗展示某些信息 需求添加一个全屏按钮,点击后将复合组件全屏展示 问题: 刚拿到这个需求时想着,vueuse 几行代码搞定,也这么实现了 然而痛苦的事情出现了,全屏后 modal 不见了,退出全屏后发现其 ......
modal div

Codeforces Round 891 (Div. 3) 题解

# A. Array Coloring 因为: 偶数+偶数=偶数 奇数+奇数=偶数 奇数+偶数=奇数 所以设 $s1$ 为奇数之和,$s2$ 为偶数之和 $s2$ 必定是偶数 如果奇数的个数为偶数,则 $s1$ 为偶数;否则是奇数 而在 $s1$ 为奇数时,即使拿一个奇数加到 $s2$ 里,那么也是 ......
题解 Codeforces Round 891 Div

Codeforces Round 891 (Div. 3) 总结

## 一段时间没打比赛,整个节奏没找到,对于会的问题代码实现的不够顺畅,对于看起来不会的问题总是有种先入为主的算法恐惧,其实不是算法不会,而是思维和灵性不够 1. c题是构造题,不难想到最小值出现次数一定是最多的,最小值具有的性质是相对位置不影响出现次数,对出现次数排序让整个问题清晰,想到这点整个问 ......
Codeforces Round 891 Div

[补题] Codeforces Round 891 (Div. 3)

### 闲话 第一场CF div3,T2读错题了...T3构造乱搞没搞出来...在此深刻反思。 ### A #### Translate 我们可以任意将一个数组拆成两部分,分别求出这两部分的和,是否有一种拆分方式使得这两部分和的奇偶性相同? #### Analysis ~~根据小学数学我们得知~~ ......
Codeforces Round 891 Div

Codeforces Round 891 (Div. 3)

# [Codeforces Round 881 (Div. 3)](https://codeforces.com/contest/1857) ## [A.Array Coloring](https://www.luogu.com.cn/problem/CF1857A) ### 题目大意 [link] ......
Codeforces Round 891 Div

UESTC 2023 Summer Training #23 for div2/2022-2023 ACM-ICPC Latin American Regional Programming Contest

# Preface 今天这场签到巨多,和昨天那场形成了鲜明的对比 但可惜后盘的时候我划了太久的水,最后接了B题然后没调出来成为战俘 最气的是赛后发现原来是没注意输出格式,本来可以说一遍过的题结果没写过,属实可惜,就当长教训了 **以后一定要尤其注意输入输出格式** # A. Asking for M ......
2023 Programming ACM-ICPC American Regional

CodeForces CF1846G 题解

# CodeForces CF1846G 题解 - [CodeForces题目链接](https://codeforces.com/contest/1846/problem/G) - [洛谷题目链接](https://www.luogu.com.cn/problem/CF1846G) - 标准答案是 ......
题解 CodeForces 1846G 1846 CF

Codeforces Round 891 (Div. 3)

Codeforces Round 891 (Div. 3) A - Array Coloring 思路:需要两部分的奇偶相同,判断奇数的个数是否为偶数即可 #include<bits/stdc++.h> using namespace std; #define int long long //#de ......
Codeforces Round 891 Div