codeforces transitive 1900e graph

Codeforces Round 764 (Div. 3)(vp)

# [Codeforces Round 764 (Div. 3) ](https://codeforces.com/contest/1624) ## A Plus One on the Subset **题意:判断最大和最小差多少即可** ```c++ void solve() { int n; c ......
Codeforces Round 764 Div vp

Codeforces Round 874 G题解

# 做不动那么多题了,来个G G就是问你一棵树能切成多少个大小为3的链,想了半天,想过dp啥的,但是后来发现这个贪心就好了,可以证明贪心找不到的,其他方法也找不到 好久没复健了,这是第一次,感觉以后要多做题才可以 ```cpp #include using namespace std; conste ......
题解 Codeforces Round 874

[图论记录] CF1082G Petya and Graph

([题目传送门](https://www.luogu.com.cn/problem/CF1082G)) 一道最大权闭合子图的模板题 把所有点当作负权点,所有边当作正权点。 考虑一条边 $e=(x,y,z)$ 能选择的条件,当 $x,y$ 均被选择时就可以选,那对应到最大权闭合子图的模型中,就可以将 ......
1082G Petya Graph 1082 and

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

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

论文解读(SimGCL)《Are Graph Augmentations Necessary? Simple Graph Contrastive Learning for Recommendation》

Note:[ wechat:Y466551 | 可加勿骚扰,付费咨询 ] 论文信息 论文标题:Are Graph Augmentations Necessary? Simple Graph Contrastive Learning for Recommendation论文作者:Junliang Yu ......

Codeforces Round 878 (Div. 3) 题解

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

知识图谱(Knowledge Graph)- Neo4j 5.10.0 Docker 安装

### 拉镜像 ```bash [root@localhost ~]# cat /etc/docker/daemon.json { "registry-mirrors": ["https://XXX.mirror.aliyuncs.com"] # 阿里镜像源 } # 拉取镜像 [root@local ......
图谱 Knowledge 知识 Docker Graph

知识图谱(Knowledge Graph)- Neo4j 5.10.0 CentOS 安装

### 系统需求 版本 JDK CPU 内存 硬盘 Neo4j 5.x 17 Intel x86-x64 Core i3 minimum,Core i7 recommended. AMD x86-x64, Mac ARM. 最低 2GB,推荐 16GB + 10G + Neo4j 5.x 11 Ne ......
图谱 Knowledge 知识 CentOS Graph

知识图谱(Knowledge Graph)根本概念

[TOC] 2012年5月17日,Google 正式提出了知识图谱(Knowledge Graph)的概念,其初衷是为了优化搜索引擎返回的结果,增强用户搜索质量及体验。 假设我们想知道 “王健林的儿子” 是谁,百度或谷歌一下,搜索引擎会准确返回王思聪的信息,说明搜索引擎理解了用户的意图,知道我们要找 ......
图谱 Knowledge 根本 概念 知识

【题解】Educational Codeforces Round 148(CF1832)

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

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

Codeforces Round 881 (Div. 3)

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

题解 CF1857G【Counting Graphs】

一个非常显然的事情是:总方案数即为每条边方案数之积。 树边已经确定,考察每条非树边 $(u,v)$ 可以怎么取。给定的树 $T$ 是唯一最小生成树,这意味着非树边 $(u,v)$ 要么不存在,要么权值大于 $T$ 上 $(u,v)$ 之间任意一条边的权值。设 $T$ 上 $(u,v)$ 间的最大边权 ......
题解 Counting Graphs 1857G 1857

Codeforces Round 891 (Div. 3) A-G

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

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

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

G. Counting Graphs

G. Counting Graphs Given a tree consisting of $n$ vertices. A tree is a connected undirected graph without cycles. Each edge of the tree has its weigh ......
Counting Graphs

[补题] 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

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

论文解读(LightGCL)《LightGCL: Simple Yet Effective Graph Contrastive Learning for Recommendation》

Note:[ wechat:Y466551 | 可加勿骚扰,付费咨询 ] 论文信息 论文标题:LightGCL: Simple Yet Effective Graph Contrastive Learning for Recommendation论文作者:Cai, Xuheng and Huang, ......

Codeforces 890-891的一些题目的反思

和atcoder一起出交互题是吧。 D题回复逆序对个数,对于[L,R-1]和[L,R],如果R是最大值,那么对逆序对个数无影响。这样来确认某个数是不是最大的,然后递归扩展到整个区间 这里看到逆序对,要想到归并排序、分治、递归、区间合并。。。。。 查看代码 // Problem: D. More Wr ......
Codeforces 题目 890 891