A. Minimum Difficulty time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike is trying rock climbing but he is awful at it. There are n holds on the wall, i-th hold is at height ai off the g…
B. Secret Combination time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You got a box with a combination lock. The lock has a display showing n digits. There are two buttons on the box, each…
A. Minimum Difficulty time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike is trying rock climbing but he is awful at it. There are n holds on the wall, i-th hold is at height ai off the g…
题目传送门 /* 题意:删除若干行,使得n行字符串成递增排序 暴力+构造:从前往后枚举列,当之前的顺序已经正确时,之后就不用考虑了,这样删列最小 */ /************************************************ Author :Running_Time Created Time :2015-8-3 10:49:53 File Name :C.cpp *************************************************/ #in…
题目传送门 /* 构造+暴力:按照题目意思,只要10次加1就变回原来的数字,暴力枚举所有数字,string大法好! */ /************************************************ Author :Running_Time Created Time :2015-8-3 8:43:02 File Name :A.cpp *************************************************/ #include <cstdio>…
Codeforces Round #297 (Div. 2)A. Vitaliy and Pie Time Limit: 2 Sec  Memory Limit: 256 MBSubmit: xxx  Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/A Description After a hard day Vitaly got very hungry and he wants to eat his favorite pot…
题目链接:Codeforces Round #298 (Div. 2) A. Exam An exam for n students will take place in a long and narrow room, so the students will sit in a line in some order. The teacher suspects that students with adjacent numbers (i and i + 1) always studied side…
A. Minimum Difficulty time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output Mike is trying rock climbing but he is awful at it. There are n holds on the wall, i-th hold is at height ai off the g…
解题思路:给出一个递增数列,a1,a2,a3,-----,an.问任意去掉a2到a3之间任意一个数之后, 因为注意到该数列是单调递增的,所以可以先求出原数列相邻两项的差值的最大值max, 得到新的一个数列(比如先去掉a2),该数列相邻两项的差值的最大值为Max1=findmax(max,a3-a1) 再去掉 a3,得到该数列相邻两项的差值的最大值Max2=findmax(max,a4-a2) ------ 再去掉 an-1,得到该数列相邻两项的差值的最大值Maxn-2=findmax(max,a…
C. Removing Columns time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output You are given an n × m rectangular table consisting of lower case English letters. In one operation you can completely r…