educational codeforces string round

String

一、概述 二、创建方式 三、内存模型 栈和方法有关 堆和new(对象)有关 方法区存放的是class形式的文件 ps:JDK7以后有了一个StringTable(串池)专门在存储字符串; 例: 直接用双引号赋值优点: 效率高,节省内存(因为如果该字符串在串池中已经存在,就不会再创建新的字符串,而是进 ......
String

MSSQL STRING_SPLIT(把字符串拆分成集合)

语法: STRING_SPLIT(string , separator) 参数说明: string: 任何字符类型(例如 nvarchar、varchar、nchar 或 char)的表达式 separator: 任何字符类型(例如 nvarchar(1)、varchar(1)、nchar(1) 或 ......
字符串 STRING_SPLIT 字符 STRING MSSQL

「CF1831E」Hyperregular Bracket Strings 题解

本文网址:https://www.cnblogs.com/zsc985246/p/17565768.html ,转载请注明出处。 ## 前言 没见过的套路,写篇题解记录一下。 ## 题目大意 给定 $n$ 和 $k$ 个区间 $[l_i,r_i]$,你需要找出满足以下条件的**合法**括号序列个数: ......
题解 Hyperregular Bracket Strings 1831E

Codeforces 1172F - Nauuo and Bug

是 Ynoi 捏。 建一棵线段树,线段树上每个节点维护一个长度为 $len$ 的 DP 数组 $f_i$ 表示 $v$ 最少需要多少才能使得从左往右将 $v$ 与区间中的数进行图中的相加操作后会减掉至少 $i$ 次 $p$。 如果我们能预处理出 $f_i$,那么查询是容易的,直接找到对应的区间然后 ......
Codeforces 1172F Nauuo 1172 Bug

Codeforces Round 885

[TOC] ### 写在前面 比赛地址:[https://codeforces.com/contest/1848](https://codeforces.com/contest/1848)。 我现在手里有三套题要补呃呃 这套是两天前补的了,所以简单写写。 太好玩辣,多校! ### A 考虑一个 2x ......
Codeforces Round 885

.NET Core中关于阿拉伯语环境下的坑:Input string was not in a correct format.

### 结论 .NET Core项目(.NET Framework没出现)在阿拉伯语(即语言名称是`ar-`开头的语言)环境下,将负数字符串转成数字,即`int.Parse("-1")`或`Convert.ToInt32("-1")`时,会抛出异常“Input string was not in a ......
correct 环境 string format Input

Codeforces Round #885 (Div. 2) A-D

[比赛链接]() # A ## 代码 ```c++ #include using namespace std; using ll = long long; bool solve() { int n, m, k; cin >> n >> m >> k; int x, y; cin >> x >> y; ......
Codeforces Round 885 A-D Div

Codeforces Round 885 (Div. 2)

# A. Vika and Her Friends 枚举所有的点,判断是否存在点与Vika的距离和其他 k 个人的距离的奇偶性不同。 ```cpp #include using namespace std; #define int long long const int mod = 99824435 ......
Codeforces Round 885 Div

Codeforces Round 885 (Div. 2)

Codeforces Round 885 (Div. 2) A - Vika and Her Friends 思路:移动后再判断,所以距离为奇数时朋友永远抓不到她 #include<bits/stdc++.h> using namespace std; #define int long long t ......
Codeforces Round 885 Div

flutter String 字符串常用的方法

连接字符串: String test='hello'; String c_test='world'; c_test='${test} ${c_test}!'// hello world! //检查c_test 是否以 !结尾 bool b=c_test.endsWith('!')// b=true ......
字符串 字符 常用 flutter 方法

Educational Codeforces Round 65

# A. Telephone Number 找到第一个 8 ```cpp #include using namespace std; #define int long long const int mod = 998244353; #define mp make_pair void solve() ......
Educational Codeforces Round 65

【2023.07.17】牛客&第四范式多校Day1(华中科技大学Round)过题小记

## D - Chocolate(博弈论) 12分钟过题。签到。 ## K - Subdivision(图论、搜索) 1小时21分过题,签到。如果给定的是一棵树的话,新增的点一定位于连接叶子节点的那条边上、否则就是已有的点。然而这是一张图,所以我们可以使用 $\tt bfs$ 将其近似的转化为一棵树 ......
范式 小记 大学 Round 科技

【2023.07.16】清华&字节夏令营资格赛(Tsinghua University Bootcamp. Qualification Round)过题小记

### B - Performance(贪心、排序) 23分过题。打卡题,差分+排序。 ### A - Code Lock(图论、搜索) 37分由队友单人过题。打卡题,将序列转化为图上问题,随后维护每一个环上相同元素的距离。 ### D - Company Network(树论、倍增、数据结构) 2 ......

题解 P9437『XYGOI round1』一棵树

换根 DP。 本蒟蒻最初没想到换根,把自己写自闭了... 定义 $f_u$ 为子树 $u$ 中的每个结点走到 $u$ 的贡献和,$l_u$ 为大于 $a_u$ 的最小的 $10$ 的幂次方数,$sum_u$ 为 $\sum\limits_{v\in son(u)}{f_v}$。 转移方程为:$f_u ......
题解 round1 P9437 XYGOI round

【周考】Round1 2024.7.6

# Summary **Score:** $100+90+0+50+4=244$ # T1 [减法操作](http://222.180.160.110:1024/contest/3887/problem/1) 考虑对 $n$ 分奇偶讨论: - 偶数:显然 最小质因子 为 $2$,而每次减 $2$ 后 ......
Round1 Round 2024

SMU Summer 2023 Contest Round 4

SMU Summer 2023 Contest Round 4 A - Telephone Number 思路:满足有8,且8后有大于等于11个数 #include<bits/stdc++.h> using namespace std; #define int long long typedef p ......
Contest Summer Round 2023 SMU

CodeForces 1848E Vika and Stone Skipping

[洛谷传送门](https://www.luogu.com.cn/problem/CF1848E "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1848/E "CF 传送门") 感觉比这场的 F 简单。 发现我们要进行 $x$ ......
CodeForces Skipping 1848E Stone 1848

SMU Summer 2023 Contest Round 4

# [SMU Summer 2023 Contest Round 4](https://codeforces.com/group/L9GOcnr1dm/contest/456018) ## [A. Telephone Number](https://codeforces.com/group/L9GO ......
Contest Summer Round 2023 SMU

string函数

这篇文章介绍一些String类常用函数。 1、转换小写 string s = "ChinaPeople";string s1 = s.ToLower(); //字符串是不可变的,所以转换后的值通过字符串返回Console.WriteLine(s1);//输出:chinapeole2、转化为大写 st ......
函数 string

Codeforces Round 885 (Div. 2) A-D

## A. Vika and Her Friends 题意:有一个n*m大小的矩阵,vika在点(a,b),她的k个朋友在分别(xi,yi),所有人每分钟都可以上下左右走一格,每一分钟vika先走,她的朋友后走,不能不走,问vika能否躲过朋友。 ### Solution 结论题,只要有一个朋友和她 ......
Codeforces Round 885 A-D Div

Codeforces Round #885(Div. 2)C

##C. 维卡和价格标签 每个测试的时间限制为1秒 每个测试的内存限制为256兆字节 输入:标准输入 输出:标准输出 维卡来到她最喜欢的化妆品店"Golden Pear"。她注意到n个物品的价格自她上次光顾以来发生了变化。 她决定分析价格的变化,并计算每个物品的旧价格和新价格之间的差异。 维卡喜欢计 ......
Codeforces Round 885 Div

Codeforces Round 885 (Div. 2) B

## B. 维卡和木桥 每个测试的时间限制为1秒 每个测试的内存限制为256兆字节 输入:标准输入 输出:标准输出 夏天,维卡喜欢去她的乡间别墅。那里有一切供放松的设施:舒适的秋千、自行车和一条河流。 河上有一座木桥,由n块木板组成。它相当老旧而不吸引人,所以维卡决定给它上漆。在小屋里,他们找到了k ......
Codeforces Round 885 Div

Codeforces Round #885 (Div.2) Editorial

B - Vika and the Bridge 题意:从桥的一边走到另一边,每次只能踩在相同颜色的木板上,并且有一次操作,可以修改期中一个模板的颜色。 问那种走法,跨过模板的最大值最小。 思路:首先可以统计出选择每种颜色的,跳过木板的的个数,如果不能修改颜色,那么答案一定是每个颜色所对应的最大值的最 ......
Codeforces Editorial Round 885 Div

codeforses Round 885(div 2) A

## 翻译: A. 维卡和她的朋友们 每个测试的时间限制为1秒 每个测试的内存限制为256兆字节 输入:标准输入 输出:标准输出 维卡和她的朋友们去了一家购物中心,可以将其表示为一个边长为n和m的矩形网格。每个房间都有坐标(a,b),其中1≤a≤n,1≤b≤m。因此,我们称坐标为(c,d)的大厅为它 ......
codeforses Round 885 div

Codeforces Round 883 (Div. 3)

只写部分题目。 ## A. Rudolph and Cut the Rope ```cpp #include using namespace std; #define int long long const int N = 2e5 + 5; int t, n, a[N], b[N]; signed ......
Codeforces Round 883 Div

CodeForces 1844G Tree Weights

[洛谷传送门](https://www.luogu.com.cn/problem/CF1844G "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1844/G "CF 传送门") 出题人脑洞真大…… 设 $x_i$ 为 $i$ ......
CodeForces Weights 1844G 1844 Tree

CodeForces 1844C Particles

[洛谷传送门](https://www.luogu.com.cn/problem/CF1844C "洛谷传送门") [CF 传送门](https://codeforces.com/problemset/problem/1844/C "CF 传送门") 原题是 [[ARC092E] Both Side ......
CodeForces Particles 1844C 1844

Educational Codeforces Round 33 (Rated for Div. 2)

# Educational Codeforces Round 33 (Rated for Div. 2) https://codeforces.com/contest/893 昨日vp,今日补完F D贪心,思路值得学习; E组合数学推式子,式子不难,关键在于模型抽象 F主席树,调了老半天,关键在于要 ......
Educational Codeforces Round Rated Div

Codeforces Round 896 Div2 A-D题解

# Codeforces Round 896 ## A. Politics 这题问的是,给一些人的在n个议题的观点,然后你可以随意安排顺序,每个议题人多的赢,反对派会离开,问随便安排议题,最多留下多少人,包括我自己 这个题刚开始愣了半天,但是想到,那只要把所有和我观点一致的给留下来不就行了???然后 ......
题解 Codeforces Round Div2 896

LOJ #6160. 「美团 CodeM 初赛 Round A」二分图染色 思考--zhengjun

[link](https://loj.ac/p/6160) 思维+容斥计数。 首先的转化比较妙,二分图转化为 $n\times n$ 的网格图染色。 > 与网络流的转化方向相反,值得注意。 然后发现两种颜色(红、蓝)如果独立染色,同一个格子可能会重复染色。 考虑容斥,式子很好列,直接容斥即可。 $$ ......
初赛 zhengjun CodeM Round 6160