- 博客(14)
- 收藏
- 关注
原创 Codeforces Round #811 (Div. 3)D.Color with Occurrences
Codeforces Round #811 (Div. 3)D.Color with Occurrences
2022-08-03 11:09:40 168
原创 Educational Codeforces Round 131 (Rated for Div. 2)
B. PermutationA. Grass FieldC. Schedule Management
2022-07-09 11:56:08 367
原创 Codeforces Round #804 (Div. 2)A、B、C...
Codeforces Round #804 (Div. 2)A、B、C.
2022-07-05 21:11:02 318
原创 Codeforces Round #803 (Div. 2) D. Fixed Point Guessing
Codeforces Round #803 (Div. 2) D. Fixed Point Guessing
2022-07-01 12:28:10 266
原创 Codeforces Global Round 21 E. Placing Jinas
Codeforces Global Round 21 E. Placing Jinas
2022-06-30 13:47:53 218
原创 Educational Codeforces Round 129 (Rated for Div. 2)D
Educational Codeforces Round 129 (Rated for Div. 2)D
2022-05-24 18:07:56 99 1
原创 Codeforces Round #788 (Div. 2)C,D
Codeforces Round #788 (Div. 2)C - Where is the Pizza?题意:对应c放入a,b其中之一(a,b,c均在1~n内)环路定理的运用 并查集 快速幂思路:对a [ i ] 和 b [ i ]建边,可得到任意数量个环 自环 和 环上有确定的点,环内只有一种可能 环上没有确定的点,有两种可能 所以只用找环满足条件 3 的数量,输出对2的幂次mod1e9#include<bits/stdc++.h>#define ...
2022-05-07 12:16:10 121
原创 Codeforces Round #787 (Div. 3)D,E...
Vertical PathsDdfs+邻接表#include<bits/stdc++.h>#define debug0(x) cout << endl << "debug0: " << x << endl;#define fr(t, i, n) for (int i = t; i < n; i++)#define nfr(t, i, n) for (int i = t; i < n; i--)#define fi..
2022-05-06 20:58:44 220
原创 codeforce golobal round 20 - 1672D - Cyclic Rotation
1672D - Cyclic Rotation题意:给长度相等的数组 a 和 b ,判断能否通过以下操作将 a 变为 b 。在 a 数组中一段子数组,若两端的数相同,该段向左旋转一位分析:想想可以用双指针来写,只是思维有点复杂(蒻苟),先定义 i = 1在 a 数组上,j = 1 在 b 数组上,长度为 n 。 当 a[ i ] == b[ i ] 时,已经匹配,不操作 i ++,j ++; 因为是左旋,当 a[ i ] != b[ i ] 时,需要操作使得a[ i ] 与b[ i ]
2022-04-25 20:17:21 470
原创 基础的树状数组操作
动态求连续区间和给定n个数组成的一个数列,规定有两种操作,一是修改某个元素,二是求子数列[a,b][a,b]的连续和。输入格式第一行包含两个整数n 和m,分别表示数的个数和操作次数。第二行包含n个整数,表示完整数列。接下来m行,每行包含三个整数k,a,b (k=0,表示求子数列[a,b]的和;k=1,表示第a个数加b)。数列从1开始计数。输出格式输出若干行数字,表示k=0 时,对应的子数列 [a,b]的连续和。数据范围1≤n≤10...
2022-04-05 14:05:29 1841 1
原创 布什博弈(先到终点者失败)
布什博弈(先到终点者失败)在网上我没找到先到终点失败的博弈(也可能只是我没找到),所以我就自己想啦。总步数为n,单词走动为m,只有一段博弈如图,仅m = Nn + N + 1时,先手败(N是自然数)。
2021-12-06 21:34:31 274 2
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人