educational codeforces string round

Educational Codeforces Round 96 (Rated for Div. 2)E

You are given a string s. You have to reverse it — that is, the first letter should become equal to the last letter before the reversal, the second le ......
Educational Codeforces Round Rated Div

SMU Summer 2023 Contest Round 1

# [SMU Summer 2023 Contest Round 1](https://codeforces.com/group/L9GOcnr1dm/contest/450888) ## [A. The Contest](https://codeforces.com/group/L9GOcnr1d ......
Contest Summer Round 2023 SMU

Educational Codeforces Round 29

# Educational Codeforces Round 29 https://codeforces.com/contest/863 复健训练 太久没练直接变身傻逼(难道原来就不是吗,笑) ## A. Quasi-palindrome 直接去除后缀0即可(WA了两发评价为弱智) ```CC #i ......
Educational Codeforces Round 29

牛客周赛 Round 2 A~D

A #include <iostream> #include <cstring> #include <string> #include <algorithm> #include <cmath> #include <set> #include <utility> #include <vector> # ......
Round

CodeForces 1508C Complete the MST

[洛谷传送门](https://www.luogu.com.cn/problem/CF1508C "洛谷传送门") [AtCoder 传送门](https://codeforces.com/problemset/problem/1508/C "AtCoder 传送门") 比较需要观察的题。 设 $v ......
CodeForces Complete 1508C 1508 the

CodeForces 920E Connected Components?

[洛谷传送门](https://www.luogu.com.cn/problem/CF920E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/920/E "CF 传送门") 考虑直接暴力 dfs。设搜到点 $u$,把 $u$ ......
CodeForces Components Connected 920E 920

.NET Core应用程序每次启动后使用string.GetHashCode()方法获取到的哈希值(hash)不相同

前言 如标题所述,在ASP.NET Core应用程序中,使用string.GetHashCode()方法去获取字符串的哈希值,但每次重启这个ASP.NET Core应用程序之后,同样的字符串的哈希值(hash)但不相同了。这是什么意思呢? 具体的应用场景是这样的: 项目中有一张表的某个字段保存了类似 ......

Educational Codeforces Round 22

# A. The Contest 想一想就知道,提交的时间无所谓,所以我们选择全部做完后的第一个时间间隔提交即可 ```cpp #include using namespace std; #define int long long int read() { int x = 0, f = 1, ch ......
Educational Codeforces Round 22

String s=new String(“hello”)的执行过程

一. 介绍 String 是Java.long包下的String类,是一个特殊的引用类型,用于表示字符串。它提供了许多方法来操作和处理字符串,比如连接、截取、查找、替换等。String类内部使用字符数组( char[] ) 来存储字符串的内容,value字段被final修饰,String对象一旦创建 ......
String 过程 hello new

String 源码阅读

# String 源码阅读 ## 1. 属性 ```java /** The value is used for character storage. */ private final char value[]; /** Cache the hash code for the string */ p ......
源码 String

CodeForces 1847F The Boss's Identity

[洛谷传送门](https://www.luogu.com.cn/problem/CF1847F "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1847/F "CF 传送门") 我们首先观察 $a$ 的形态。令题面中给出的 $ ......
CodeForces Identity 1847F 1847 Boss

Codeforces Round 882 题解

## [Codeforces Round 882 (Div. 2)](https://codeforces.com/contest/1847 "Codeforces Round 882 (Div. 2)") ## [A. The Man who became a God](https://codef ......
题解 Codeforces Round 882

Codeforces Round #883 (Div. 3) A-G

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

Codeforces Round 771 (Div.2) C

刚开始c题用dp做的,一直没做出来 ## B. Odd Swap Sort [Problem - B - Codeforces](https://codeforces.com/contest/1638/problem/B) ### 题意 给定一个序列$a$,如果$a_i$与$a_{i+1}$的和为奇 ......
Codeforces Round 771 Div

CF559B - Equivalent Strings

首先我们考虑第一种做法,我们搜索 $dp_{x,y,l,r}$ 判断 $s[x,y]$ 和 $t[l,r]$ 是否等价,同时记忆化搜索。 但是这样是很明显不行的。如果长度是 $2$ 的整次幂,我们仅分析最底层长度为 $1$ 的区间,就会有 $n^2$ 个函数被调用。 我们考虑加上一个小优化,我们每次 ......
Equivalent Strings 559B 559 CF

CodeForces 997C Sky Full of Stars

[洛谷传送门](https://www.luogu.com.cn/problem/CF997C "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/997/C "CF 传送门") 考虑容斥,钦定 $i$ 行 $j$ 列放同一种颜色, ......
CodeForces Stars 997C Full 997

Codeforces Global Round 14

这场貌似很典很好啊。 ### A. Phoenix and Gold > 给定一个长度为 $ n $ 的数组 $ w $ 和一个数 $ x $,数组中的数**各不相同**,要求**重新排列**这个数组,使得对于每一个 $ i $ $ (1 \le i \le n) $,都有 $ \sum\limit ......
Codeforces Global Round 14

String、StringBuffer、StringBuilder 的区别?

一. 介绍 String、StringBuffer、StringBuilder: 前言: String、StringBuffer、StringBuilder 均在java.lang包下; String: 在Java中,String是一个特殊的引用类型,用于表示文本字符串。它提供了许多方法来操作和处理 ......
StringBuilder StringBuffer String

String内存模型和Java常用方法

大家好,我是筱筱,这里主要分享的是个人日常学习String内存模型和Java常用方法的随笔,如果您对本篇有不同的方法和建议,欢迎您在评论区留言指正,您们的留言和点赞是我继续学习和分享的动力,非常感谢您的观看! ......
模型 内存 常用 方法 String

round 函数

# round 函数 要求**四舍五入**的情况,用round函数就很方便。 ## 一、用法 ### 1.基本用法 对于小数而言,round()函数**仅仅保留到整数位**,仅对小数点后一位进行四舍五入。 比如:round(1.5) = 2.000000,round(1.57) = 2.000000 ......
函数 round

内置函数round

1 ''' 2 内置函数round对参数进行四舍五入/ 3 语法: round(number, ndigits) 4 其中,number是要进行四舍五入的数字,而ndigits是可选参数,表示保留小数的位数,默认为0。 5 number:要进行四舍五入的数字。 6 ndigits:保留小数的位数。如 ......
函数 round

Codeforces Round 862 (div.2) C

vp时c题用自已的方法过了,赛后补下正解 ## C.Place for a Selfie [Problem - C - Codeforces](https://codeforces.com/contest/1805/problem/C) ### 题意 给定一些抛物线和过原点的直线,对于每个抛物线,是 ......
Codeforces Round 862 div

Codeforces Round 882 (Div. 2) A-D题解

[比赛地址](https://codeforces.com/contest/1847) ## A. The Man who became a God 题意:定义f(l,r)为区间[l,r]所有相邻数的差的绝对值的和,大小为1的区间的f为0,给出一个数组a,问把他分成m个区间,这m个区间的f值的和最小 ......
题解 Codeforces Round 882 A-D

Codeforces 1593G Changing Brackets

考虑到括号变方向并不需要花费,所以并不用考虑左右括号,考虑小中括号就行了。 因为一个合法括号序列长度为偶数,则说明对于一对括号其左右括号位置奇偶肯定相反。 所以一个类型的括号在奇数位和在偶数位的数量之差就为需要改变类型的括号的数量。 这部分用前缀和维护即可。 时间复杂度 $O(\sum n + \s ......
Codeforces Changing Brackets 1593G 1593

Codeforces 1257F Make Them Similar

发现 $O(2^w)$ 过不了但是 $O(2^{\frac{w}{2}})$ 过得了($w$ 为数二进制形式位数,此题为 $30$),且异或操作表明每一位之间不会互相影响,很明显上个折半搜索就行。 考虑怎么合并,和 CF585D 同样的套路,考虑前半部分得到的为 $c_{1\sim n}$,后半部分 ......
Codeforces Similar 1257F 1257 Make

Codeforces 1305G Kuroni and Antihype

考虑若 $a_u\operatorname{bitand} a_v = 0$,则连 $(u, v, a_u), (v, u, a_v)$ 两条单向边,答案即为外向森林边权和最大值。 发现这是个森林,那考虑增加一个虚点 $a_{n + 1} = 0$,这样就变成了一个树,然后能发现 $1\sim n$ ......
Codeforces Antihype Kuroni 1305G 1305

Codeforces 1092D1 Great Vova Wall (Version 1)

发现不管 $a_i$ 多大都可以一直 $a_i\leftarrow a_i + 2$ 使所有 $a_i$ 的取值变为两个相邻的数,那就只需要考虑奇偶的限制了。 发现若 $2$ 个奇偶相同的 $a_i, a_{i + 1}$,那这 $2$ 个数的奇偶性就可以变化。 所以可以维护一个栈,若栈顶 $2$ ......
Codeforces Version 1092D1 1092D Great

Object.equals 和 String.equals的区别

一. 源码展示: 1. Object.equals: ①引用类型地址值比较,直接返回结果:true || false public class Object { public boolean equals(Object obj) { return (this == obj); } } 2. Stri ......
equals Object String

Codeforces Round 883 (Div. 3)

Codeforces Round 883 (Div. 3) A. Rudolph and Cut the Rope: 题意: 有一个糖果由n个绳子悬挂,告诉每一个绳子位于的高度和宽度,问至少间断几根才可以让candy回到groud。 思路: 统计有几个宽度小于高度的绳子即可 void solve() ......
Codeforces Round 883 Div

Codeforces Round 875 (Div. 2)(D)

# Codeforces Round 875 (Div. 2)(D) ## D (思维) 这个题意是给你两个数组,$a$和$b$,我们需要找到这样的二元组$(i,j)$满足$a_i\times a_j=b_i+b_j$,问一共有多少组满足以上条件的二元组 题目还告诉我们数组里面的数字都是不大于$n$ ......
Codeforces Round 875 Div