C. Fragile Bridges 题目连接: http://codeforces.com/contest/201/problem/C Description You are playing a video game and you have just reached the bonus level, where the only possible goal is to score as many points as possible. Being a perfectionist, you'v…
A. LLPS 长度最大10,暴力枚举即可. B. Brand New Easy Problem 枚举\(n\)的全排列,按题意求最小的\(x\),即逆序对个数. C. Clear Symmetry 当\(n\)为偶数时,只有长为\(w=\frac{n}{2}-1\)的正方形内可以填1,并且1不能相邻,根据对称性,1的个数必然是4的倍数,且最大为\[max(\frac{w^2}{2}, w^2-\frac{w^2}{2})\] 当\(n\)为奇数,状压DP,比较麻烦,没想到比较好的实现方式. D…
题目链接:http://codeforces.com/contest/283/problem/B 思路: dp[now][flag]表示现在在位置now,flag表示是接下来要做的步骤,然后根据题意记忆化搜索记忆,vis数组标记那些已经访问过的状态. #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #define REP(i, a, b) for (i…
E. Thoroughly Bureaucratic Organization 题目连接: http://www.codeforces.com/contest/201/problem/E Description Once n people simultaneously signed in to the reception at the recently opened, but already thoroughly bureaucratic organization (abbreviated TB…
D. Brand New Problem 题目连接: http://www.codeforces.com/contest/201/problem/D Description A widely known among some people Belarusian sport programmer Lesha decided to make some money to buy a one square meter larger flat. To do this, he wants to make a…
B. Guess That Car! 题目连接: http://codeforces.com/contest/201/problem/B Description A widely known among some people Belarusian sport programmer Yura possesses lots of information about cars. That is why he has been invited to participate in a game show…
A. Clear Symmetry 题目连接: http://codeforces.com/contest/201/problem/A Description Consider some square matrix A with side n consisting of zeros and ones. There are n rows numbered from 1 to n from top to bottom and n columns numbered from 1 to n from l…
题目链接: http://codeforces.com/problemset/problem/214/E Relay Race time limit per test4 secondsmemory limit per test256 megabytes 问题描述 Furik and Rubik take part in a relay race. The race will be set up on a large square with the side of n meters. The gi…
C. Running Track 题目连接: http://www.codeforces.com/contest/615/problem/C Description A boy named Ayrat lives on planet AMI-1511. Each inhabitant of this planet has a talent. Specifically, Ayrat loves running, moreover, just running is not enough for hi…
B. Longtail Hedgehog 题目连接: http://www.codeforces.com/contest/615/problem/B Description This Christmas Santa gave Masha a magic picture and a pencil. The picture consists of n points connected by m segments (they might cross in any way, that doesn't m…