- 博客(9)
- 收藏
- 关注
转载 四月八号训练(比较神奇的结构体排序)
四月八号训练写挂的题I - SDG ZOJ - 3689DiggingWhen it comes to the Maya Civilization, we can quickly remind of a term called the end of the world. It’s not difficult to understand why we choose to believe t...
2020-04-09 17:57:01 182 1
原创 3月23号KMP算法
kmp:串的模式匹配算法字符串匹配就是在一个主串中找到待匹配串的位置主串: a b a b c a b c a c b a b模式串: a b c a c一o(n*m)基本思想: 从主串 s 的第一个字符起和模式的第一个字符比较之,若相等,则继续逐个比较后序字符,否则从主串的第二个字符起再重新和模式的字符比较之。依次类推,直至模式 p 中的每个字符依...
2020-03-23 19:10:12 202 1
转载 lower_bound()函数详解
大佬写的挺好,我就不写了https://blog.csdn.net/qq_41603898/article/details/81603327
2020-03-17 14:58:29 141
原创 c++ cin快读
#define FAST ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)用的时候加FAST;到main()后就行
2020-02-29 17:33:39 1122 1
原创 F - Three Paths on a Tree CodeForces - 1294F
F - Three Paths on a Tree CodeForces - 1294FYou are given an unweighted tree with nn vertices. Recall that a tree is a connected undirected graph without cycles.Your task is to choose three distinct...
2020-02-18 15:13:14 267
原创 E - Obtain a Permutation //CodeForces - 1294E
E - Obtain a Permutation CodeForces - 1294E描述给一个 n×mn×m 的矩阵,你想要把它还原成如下的矩阵:你有两种操作:选择一个数,修改它的值。选择一列,每个元素上移一位,第一行的元素移到第 nn 行。求还原的最小操作次数。输入第一行两个正整数 n,mn,m(1≤n,m≤2×1051≤n,m≤2×105,n×m≤2×105n×m≤2×1...
2020-02-18 12:18:55 233
原创 D - MEX maximizing CodeForces - 1294D
D - MEX maximizing CodeForces - 1294DRecall that MEX of an array is a minimum non-negative integer that does not belong to the array. Examples:for the array [0,0,1,0,2][0,0,1,0,2] MEX equals to 33 be...
2020-02-18 11:34:20 271
原创 C - Product of Three Numbers CodeForces - 1294C
C - Product of Three Numbers CodeForces - 1294CYou are given one integer number nn. Find three distinct integers a,b,ca,b,c such that 2≤a,b,c2≤a,b,c and a⋅b⋅c=na⋅b⋅c=n or say that it is impossible to...
2020-02-18 09:54:43 235
原创 B - Collecting Packages vjudge
B - Collecting Packages vjudgeThere is a robot in a warehouse and nn packages he wants to collect. The warehouse can be represented as a coordinate grid. Initially, the robot stays at the point (0,0)...
2020-02-18 09:41:00 242
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人