Bài 1. Gửi thư . Vị Giám đốc công ty XYZ cần gửi một văn bản quan trọng tới một đối tác của mình. Văn bản là một xâu S các chữ cái la tinh in thường. Để bảo mật nội dung văn bản, ông Giám đốc gửi 2 bức thư. Bức thư thứ nhất là phần đầu Sb của xâu S, bức thư thứ 2 là phần cuối Se của S. Hai bức thư Sb và Se đảm bảo đầy đủ nội dung của S, tuy nhiên có thể một phần cuối của Sb có thể được viết lặp lại trong phần đầu của Se, song số kí tự được viết lặp lại không biết trước. Ví dụ: với văn bản S=’truongnguyenduquannhat’ tạo ra hai bức thư: Sb=’truongnguyendu’ và Se=’nguyenduquannhat’ Yêu cầu: Cho hai xâu Sb và Se, hãy xác định một xâu S có thể là nội dung của bức thư sao cho độ dài của xâu S là ngắn nhất. Dữ liệu Dòng đầu chứa xâu Sb, dòng thứ hai chứa xâu Se. Mỗi xâu có độ dài không quá 250. Kết quả Ghi ra độ dài của xâu S tìm được. Ví dụ Dữ liệu truongnguyendu nguyenduquannhat Kết quả 22

Các câu hỏi liên quan

A young actress is about to go onto the stage. As she waits by the side of the stage, she looks nervous. You might hear her whisper to her friend, “I’ve got butterflies in my stomach.” Butterflies in her stomach? How did those get in there? The feeling of butterflies comes from chemicals produced by the body in stressful situations. One chemical that the body makes under stress is cortisol. This chemical benefits the body in normal situations. In fact, it helps the body start normal activities in the morning after waking up. It also plays a role in helping the body and mind respond well to healthy exercise. However, when the body is under stress, extra cortisol begins to affect the stomach. For some people, cortisol shuts down the stomach, producing the funny feeling of butterflies. For others, cortisol speeds up the way the stomach works, which makes these people feel sick. All you need to do to get rid of a few butterflies in the stomach is just relax. Laughing with, or talking to, others about your stress can help reduce it. Stepping out onto the stage will also help those butterflies fly away. Choose the best answer. 1.What is the main idea of this reading? a. A new kind of medicine called cortisol b. An illness that nervous people get c. The cause of butterflies in the stomach d. The stress that actors have 2.According to the reading, what is NOT true about cortisol? a. In small amounts, it benefits the body. b. It can shut down the stomach. c. It is found in many kinds of food. d. It is produced by the body. 3.What helps a body respond well to exercise? a. Butterflies b. Cortisol c. Stomach acid d. Stress 4.Which may help a person get over butterflies in the stomach? a.Doing the thing that makes him or her nervous b.Not talking while the butterflies are there c.Shutting down his or her stomach for some time d.Taking a small amount of cortisol 5.According to the passage, what makes some people feel sick? a.When situations return to normal c. When the stomach works too fast b.When the stomach shuts down d. When there is too little cortisol