Expression Transformation (PTA)

... Arithmetic expressions have the form of prefix notation, infix notation, and suffix notation. The arithmetic expression used daily is in infix notation, that is, the binary operator is in the middle of two operands. Ask the designer to convert the infix expression to a postfix...


2015 ACM/ICPC Beijing Competition Live Game G

... 题意: Give you four rectangles, choose 3 rectangles from it [When reading the title, you can't see that only three rectangles are selected, and three hairs are made. Penalty time], to determine whether it can form a large rectangle 分析: 暴深搜, first arrange the order. . Then determine if the...


[dijkstra deformation] uva 11367 Full tank?

... 题大意: In an undirected picture, your car will go from the starting point to the end point. How much oil do you need to travel? The money for refueling in each place is different. You can add it without adding one unit. . . . The fuel tank has an upper limit. At the beginning your car's...


The single window "clip" version of the bank queuing problem

... queue "clip" is a behavior that causes everyone to be strongly dissatisfied, but this phenomenon often exists. In the single-window queuing problem of the bank, it is assumed that the bank has only one window to provide services, and all customers are arranged in a long queue according...


2015 ACM/ICPC Beijing Division I (construction)

... 题意: gives you a number n (n<=500), let you use the length of 1,2,...,n The line segment fills the matrix of w*h, where w*h==n*(n+1)/2. requires an odd-numbered polyline with an odd number of vertices, and an even-length polyline with an even number of vertices, except for the first...


The 24 o'clock game is a classic card puzzle game

... 24点游戏 is a classic card puzzle game. Common game rules: Take 4 cards from poker each time. Use addition, subtraction, multiplication and division, the first one can get 24 to win. (Where J stands for 11, Q stands for 12, K stands for 13, and A stands for 1), and the 24-point game is...


Target Sudoku Luogu P1074

... 题描述 小城和小华 are good students who love mathematics. Recently, they have been fascinated by Sudoku games. They want to use Sudoku. Than the height. But ordinary Sudoku is too simple for them, so they asked Dr. Z for Dr. Z to come up with his recently invented "target Sudoku" as the title...


The core of the Fibonacci sequence of the C language implementation of the

... fibonacci series is its recursive formula The following is the code for the C language: #include <stdio.h > Int main(void) { Unsigned long long num[50]; //This is the first 50 items of the fibonacci sequence Num[0] = num[1] = 1; Printf("%llu\n%llu\n" , num[0] , num[1]); Int i; For...


Virtual inheritance, virtual function

... 1. Virtual inheritance simply means that if two classes inherit the same base class (A), then if there is a third class that inherits the two classes, Three classes will have two base classes (A), and virtual inheritance can avoid this. From the implementation code: 普通继承: /** Normal...


[Baidu] Sensitive words

... 题描述 Most forums, websites, etc., in order to facilitate management, have set up sensitive words. On most websites, sensitive words generally refer to words with sensitive political tendencies, violent tendencies, unhealthy colors, or uncivilized words. Some websites also set some...