비대칭 타일링

Problem

https://www.algospot.com/judge/problem/read/ASYMTILING

Idea

2*1 로 만들 수 있는 총 경우의 수는..

int f(int n) {
    if (n <= 1) {
        return 1 
    }
    int ret = cache[n];

    if (ret != -1) {
        return ret;
    }
    ret = (f(n-1) + f(n-2)) % MOD;
    cache[n] = ret;
    return ret;
}

O(N): 부분 문제의 수는 O (n) 이고, 각각의 값을 계산하는 데는 O(1)

대칭을 제외한 비대칭 경우의 수는?

  • 대칭인 경우의 수를 뺀다

n이 홀수일 경우:
a) 가운데 21이 하나 있는 경우 1가지, n-1 은 서로 대칭 (다시 분할)

n 이 짝수일 경우:
b) 가운데 2
1 가 2개 경우와 n-2 는 서로 대칭 (다시 분할)
c) 전체의 반이 서로 대칭인경우. n / 2 (다시 분할)

int solution(int n) {
    if (n % 2 == 1) {
        return f(n) - f(n/2); // a)
    }
    int ret = f(d);
    ret = ret - f(n/2 -1); // b)
    ret = ret - f(n/2); // c)
    return ret;
}
  • 비대칭인 경우를 센다 한쪽이 아닌 양쪽에서부터 타일링한다고 보면
    대칭인 경우는:
    a) 21 이 양쪽끝에 존재
    b) 2
    1 2개가 양쪽끝에 존재

    비대칭인 경우는:
    c) 왼쪽은 21, 반대쪽은 21 2개 가로로
    d) 오른쪽이 21, 반대쪽은 21 2개 가로로

    int solution(int n) { // 비대칭 수를 반환한다
      if (n <= 2) return 0; // 비대칭 경우 없음
      int ret = memo[n];
      if (ret != -1) return ret;
    
      ret = solution(n-2); // 양쪽 1개씩 버리고 나머지 다시 분할해본다
      ret += solution(n-4); // 양쪽 2개씩 버리고 다시 분할
      ret += f(n-3); //왼쪽 1개, 오른쪽 2개 버리고 카운팅
      ret += f(n-3); //왼쪽 2개, 오른쪽 1개 버리고 카운팅
      return ret;
    }
    


    (A + B) mod C = (A mod C + B mod C) mod C
    (A - B + C) mod C

합친 LIS

Problem

https://algospot.com/judge/problem/read/JLIS

Idea

You need to make sure that

Dialogue 1 A: You need to make sure that you are on time for the bus. B: What time does the bus leave? A: 너는 확실히 버스 시간을 맞추도록 해야 해. B: 버스가 몇 시에 떠나나요? Dialogue 2 A: You need to make sure that you are on time for the bus. B: I know. A: 너는 확실히 버스 시간을 맞추도록 해야 해. B: 알아요. Dialogue 3 A: You need to make sure that you are on time for the bus. B: I get it! I get it! A: 너는 확실히 버스 시간을 맞추도록 해야 해. B: 알겠어요! 알겠어요!

  1. You need to make sure you get this correct. 너는 이것을 확실히 맞춰야 해.
  2. You need to make sure that you’re careful at all times. 너는 항상 (확실히) 조심해야 해.
  3. You need to make sure everything goes as planned. 너는 계획대로 확실하게 진행되도록 해야 해.

You need to make sure that ~ 너는 확실히 해야 해.  a way of asking that something happens  looking for a particular outcome  when you want to make sure that something takes place • ~ you include her plans as well. 그녀의 계획도 함께 포함하는 것  means that you match the bus schedule and that you don’t miss the bus • You need to make sure that you include her plans as well. 너는 확실히 그것이 그녀의 계획도 같이 포함하도록 해야 해. Memorizing Full Sentence English – Unit 22 Practice 1:

Dialogue 1 A: You need to make sure that you include her plans as well. B: Oops, I almost forgot about that. Thanks. A: 너는 확실히 그것이 그녀의 계획도 같이 포함하도록 해야 해. B: 아이고, 거의 잊어버릴 뻔 했네요. 고마워요. Dialogue 2 A: You need to make sure that you include her plans as well. B: What’s her plan? A: 너는 확실히 그것이 그녀의 계획도 같이 포함하도록 해야 해. B: 그녀의 계획이 뭔데요? Dialogue 3 A: You need to make sure that you include her plans as well. B: I already have. A: 너는 확실히 그것이 그녀의 계획도 같이 포함하도록 해야 해. B: 이미 했어요.

Example Sentence
  • You need to make sure that you are punctual for the seminar

세미나의 시간을 확실히 엄수해야 해요.

  • You need to make sure that he is satisfied with our service.

그가 우리의 서비스에 만족하도록 확실히 해야 해요. When you say, “I am satisfied”, what do you think that means? It means your wants or expectations have been met. You will open hear the word ‘satisfied’ when you’re taking about eating. Like, “I was really craving pizza so after I ate it, I was so satisfied; I was so happy.” You’ll also hear this word in relation to service. So, a friend of mine runs this business called “Ask Ajumma”. So, you message them with any kind of request. Maybe you need a cleaning lady, or a car service, or you need some food delievered. Whatever it may be, the company will get it done. So, this is a service. So, the CEO of this company might say something like, “You need to make sure that he is satisfied with our service.” Meaning it is important that the client is happy with our business.

Now, it’s time to wrap things up. Now unfortunately, that is all the time that we have for today. But what a productive ten minutes, wasn’t it? You need to make sure that you revicw this sentence often. You need to make sure that you keep watching Full Sentence Englishand before you know it, all of these useful sentences will be popping into your head. It really will help! So, I want to thank you for watching today and it was great to see you! Intil next time, much love!

Take me along time to memorize this

Have you ever thought to yourself, “It will take me a while to learn English.” Well, you’re not alone, Luckily, we are here to make things a little easier and faster for you. On this program, we take a sentence and break it down so that you can easily memorize it. So don’t think, “It will take me a while to get used to this” because it is very simple. Just open your mind and let it go. We’re going to start by breaking the sentence into two parts.

It will take me awhile to break in these new shoes.

So to make this sentence easier to understand, we’re going to divide it into two. The first part, “It will take me awhile to” is expressing that it will take some time. It will not be a short time, but a somewhat longer time to finish a task. The second part, “break in these new shoes” means you become used to the new shoes. You know when you get a paire of shoes, especially high heels for all the ladies out there, they are often really tight. But once you wear them a few times, your feet become used to the shoses and they’re more comfortable. This is called breaking them in. You can also break in a baseball glove. So when you first buy a baseball glove, the leather is quite stiff. But after a few times using the baseball glove, or after you have broken it it, it is more comfortable and easy to use. So putting these two parts together, “It will take me awhile to break in these new shoses” means that you are not comfortable in your shoes and it will take some time before you become comfortable.

Now let’s move on to memorizing this sentence.

Memorizing

It will take me awhile to break in these new shoes

Dialogue
  • A: Are those new shoes?

B: It will take me awhile to break in these new shoes.

  • A: Why are you limping?

B: It will take me awhile to break in these new shoes.

  • A: Your feet must be aching like bad.

B: It will take me awhile to break in these new shoes.

Now let’s go through three example sentences. I want you to repeat the sentence after me and then I will explain it.

Let’s start with sentence number one.

Example
  • It will take me awhile to memorize this.

If you think that it will take a long time to remember something, you can use this expression. When you are trying to learn something new, then it can take some time. But luckily for you, because you are watching Full Sentence English, it will only take ten minutes! Then you can say, “It won’t take me a long time to memorize this.”

Let’s move on to sentence number two.

  • It will take me awhile to get used to the new house

To get used to sth is to become comfortable. you can get used to a new schdule, you can get used to living alone, you can get used to a new kind of music. But in this case, it is getting used to the new house. So you know when you first move, you have to become adjusted to your new surroundings. So if you say, “It will take me awhile to get used the new house”, it means that it will be some time before you’re fully comfortable with your new place.

Now it’s time for sentence number three.

  • It will take me awhile to get to work

This sentence means that is going to take some time to arrive at work. If you take a taxi during rush hour, then you can say, “It will take me awhile to get to work.” Or if you are considering moving to an area that is far away from your work, that you can say, “It will take me awhile to get to work”. There you have it.

Three example sentences that can help further your understanding. Can you think of any other example sentences? Let’s move on to part 2.

It will take me awhile to get there by bus

Now, this sentence can be easily understood if we break it into two parts. Part one, “It will take me awhile” means that is will take some time to do something. It won’t take five minutes, it won’t take ten minutes, but maybe a little longer time.

Part two, “get there by bus.” This means that you will take the bus. Maybe you will consider different kinds of transportation like a taxi, or a bus, or a car, or a subway. But this part of the sentence is expressing that you will take the bus.

So if we put part 1 and part 2 together, then it is saying that it will take some time to arrive there because you will take the bus. if you take the subway, it will probably be faster.

Maybe you would say this to somebody that you are going to meet. You want to warn them that it will take some time, so you can say, “It will take me awhile to get there by bus.” Then the other person will know that you will not be there immediately.

So now le’t move on to memorizing this expression.

Memorizing

It will take me awhile to get there by bus

Dialogue
  • A: When do you think you will arrive?

B: It will take me awhile to get there by bus

  • A: Can you get here by 5?

B: It will take me awhile to get there by bus

  • A: You can only take the bus though.

B: It will take me awhile to get there by bus

Now it’s time to run through two example sentences to help you futher understand this sentence.

Let’s start off with sentence number one.

Example Sentence
  • It will take me awhile to clean up this mess.

Have you ever looked around your apartment and thought that it will take a really long time to make it neat again? You have dishes to do, that floor is dirty, laundry needs to be done. Then you can use this sentence, “It will take me awhile to clean up this mess.” That means that you will not have time to do much more because it may take you a couple of hours to clean.

Now let’s move on the the second sentence.

  • It will take me awhile before I can submit the final report.

As we have learned, “it will take me awhile” means that it will take some time. You’ll often hear this with, “It will take me awhile before.” That means it will take me a bit of time to finish something. In this case, it is submitting the final report. To submit is to turn in, to give to someone in a higher position. You can submit an essay to your professor, you can submit a photograph to a contest, you can also submit a final report to your boss.

Now it’s time to wrap things up.

So there you have it. Before we started this episode you may have thought to yourself, “It will take me awhile to learn this sentence.” But now you can see. In just ten minutes, you can learn a full sentence. I’m so glad that you stayed to join me. That’s all the time we have for today. But much love and I’ll see you next time!”

Winter Warmth on Koream Streets
  • (like it or) lump it: accept something unpleasant because there is no other choice I’m sorry you’re not happy about it but you’ll just have to lump it.

  • sure-fire : [ADJ] A sure-fire thing is something that is certain to succeed or win.

I know a sure-fire way to help us ride it out (=overcome)

  • 물고기처럼 생긴 작은 와플?

little waffles shaped like fish!

*나한테는 대단한건 아닌데 너에겐 재미있을거야 한번 쭉 볼 만해

It doesn’t do much for me but it might tickle your fancy and it is worth a quick look.

  • be partial to (=like) be partial to sports