Today is a simulation question, and my eyes are straight...

Source: Internet
Author: User
After I did my questions today, I found that they were all simulated and my eyes were straight.

1061 -- balance:

Assume that there are several weights with the weight of a, several weights with the weight of B, and a weight with the weight of C.

C must be on Apsara stack. Do I have to put x a and y B to balance the balance? 1, x + y is the minimum. 2, Max + by minimum

--------------------

Obviously, there are only three ways to place data: 1. Ax + by = C (only when C> MAX (a, B)

2. Ax = by + c

3. By = AX + c

First, deploy method 1, unsolvable Methods 2, and 3 respectively: Then retrieve the items that meet the requirements.

This will not time out ..

1062 -- Endymion said: B can do it -- unfortunately, it cannot be understood.

1063-weak Cryptography (in fact, it is not weak, enough for me ):

I haven't talked about it in the group...

1064 -- pathology path (translated by Kingsoft fast)

This question is not hard to understand. The key points are as follows: 1. //. It is to return to the parent directory.

2./. Return the user (ignore it directly)

3. Access to directories is real-time, rather than viewing the final results! (I did not understand it at the beginning)

For example,/AA/BB/CC/index.html

// AA/DD/../BB/CC/index.html

It seems that/AA/DD/../BB/CC/index.html is equivalent to/AA/BB/CC/index.html

However, the error occurs when/AA/DD/is implemented, and the error occurs directly.

UnderstandingSample InputIn 1

/Home/ACM/

/Home/ICPC/../ACM/

Why output: not found

This topic generally seems to be based on the first n rows to generate a tree similar to a directory, and then access the tree in sequence -- not found if it does not exist, no if it is inconsistent ......

However, if the data structure is not well developed, it is still difficult to generate and access such trees-so is there a better solution:

I did this-N rows at the beginning did not generate a tree similar to a directory, but instead generated a dictionary-a dictionary containing all the intermediate directory names.

For example:/AA/BB/CC/index.html

Generate:

/

/AA/

/AA/BB/

/AA/BB/CC/

/AA/BB/CC/index.html

Then sort the data, and you only need to look up the dictionary in the future-convenient (compared to the method used)

-End-

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.