CSP-S First Round Written Exam Key Questions

Summary of key questions of CSP-S improvement group written test questions:

Today I will share with you some key questions in the first round of CSP-S written test, including explanations.

first question:

1. The binary number corresponding to the decimal number 13.375 is ().

A.1101.011

B.1011.011

C.1101.101

D.1010.01

Parse:

  Everyone must have some understanding of converting a decimal integer to binary (assuming that the decimal integer is x, first find the remainder of x divided by 2, how long it represents the number above the binary, and then continue to divide by the two-way Round down until you know that x is 0. The principle of converting a decimal integer to k-ary is the same, that is, it becomes a constant calculation of the remainder of x divided by k).

  

   But for the binary of decimals, we can go further, first find the binary of the integer, 13 converted to binary is 1101, and then 0.375 is left, now we need to calculate the negative nth power of 2, which is equivalent to 2 The reciprocal of the nth power (such as 2^-1=1/2 2^-2=1/4 2^3=1/8).

  

  Next, let’s see how the decimal is converted into a negative number of 2. Unlike integers, it is continuously multiplied by 2. If the integer part is still 0 after multiplying by 2, then the current negative number of 2 is 0. If the integer part is 1, then the current negative number base of 2 is 1, and then remove the integer part, leaving the decimal part to continue the calculation until the value is 0 after removing the integer part.

  

  Let's give an example first, say 0.75, its binary value should be 0.11 (because 0.75=2^-1+2^-2), deduce it according to the above method:

     1.0.75*2=1.5 -------------------- The current bit is 1

     2.1.5-1=0.5 -------------------- Remove the integer part

     3.0.5*2=1 -------------------- The current bit is 1

     4.1-1=0 -------------------- end

  This gives the binary sequence 0.11.

  

  Then let's find the binary sequence of 0.375 required by the title:

  1. 0.375*2=0.75 ------- current bit is 0
  2. 0.75*2=1.5 ------- The current bit is 1
  3. 1.5-1=0.5 ------- Remove the integer part
  4. 0.5*2=1 ------- The current bit is 1
  5. 1-1=0 ------- end

  In this way, the binary sequence of 0.011 is obtained, and the binary sequence of the previous integer part is counted, then the answer is 1101.011. So we choose A.

Answer:

A

Second question:

2. In order to solve the incompatibility problems in web applications and ensure the smooth circulation of information, ( ) has formulated a series of standards involving HTML, XML, CSS, etc., and recommends developers to follow.

A.Microsoft

B. Association for Computing Machinery (ACM)

c. UNESCO

D. World Wide Web Consortium (W3C)

Parse:

  The World Wide Web Consortium (foreign language abbreviation: W3C) standard is not a certain standard, but a collection of a series of standards. A webpage is mainly composed of three parts: Structure, Presentation and Behavior.

  Founded in 1994, the World Wide Web Consortium is the most authoritative and influential international neutral technical standards organization in the field of Web technology. So far, W3C has released more than 200 far-reaching Web technology standards and implementation guidelines, such as Hypertext Markup Language ( an application under Standard General Markup Language ), Extensible Markup Language (Standard General Markup language ) and the Information Accessibility Guidelines ( WCAG ) to help people with disabilities effectively obtain Web content, etc., have effectively promoted the mutual compatibility of Web technologies, and provided fundamental and fundamental support for the development and application of Internet technologies effect.

  Corresponding standards are also divided into three aspects: structural standard languages ​​mainly include XHTML and XML , performance standard languages ​​mainly include CSS, and behavioral standards mainly include object models (such as W3C DOM) and ECMA Script . Most of these standards are drafted and released by W3C, and some are standards formulated by other standards organizations, such as the ECMAScript standard of ECMA (European Computer Manufacturers Association).

  

  Through the above data search, we choose D. (This kind is the most difficult, similar to history, it all depends on remembering)

Answer:

D

The third question:

3. In the TCP/IP protocol suite, the core network protocol is ()

A.UDP

B.HTTP

C.TCP

D.IP

Parse:

  TCP/IP is a four-layer protocol system with a total network interface layer, network layer, transport layer and application layer.

  The first layer is the application layer, and its function is to serve the application process, that is, to provide users with data plus coding and dialogue control.

  The second layer is the transport layer, and its function is to be able to solve problems such as end-to-end reliability and ensure that data arrives in the correct order. Include which application the given data should be sent to.

  The third layer is the network layer, the function is to establish the network connection, terminate and find the best way of IP address.

  The fourth layer is the network interface layer. Its function is the physical medium for transmitting data, and it is the method by which data packets are transmitted from the network layer of one device to the network layer of another device. It also controls the hardware devices that make up the network.

  

  By searching the information, we can see that IP occupies the largest area in the protocol system, so we choose D.

Answer:

D

Fourth question:

4. Define L number: a prime number or a palindromic number that satisfies any one of the two conditions. How many "L numbers" are greater than or equal to 10 and less than or equal to 120? All established is also L number, such as "131") ()

A.34

B.35

C.36

D.37

Parse:

  We can first find all prime numbers and all palindromic numbers, and then subtract the duplicates.

  

  Prime numbers within 10~120:

    11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113

  There are 26 in total.

  

  Number of palindrome within 10~120:

    11,22,33,44,55,66,77,88,99,101,111.

  There are 11 in total.

  

  The repeated numbers between the two are 11 and 101, then find the answer 26+11-2=35, so we choose B.

Answer:

B

Fifth question:

5. To assign a color to each node in graph G so that adjacent nodes have different colors is called a normal coloring of graph G. The minimum number of colors necessary for a normal coloring graph G is called the chromatic number of G. Then the chromatic number of the following figure is ( ) 

A. 3

B. 4

C. 5

D. 6

Parse:

  Everyone should have heard of the four-color principle, here is a brief explanation: "Any map with only four colors can make countries with common borders colored in different colors." Expressed in mathematical language, that is, "the plane Arbitrarily subdivided into non-overlapping areas, each area can always be marked with one of the four numbers 1, 2, 3, 4, without causing two adjacent areas to get the same number."

  

  But everyone should not choose 4 for this type of question, because some pictures can be expressed with only three colors. After coloring the above picture, it will be:

  There are three colors available for painting, so we choose A. 

Answer:

A

Sixth question:

6. Suppose the number of all subsets of a set containing 10 elements is S, and the number of subsets composed of 7 elements is T, then the value of T/S is (B).

A.5/32

B.15/128

C.1/8

D.21/128

Parse:

  First, let me tell you what a subset is:

    Subset is a mathematical concept: if any element of set A is an element of set B, then set A is called a subset of set B.

    Symbolic language: If ∀a∈A, there are a∈B, then A⊆B.

  How do we find the number of subsets?

    Assuming a set contains n elements, it is required to calculate the number of subsets of the set.

    All subsets of the set are also called power sets of the set, for example, all subsets of the set {1,2,3} are empty sets, {1},{2},{3},{1,2}, {1,3}, {2,3}, {1,2,3} count, there are 8 in total, so it is speculated that it is the third power of 2, that is, the third power of 2. So is this conclusion correct?

  

  We know that a subset of a set with n elements is actually an empty set, a set with one element, a set with two elements...a set with n elements, and the sum of this set is:

According to the formula and theorem of polynomials, the sum of the above formulas is 2 to the nth power. 

  

  Then we come back to the topic, a set has 10 elements, then the subset of this set is 2^10=1024, and then select 7 of these 10 numbers, that is, C(n,m) means that there are n _{C_{10}^{7}\textrm{}}^{}\textrm{}numbers The number of combinations of selected m numbers is equivalent to \frac{n!}{(n-m)!m!}, then _{}^{}\textrm{C}_{10}^{7}\textrm{}\doteq \frac{10!}{(10-7)!7!}=\frac{10!}{3!7!}=\frac{10*9*8}{2*3}=5*3*8=120, then we can \frac{120}{1024}divide it, which is equal to \frac{15}{128}.

  

  So we choose B.

Answer:

B

Summarize:

  This is the end of today's preliminary topic sharing. Next time we will share "Perfect Code and Reading Program". 

Guess you like

Origin blog.csdn.net/wo_ai_luo_/article/details/131113365