atcoder another contest string

2022 Hubei Provincial Collegiate Programming Contest G. Brick(gym103729)

大意 给出底层高度,用1*2的砖块将总形状铺成等高矩形,使得高度最小(不能放在外面) 题解 奇妙做法 当高度同奇偶时显然x可以的话x+2也可以,直接加一层竖的,所以首先分奇偶二分高度 有解的必要条件1是,把矩形黑白方格染色之后未填的黑=白(一个1*2刚好覆盖1黑1白) 然后从左往右放砖块,可以感受一 ......

2019 ICPC Universidad Nacional de Colombia Programming Contest

A. Amazon 给定\(n\)条直线(存在共线的情况),在每两条垂直的直线的交点处需要建一个交叉点,求交叉点的数量,注意需要去除共线时候的交叉点 题解 因为要除去共线的情况,我们考虑将一条直线以方向向量\(v\),与\(x\)轴的交点的横坐标\(x\)的方式存储 注意: 对于\(v\)来说需要最 ......

String

title: String index_img: img/5.svg tags: - Java SE - 字符串 categories: - Java SE hide: false excerpt: String、对象创建、字符串方法 String String字符串的内容不会发生改变,它的对象在创 ......
String

[AGC058D] Yet Another ABC String

# [AGC058D] Yet Another ABC String [Atcoder:[AGC058D] Yet Another ABC String](https://atcoder.jp/contests/agc058/tasks/agc058_d) [洛谷:[AGC058D] Yet Ano ......
Another String 058D AGC 058

【题解】AtCoder Regular Contest 161

评价:感觉这场题目质量不咋地啊,都是一些乱搞题 ## A.Make M ### 题目描述: $N$ 是一个正奇数。我们称一个长度为 $N$ 的序列 $S$ 是 **M 型**序列,当前仅当对于所有的 $i=2,4,6,\dots,N-1$(即偶数位),都有 $S_{i-1}S_{i+1}$。 现在给 ......
题解 AtCoder Regular Contest 161

【题解】AtCoder Regular Contest 162

## A.Ekiden Race ### 题目描述: 有 $n$ 个人参加了往返赛跑,每个人有一个编号 $1$ 到 $n$。已知以下信息: - 如果按照往路的成绩排序,那么任何两个人的成绩都不相同。同时第 $i$ 个人在往路中排名第 $i$。 - 如果按照往返的成绩排序,那么任何两个人的成绩都不相同 ......
题解 AtCoder Regular Contest 162

Go语言反单引号创建原始字符串raw_string

在 Go 语言中,反引号(`)用于创建原始字符串字面量(raw string literals)。原始字符串字面量是不包含转义序列的字符串,其中的内容会保持原样,包括换行符和特殊字符。 反引号的主要用途之一是编写多行的文本或正则表达式,而不需要使用转义字符。这在处理包含大量特殊字符或格式化要求的文本 ......
引号 字符串 raw_string 字符 语言

AtCoder Grand Contest 041 F Histogram Rooks

[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc041_f "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc041/tasks/agc041_f "AtCoder 传送门") 神题!!!!!!! ......
Histogram AtCoder Contest Grand Rooks

AtCoder Beginner Contest 318 - D(状压 dp)

[toc] # [D - General Weighted Max Matching](https://atcoder.jp/contests/abc318/tasks/abc318_d) **题意** 给定无向图,边有边权。让你选择一组边,满足任意两边不相交且总边权和最大。 顶点数 $\le 16 ......
Beginner AtCoder Contest 318 dp

2022 International Collegiate Programming Contest, Jinan Site AEKM

# [2022 International Collegiate Programming Contest, Jinan Site - Codeforces](https://codeforces.com/gym/104076) AEKM ## A. Tower 思路:思维+贪心 由于我们只能进行$+ ......

The 16-th BIT Campus Programming Contest - Onsite Round

链接:[https://codeforces.com/gym/104025](https://codeforces.com/gym/104025) ## A. Gifts in box ```cpp #include "bits/stdc++.h" using namespace std; usin ......
Programming Contest Campus Onsite Round

[题解] AtCoder Beginner Contest 308 A~G

# AtCoder Beginner Contest 308 A~G ## A. New Scheme ```cpp void Main() { vector a(8); for (auto &x : a) cin >> x; if (!is_sorted(a.begin(), a.end()) & ......
题解 Beginner AtCoder Contest 308

手撕代码,实现String类的构造函数、拷贝构造函数、赋值构造函数以及析构函数

#include <bits/stdc++.h> using namespace std; class String { public: String(const char* str = NULL){// 普通构造函数 cout << "普通构造函数被调用" << endl; if (str == ......
函数 拷贝 代码 String

AtCoder Beginner Contest 216

Tasks - AtCoder Beginner Contest 216 [ABC216D] Pair of Ball 可以发现对于栈中每个元素是被他上面的元素所约束,用拓扑排序表示这种约束 [ABC216F] Max Sum Counting dp合集 [ABC216G] 01Sequence 差 ......
Beginner AtCoder Contest 216

AtCoder Grand Contest 064

# Preface AGC好难啊,从C题开始就一点不会了,感觉以前OI时候的AGC没那么变态的啊,也许是我变菜好多了吧 # **A - i i's** 考虑先放一个这样的序列: $$ n,n-1,n,n-1,n\cdots,n-1,n,n-2 $$ 这样就把$n,n-1$都用完了,同时还用了个$n- ......
AtCoder Contest Grand 064

(Java)String截取指定字符前面(后面)所有字符和String的常用方法

1 获取String的相关信息功能 1)length():获取该字符串长度 String str = "group-banner-top-"; int length = str.length(); System.out.println(length); 运行结果:17 2)charAt(int in ......
字符 String 常用 方法 Java

报错:java.lang.String cannot be cast to java.time.LocalDateTime(2022-06-28T01:53:41.000+00:00 转换成 yyyy-MM-dd HH:mm:ss格式)

时间字符串如下:2023-09-12T16:00:00.000+00:00 错误代码: LocalDateTime orderTime1 = (LocalDateTime) o1.get("create_time"); 解决办法: (1)、先转换成yyyy-MM-dd HH:mm:ss格式 Stri ......
java LocalDateTime yyyy-MM-dd 格式 String

D. Balanced String

D. Balanced String You are given a binary string $s$ (a binary string is a string consisting of characters 0 and/or 1). Let's call a binary string bal ......
Balanced String

Educational Codeforces Round 149 (Rated for Div. 2) B. Comparison String

给一个长度为 $n$ 的字符串 $s$ ,只包含字符“”。 一个长度为 $n + 1$ 的数组 $a$ 与 $s$ 是兼容的当且仅当对于任意 $i$ : 1. $s_i$ is $$ ,当且仅当 $a_i > a_{i - 1}$ 定义一个数组的 $cost$ 为这个数组中不同数的个数。 求一个 $ ......

The 2022 ICPC Asia Hangzhou Regional Programming Contest

The 2022 ICPC Asia Hangzhou Regional Programming Contest No Bug No Game #include<bits/stdc++.h> using namespace std; #define endl "\n" #define int lon ......
Programming Hangzhou Regional Contest 2022

The 2022 ICPC Asia Nanjing Regional Contest

链接:[https://codeforces.com/gym/104128](https://codeforces.com/gym/104128) ## A. Stop, Yesterday Please No More ```cpp #include "bits/stdc++.h" using n ......
Regional Contest Nanjing 2022 ICPC

The 18th Heilongjiang Provincial Collegiate Programming Contest

链接:[https://codeforces.com/gym/104363](https://codeforces.com/gym/104363) ## A. Magic Computer ```cpp #include "bits/stdc++.h" using namespace std; us ......

The 10th Shandong Provincial Collegiate Programming Contest

链接:[https://codeforces.com/gym/104459](https://codeforces.com/gym/104459) ## A ```cpp #include "bits/stdc++.h" using namespace std; using i64 = long l ......

The 17th Chinese Northeast Collegiate Programming Contest

链接:[https://codeforces.com/gym/104366](https://codeforces.com/gym/104366) ## A. Cask Effect ```cpp #include "bits/stdc++.h" using namespace std; using ......

【校招VIP】java语言考点之关键字string

考点介绍: string作为一个特殊类,正常情况下,是遵循对象的值和引用的使用。有一定的考察频度,但有的时候==也能代表相等,与常量区的插入有关。 答案详情解析和文章内容可扫下方海报二维码或点击链接即可查看! 一、考点试题 1、关于String,StringBuilder以及StringBuffer ......
考点 关键字 关键 语言 string

[Leetcode Weekly Contest]361

title: '[Leetcode Weekly Contest]361' date: 2023-08-21 15:18:48 tags: [OJ] mathjax: true 链接:[LeetCode](https://leetcode-cn.com/contest/weekly-contest- ......
Leetcode Contest Weekly 361

java字符串String类的常用方法

java字符串String类的常用方法字符串的创建: (1)定义字符串直接赋值,在字符串池中开辟空间() String str1=“Hello”;//在字符串池中写入字符串"hello"String str2=“Hello”;//直接引用字符串池中的"Hello"System.out.println ......
字符串 字符 常用 方法 String

2023-2024 ICPC German Collegiate Programming Contest (GCPC 2023)

# Preface 好久没队里一起训练了就周末约了队友去机房VP了一场,同时终于学会了撬机房门这一核心技术 这场总体打的还行,但主要是B全队集体想复杂导致最后没调出来,J徐神写的维护啥的都没问题就是算答案的时候没想清楚,本来可以出11题的 # A. Adolescent Architecture 2 ......
2023 Programming Collegiate Contest German

前瞻|Java 21 新特性 String Templates(字符串模版)

在日常写Java的时候,对于字符串的操作是非常普遍的,其中最常见的就是对字符串的组织。也因为这个操作非常普遍,所以诞生了很多方案,总下来大概有这么几种: - 使用`+`拼接 - 使用`StringBuffer`和`SpringBuilder` - `String::format` and `Stri ......
字符串 前瞻 模版 Templates 字符

报错Array to string conversion

### 报错Array to string conversion 原因:数组格式无法存储进数据库 technologies是字段名 ``` use Illuminate\Database\Eloquent\Model; class App extends Model { protected $cas ......
conversion string Array to