题目笔记
siyutt
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Codeforce931C(思维)
Laboratory Work 传送门 题意:给你一个长为n的序列,该序列的元素之间的差值不超过二,现在要你找出一个新的大小同为n的序列,其平均数于原序列相等,并且里面的元素大小要在原序列的范围之内。 思路:要求大小为n,平均数相等,元素大小范围在原序列内,这说明要求在原序列中元素之间进行转化,而能转化的只有一种—a+1 + a+3 = 2*(a+2) 所以进行判断转化就可以了 ...原创 2018-03-14 20:59:00 · 238 阅读 · 0 评论 -
Codeforce957B(暴力模拟)
Mystical Mosaic There is a rectangular grid of n rows of m initially-white cells each. Arkady performed a certain number (possibly zero) of operations on it. In the i-th operation, a non-empty subse...原创 2018-03-27 20:54:31 · 485 阅读 · 0 评论 -
Codeforce961C(暴力)
Chessboard Magnus decided to play a classic chess game. Though what he saw in his locker shocked him! His favourite chessboard got broken into 4 pieces, each of size n by n, n is always odd. And what...原创 2018-04-10 19:00:17 · 648 阅读 · 0 评论 -
Longest Valid Parentheses(DP/思维)
32. Longest Valid Parentheses 传送门 dp思路: 问题->最长有效括号子序列长度 状态->dp[i]以i为结尾的最长有效括号子序列长度(则str[i]= ‘)’ ); 子状态: 如果str[i-1]= ‘(’ ---->dp[i-2] 如果str[i-1]= ‘)’ ---->如果str[i-dp[i-1]-1]= ‘(’ --...原创 2018-10-13 16:03:53 · 500 阅读 · 0 评论
分享