- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 2022 China Collegiate Programming Contest (CCPC) Weihai Site J. Eat, Sleep, Repeat
2022 China Collegiate Programming Contest (CCPC) Weihai Site J. Eat, Sleep, Repeat
2022-11-12 21:02:48
525
原创 Codeforces Round #831 (Div. 1 + Div. 2) E. Hanging Hearts
Codeforces Round #831 (Div. 1 + Div. 2) E. Hanging Hearts
2022-10-30 23:17:59
122
原创 2021-08-07
1586:局长抓卷王 题目链接:http://xujcoj.org/Home/Problems/status/pro_id/1586/ 初始在站中压入0,防止在初始max之前压入数字造成的不合法,每次出现两个数字求max后pop栈顶如果栈的空间大于1就向上一个max的状态++,一直向前回退直到栈顶不符合要求。最后判断消去的max个数和已有的max个数释放一致并且此时栈顶的值是由第一个max回退造成的1. 输出部分也是一样每当max匹配成功向后面加’)’。 栈实现 #pragma warning(disabl
2021-08-07 15:53:21
123
1
原创 2021-08-04
C. Vus the Cossack and Strings Codeforces Round #571 (Div. 2) 题目链接:https://codeforces.com/contest/1186/problem/C change from one state to another must be o(1). using a pre[] arr to record every interval which length is equal to b’length,the val of the int
2021-08-04 21:49:29
99
原创 2021-08-02
D. Integers Have Friends Codeforces Round #736 (Div. 2) 题目链接:https://codeforces.com/contest/1549/problem/D; 要寻找连续的最长ai~aj mod b==x,则连续的区间差分的gcd!=1,此时的m就是区间差分的gcd.用st表记录区间的gcd,从0开始维护区间gcd!=1寻找最长区间。 #pragma warning(disable:4996); #include<iostream> #i
2021-08-02 15:35:22
86
原创 2021-07-31
1555D - Say No to Palindromes Educational Codeforces Round 112 (Rated for Div. 2) 题目:https://codeforces.com/problemset/problem/1555/D The res will only in string “abc…” ,“acb…” ,“bca…” ,“bac…” ,“cab…” ,“cba…” using a pre arr to record every string. #pragma
2021-07-31 23:03:43
98
原创 2021-07-15
1315C - Restoring Permutation #pragma warning(disable:4996); #include<iostream> #include<cmath> #include<string> #include<string.h> #include<algorithm> #include<limits> #include<limits.h> #include<vector> #
2021-07-15 01:28:55
115
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人