UESTC Winter Training #6
Regionals >> North America-rocky Mountain
A- Parenthesis
Give an expression of not more than 1000 in length, containing only lowercase letters, addition operations, omitting multiplication sign multiplication and parentheses, and outputting expressions that remove extra brackets
Bracket matching can be done using a stack operation, and only two cases can be removed with this pair of parentheses:
- To the left of the left parenthesis is the left border, the addition symbol, the opening parenthesis, and the right side of the closing parenthesis is the right border, the addition symbol, the closing parenthesis
- If there are no addition operations within the parentheses (except in parentheses, which is the addition of the next parentheses), then the brackets can be removed
B- Ropes
To climb N (up to 100) order cliffs, the height of each cliff is given (up to 100), and for the length of Len the rope is available for len/hi+1 personal use climbing. While down the hill the rope must meet len<sum*2 where sum is the sum of all the cliffs high. Now ask the length of 50, 60, 70m of rope can be used for how many people, if the rope does not meet the conditions, output 0.
The problem is very annoying, read the question for 30 minutes, read the question 5 minutes to be able to knock out the code.
C- Chain Code
I haven't seen it for a while, like the Pique theorem.
D – Task
There are several tasks in the order, here are a few conditions: (up to 100 statements)
Task I starts at least A minutes later than task J
Task I must be done after a minute of J start (including a minute)
Task I starts within A minutes of the starting time of Task J
Task I must start after J, and within a minute (including a minute) after start
Now ask for a start time for all tasks, an arbitrary solution
Not yet written, it's said to use a differential constraint system.
E- Page Count
A document has n (<=1000) pages, numbering starting at 1, with several print tasks, each printing the lower page to the high page. and print at most once per page, and ask how many pages are printed at the end.
It's probably the most water problem. The input format of the print task is Low-high, or it can be a single number. Because I forgot to judge the individual number and WA took three rounds ... _ (: Зゝ∠) _
F- Soccer
Given the names of n teams, the next M-line, each line team1 vs team2:x y, where x, Y is the score for two team authorities, each game wins three points, and a draw adds a point. When x=y=-1, it means that the board has not yet played (up to 12 games have not been played yet). Ask each team the highest rankings and lowest possible rankings.
The biggest pit point for this problem is that there is a blank line between each set of output data!
The topic itself is very simple, each game has three states, DFS enumeration can be a bit.
G- Railroad
Two trains into the stack, the top right of the first train has a car, each section has a number, the second train on the right bottom has a B car, each section has a number, each compartment into the stack, ask whether to form a given stack sequence.
DP problem, set DP[I][J][K] is the first train in front I, the second train of the front J trains can be made into a given stack sequence of the first i+j. One of the k=0 for the last stack is the first train compartment. The k=1 is the second train compartment for the last stack. So dp[i][j][0]=dp[i-1][j][0] | DP[I-1][J][1] (i+j value of the given sequence equals the value of the compartment of the first train), dp[i][j][1]=dp[i][j-1][0] | DP[I][J-1][1] (similarly)
Initialize to Dp[0][0][0]=dp[0][0][1]=1
H- Post Office
Given the size of the package, determine what kind of package.
The topic of considerable water, focusing on reading, the parcel's combined length and girth may not exceed 2100mm. This is length+2* (thickness+height) <= 2100, this sentence combined...and ... (... And... and) sentence pattern is a big pit point.
I- Aronson
This question hasn't been read yet.
UESTC Winter Training #6 "Regionals >> North America-rocky Mountain"