discovery presents channel contest
golang channel Synchronization
在 Go 语言中,通道(channel)是一个很重要的并发同步机制,可以用来在不同的 goroutine 之间发送和接收数据。 通道实现了一个先进先出(FIFO)的数据结构,所以可以确保数据的接收顺序与发送顺序一致。此外,通道的发送和接收操作都是原子的,这意味着你不需要额外的锁来同步数据访问。 这里 ......
AtCoder Regular Contest 164 E Segment-Tree Optimization
[洛谷传送门](https://www.luogu.com.cn/problem/AT_arc164_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/arc164/tasks/arc164_e "AtCoder 传送门") 妙妙题。 我们考虑 ......
AtCoder Beginner Contest 309 G Ban Permutation
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc309_g "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc309/tasks/abc309_g "AtCoder 传送门") 前置知识:[[AR ......
SMU Summer 2023 Contest Round 2
# [SMU Summer 2023 Contest Round 2](https://codeforces.com/group/L9GOcnr1dm/contest/450889) ## [A. Treasure Hunt](https://codeforces.com/group/L9GOcnr ......
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 ......
[Leetcode Weekly Contest]351
链接:[LeetCode](https://leetcode-cn.com/contest/weekly-contest-351/) ## [Leetcode]6451. 找出最大的可达成数字 给你两个整数 num 和 t 。 如果整数 x 可以在执行下述操作不超过 t 次的情况下变为与 num 相 ......
AtCoder Beginner Contest 308
vp做四道 ## E. MEX [E - MEX (atcoder.jp)](https://atcoder.jp/contests/abc308/tasks/abc308_e) ### 题意 给定一个字符串,其中每个字符都有一个权值,找到所有满足$s_is_js_k=$`MEX`的三元组$(i,j ......
AtCoder Beginner Contest 308 Ex Make Q
[洛谷传送门](https://www.luogu.com.cn/problem/AT_abc308_h "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/abc308/tasks/abc308_h "AtCoder 传送门") 这是官方题解的 $ ......
AtCoder Beginner Contest 309 ABCDE
# [AtCoder Beginner Contest 309](https://atcoder.jp/contests/abc309) ## **A - Nine** ### Problem Statement 题意:给你两个数问你是否在图上是相邻的。 ### Solution 思路:按照图写下关 ......
AtCoder Regular Contest 164 (A-C)
#A. Ternary Decomposition *思维难度其实可以作为第二题* >##思路 先考虑最优情况下需要多少个数来组成(不够就 No) 在考虑全部为1的情况下是否可行( N ###完整代码 ```cpp #include using namespace std; #define ll l ......
AtCoder Regular Contest 162
# Preface 补题,这样一来军训这段时间口胡的题目就都写完了,后面空余的时间就优先做学校要求的专题了(主要是几何,因为字符串已经基本做完了) 唉现在的计数水平说实话练了这么多还是没有太大长进,有些巧妙的地方就是想不过去,所以打Atcoder就会很难受 不过相信多练总比不练好,可能到时候需要专门 ......
AtCoder Beginner Contest 307
A: 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #include<iostream> 5 #include<string> 6 #include<vector> 7 #include<stack> 8 #includ ......
AtCoder Beginner Contest 309
A: 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #include<iostream> 5 #include<string> 6 #include<vector> 7 #include<stack> 8 #includ ......
AtCoder Beginner Contest 273 ABCD
# [AtCoder Beginner Contest 273](https://atcoder.jp/contests/abc273) ## **A - A Recursive Function** ### Problem Statement 题意:给你一个函数$f(x)$ - $f(0)=1$ ......
AtCoder Beginner Contest 309
> 感觉F写了个乱搞做法 ## [A - Nine (abc309 A)](https://atcoder.jp/contests/abc309/tasks/abc309_a) ### 题目大意 给定一个$3 \times 3$的网格,以及两个数字。 ![tu](https://img.atcode ......
AtCoder Beginner Contest 178(E,F)
# AtCoder Beginner Contest 178(E,F) ## E(计算几何) 给出$n$个点坐标,我们需要知道两个不同的点之间的曼哈顿的最大的那一个,求$max(abs(x_i-x_j)+abs(y_i-y_j))$ 题意很好懂,就是如果按照最简单的想法,可以一个一个找,我们枚举不同 ......
AtCoder Grand Contest 058 D Yet Another ABC String
[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc058_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc058/tasks/agc058_d "AtCoder 传送门") Orz H6_6Q ......
AtCoder Beginner Contest 308 题解
https://atcoder.jp/contests/abc308/tasks_print # A - New Scheme 过水已隐藏。 代码: ```cpp #include #include #include #include using namespace std; using names ......
AtCoder Beginner Contest 264 ABCDE
# [AtCoder Beginner Contest 264](https://atcoder.jp/contests/abc264) ## **A - "atcoder".substr()** ### Problem Statement 题意:截取字符串 `atcoder`的[L,R]一段并输出 ......
Golang中的Channel(一)
Golang在并发编程上有两大利器,分别是channel和goroutine。Golang中有一句名言:“使用通信来共享内存,而不是通过共享内存来通信”。这句话有两层意思,Go语言确实在sync包中提供了传统的锁机制,但更推荐使用channel来解决并发问题。这里先对Channel做一个基本的介绍, ......
Golang中的Channel(二)
上篇介绍了Channel是什么以及它的类型,这篇总结一下Channel的用法。 基本语法 (1) 声明channel 声明channel的语法格式为: var ChannelName chan ElementType 与其他变量声明不同的是,在类型前面多了一个chan关键字。ElementType指 ......
AtCoder Regular Contest 163
### [A](https://atcoder.jp/contests/arc163/tasks/arc163_a) 只需暴力判断能否分成两部分即可。 时间复杂度 $\mathcal{O}(n^2)$。 ### [B](https://atcoder.jp/contests/arc163/tasks ......
KEYENCE Programming Contest 2021 E Greedy Ant
[洛谷传送门](https://www.luogu.com.cn/problem/AT_keyence2021_e "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/keyence2021/tasks/keyence2021_e "AtCoder ......
AtCoder Beginner Contest 304
A: 1 #include<cstdio> 2 #include<cstring> 3 #include<algorithm> 4 #include<iostream> 5 #include<string> 6 #include<vector> 7 #include<stack> 8 #includ ......
AtCoder Grand Contest 033 D Complexity
[洛谷传送门](https://www.luogu.com.cn/problem/AT_agc033_d "洛谷传送门") [AtCoder 传送门](https://atcoder.jp/contests/agc033/tasks/agc033_d "AtCoder 传送门") 这题感觉实在太 e ......
关于spring-cloud-starter-alibaba-nacos-discovery找不到,没有版本(pom爆红,找不到)
## # 一,我这边发现每次项目都有经常发生这样的问题 #### **问题**:这种问题说实话很弱智,但还是有类似于这种事情发生啊 ![](https://img2023.cnblogs.com/blog/3087477/202307/3087477-20230705105056603-145217 ......
AtCoder Beginner Contest 308 - E
题目链接:[abc 308](https://atcoder.jp/contests/abc308) 前四题简单就不放了 #### [E - MEX](https://atcoder.jp/contests/abc308/tasks/abc308_e) 阿巴阿巴,比赛的时候想复杂了,一直在想怎么快速 ......
Atcoder Beginer Contest 306 D ~ E
vp中途突然拉肚子>_ using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int n; cin >> n; array dp; for(int ......
AtCoder Regular Contest 163
# Preface 补题,这场比赛的时候被拉去开科研组会了,所以就没现场打了 这两天军训在伤病连划水,白天可以好好想题目舒服的一批 这场D题确实很妙,需要一些竞赛图相关的知识才能想到转化,不过也算是学到一个重要trick了吧 # **A - Divide String** 显然只要考虑能否分成两个串 ......
2022-2023 ICPC Brazil Subregional Programming Contest(B,D,F,I,L,N)
# 正题 题目链接:[https://codeforces.com/gym/103960](https://codeforces.com/gym/103960) # B-Fun with Stones【博弈论,数位dp】 ## 题目大意 三个堆的取石子游戏,第 $i$ 个堆石子个数可能是 $[L_i ......