X meter pen exam

Source: Internet
Author: User

(1) 24 people make three ABC dishes, meeting the following conditions:

  • Everyone should do at least one thing.
  • No one will do three
  • What only performs a is what only performs C twice.
  • What only performs C is three times that both A and B.
  • Among those who would be B, only one would be B less than others
  • I do not know that a person will do both A and B.

How many people will do C?

Resolution: A between B> 1, only C is three times that of a between B, only a is twice that of C, in addition, only a + will only change C to <24, so only a is 12, C is 6, and a then B is 2, so we get:

Therefore, a branch C + B Branch C + only has B = 4, and the remaining four people should be allocated to these three regions, because only B = A then B + B then C-1; so:

If only B = 4 is met, the condition is not met;

If only B = 3 is met, the condition is not met;

If only B = 2 is used, then B Branch C = 1, a branch c = 1, so the person who would be C is 6 + 1 + 1 = 8;

If only B = 1 is used, then B Branch C = 0, a branch c = 3, then the person in C is 6 + 0 + 3 = 9.

(2) sizeof problem: Union must be aligned with short, that is, 2, so it is 4

 struct node{       char c[3];       short s;   };    union un{      char c[3];      short s;  };  

(3) calculate the number of leaf nodes in the Complete Binary Tree, and forget the second-to-last vertex...

(4) construct a later traversal by means of forward traversal and central Traversal

(4) Remove spaces of strings. If there are multiple spaces, keep one

(5) Calculate the coverage of a line segment. For example, if the two line segments [] and [] cover 10, calculate the number of overwrites of N line segments,

If multiple overwrites are performed, the calculation is performed once.

(6) convert (a + B) * C * (D-E/F) to a suffix expression: AB + C * DEF/-*. Pay attention to the calculation priority and combined line.


Summary: I found that my questions were too careless. Many of them would read the wrong questions and explain...


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.