https://www.acmicpc.net/problem/1620 숫자 -> 포켓몬 이름: 미리 저장해둔 문자열 순서로 찾는다.포켓몬 이름 -> 숫자: 해시 테이블을 이용한다. 체이닝 방식을 사용했다. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112#include #define MAX_DATA 25#define MAX_TABLE 100007#defi..
https://www.acmicpc.net/problem/1707 DFS로 노드를 탐색해가면서 마킹표시를 해준다. 이전 노드와 색이 같으면 이분그래프가 아니라고 판정한다. 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869#include #define V 20050#define E 200050 struct NODE{ int node; struct NODE *next;}; NODE HEAD[V],POOL[E*2];int t,n,m,u,v,cnt,ans,visit[V]; void init(int n){ cnt=0; ans=1; f..
https://www.acmicpc.net/problem/2606 메모리풀로 그래프를 만들고 1번에 연결된 컴퓨터의 개수를 세준다. 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152#include #define N 100 struct NODE{ int node; struct NODE *next;}; NODE HEAD[N+1],POOL[N*N];int n,m,u,v,cnt,ans,visit[N+1]; void make(int u,int v){ NODE *node=&POOL[cnt++]; node->node=v; node->next=HEAD[u].next; HEAD[u].next=node..
I started not to eat anything at night. I live near my company during weekdays, so I eat food only at my company. Naturally I don't keep anything to eat at my room. I try to eat every meal regularly. I'll keep this habit for my health.
My favorite food is chicken. Since I was a kid, I've loved any kind of chicken. I like fried chicken, all kinds of seasoned chicken, Korean chicken dishes, and everything. Sometimes I feel that I like chicken the most, more than just about anything like beef. I want to give it a try - to eat different kinds of chicken.
I remember I greeted 2018 with my girlfriend. We watched a firework event at Lotte World Tower. I made a wish for getting a job this year, and I finally succeeded in doing so. What also went well was to keep studying English through this class. I finished the course last October. It seemed a successful year for me, but the thing I worry about these days is about company things. Actually, I'm sti..
I would like to learn how to teleport. We live in a small world connected by means of transportation such as the airplane, car, train, and other forms of transportation like that. Despite all that, I want more. Every time I went somewhere in the past, I used to wonder what it would be like to teleport there immediately as it felt like a waste of time being in vehicle. I want to move anywhere in ..
I like dogs. I've raised Labrador Retrievers as guide dogs for the blind. It was the beginning of my dog story. My family got such an opportunity from Samsung Fire Insurance. It was volunteer work and a public service campaign organized by the company. We considered him as one of our family members. We took care of him for only one year, but we really felt close to him. After that, we adopted a ..
I would say yes. I've lived just for 27 years. When I think about back in the day, there were hills and valleys repeatedly. Aside from success, it's true. I think that life is not easy. Sometimes I cried and sometimes I laughed. Naturally for success, it takes a lot of patience and tenacity. But we have to define what success is. I guess that the most important thing for living is how I feel in ..
Recently I watched the movie Unstoppable during my company team event. It is just a typical Korean movie. Even before I watched it, I didn't really expect it would be fun. Anyway, there was a very lucky moment for me. When I got into the theater, we each got a small paper with a number written on it. And before the movie started, a lucky draw was held. The third prize was a free movie ticket for..