분류 전체보기

Problem Solving/BaekJoon

[BOJ/백준] 1193 - 분수찾기

1193번: 분수찾기 첫째 줄에 X(1 ≤ X ≤ 10,000,000)가 주어진다. www.acmicpc.net 제목 분수찾기 조건 시간 제한 : 0.5 초 메모리 제한 : 256 MB 문제 무한히 큰 배열에 다음과 같이 분수들이 적혀있다. 1/1 1/2 1/3 1/4 1/5 ... 2/1 2/2 2/3 2/4 ... ... 3/1 3/2 3/3 ... ... ... 4/1 4/2 ... ... ... ... 5/1 ... ... ... ... ... ... ... ... ... ... ... 이와 같이 나열된 분수들을 1/1 → 1/2 → 2/1 → 3/1 → 2/2 → … 과 같은 지그재그 순서로 차례대로 1번, 2번, 3번, 4번, 5번, … 분수라고 하자. X가 주어졌을 때, X번째 분수를 구하는..

Problem Solving/BaekJoon

[BOJ/백준] 6566 - 애너그램 그룹

6566번: 애너그램 그룹 크기가 가장 큰 애너그램 다섯 개를 출력한다. 만약, 그룹의 수가 다섯개보다 작다면, 모두 출력한다. 그룹은 크기가 감소하는 순으로, 크기가 같을 때는 각 그룹에서 가장 사전 순으로 앞서는 www.acmicpc.net 제목 애너그램 그룹 조건 시간 제한 : 1 초 메모리 제한 : 128 MB 문제 평생 영어 단어를 암기한 준민이는 단어를 애너그램 그룹으로 나누려고 한다. 단어 w가 단어 v의 애너그램이 되려면, 단어 w의 알파벳 순서를 바꿔서 v를 만들 수 있어야 한다. 이렇게 애너그램인 단어들을 묶어서 애너그램 그룹이라고 한다. 그룹의 크기는 그 그룹에 포함된 단어의 수이다. 단어가 주어졌을 때, 크기가 가장 큰 애너그램 그룹 다섯 개를 구하는 프로그램을 작성하시오. 입력 입..

Problem Solving/BaekJoon

[BOJ/백준] 25099 - Anagram

25099번: Anagram The first line contains $n$, the length of the list. This is followed by $n$ lines, each containing one word. www.acmicpc.net Sort + Map 제목 Anagram 조건 시간 제한 : 4 초 메모리 제한 : 256 MB 문제 Two words are anagrams if the letters of the first word can be reordered to obtain the second one. An instance of anagrams is the pair “listen” and “silent”. You are given a list of words, each word c..

Problem Solving/BaekJoon

[BOJ/백준] 1407 - 2로 몇 번 나누어질까

1407번: 2로 몇 번 나누어질까 자연수 N이 주어지면, 자연수를 유지하면서 N을 2로 몇 번까지 나눌 수 있는지를 생각해 볼 수 있다. 즉, N의 모든 약수 중 2의 거듭제곱 꼴이면서 가장 큰 약수를 생각하는 것이다. 예를 들어 15의 www.acmicpc.net 제목 2로 몇 번 나누어질까 조건 시간 제한 : 2 초 메모리 제한 : 128 MB 문제 자연수 N이 주어지면, 자연수를 유지하면서 N을 2로 몇 번까지 나눌 수 있는지를 생각해 볼 수 있다. 즉, N의 모든 약수 중 2의 거듭제곱 꼴이면서 가장 큰 약수를 생각하는 것이다. 예를 들어 15의 경우는 2로 한 번도 나눌 수 없으므로 2^0 = 1이 해당되고, 40의 경우는 2로 세 번까지 나눌 수 있으므로 2^3 = 8이 해당된다. 이러한 약..

Problem Solving/BaekJoon

[BOJ/백준] 16600 - Contemporary Art

16600번: Contemporary Art At the Van Abbemuseum of modern and contemporary art in Eindhoven, we always look to present our muses in the most interesting way possible. Sometimes we have our work cut out for us. Today we are exploring whether we can modify one of our perfectly-square www.acmicpc.net SQRT 제목 Contemporary Art 조건 시간 제한 : 1 초 메모리 제한 : 512 MB 문제 At the Van Abbemuseum of modern and conte..

Problem Solving/CodeForces

[Codeforces/코드포스] Educational Codeforces Round 135 (Div. 2) A - Colored Balls: Revisited

Problem - A - Codeforces codeforces.com 제일 많은 수의 공 제목 Colored Balls: Revisited 조건 time limit per test : 2 second memory limit per test : 256 megabytes input : standard input output : standard output 문제 The title is a reference to the very first Educational Round from our writers team, Educational Round 18. There is a bag, containing colored balls. There are n different colors of balls, numbered ..

Problem Solving/BaekJoon

[BOJ/백준] 25427 - DKSH를 찾아라

25427번: DKSH를 찾아라 준혁이는 DKSH(단국대학교부속소프트웨어고등학교)에 다니는 학생이다. 어느 날, 준혁이는 길을 걷다가 $N$ 개의 알파벳 대문자가 써있는 종이를 발견했다. 평소에 자신이 DKSH에 다니는 학생이라 www.acmicpc.net D, DK, DKS → Dynamic Programming 제목 DKSH를 찾아라 조건 시간 제한 : 1 초 메모리 제한 : 512 MB 문제 준혁이는 DKSH(단국대학교부속소프트웨어고등학교)에 다니는 학생이다. 어느 날, 준혁이는 길을 걷다가 N 개의 알파벳 대문자가 써있는 종이를 발견했다. 평소에 자신이 DKSH에 다니는 학생이라는 것을 자랑스러워하던 준혁이는 이 종이에서 네 개의 문자를 골라서 그 문자들을 제외한 나머지 문자를 전부 지웠을 때 "..

Problem Solving/BaekJoon

[BOJ/백준] 2623 - 음악프로그램

2623번: 음악프로그램 첫째 줄에는 가수의 수 N과 보조 PD의 수 M이 주어진다. 가수는 번호 1, 2,…,N 으로 표시한다. 둘째 줄부터 각 보조 PD가 정한 순서들이 한 줄에 하나씩 나온다. 각 줄의 맨 앞에는 보조 PD가 담당한 www.acmicpc.net 위상정렬 제목 음악프로그램 조건 시간 제한 : 1 초 메모리 제한 : 128 MB 문제 인터넷 방송 KOI(Korea Open Internet)의 음악 프로그램 PD인 남일이는 자기가 맡은 프로그램 '뮤직 KOI'에서 가수의 출연 순서를 정하는 일을 매우 골치 아파한다. 순서를 정하기 위해서는 많은 조건을 따져야 한다. 그래서 오늘 출연 예정인 여섯 팀의 가수에 대해서 남일이가 보조 PD 세 명에게 각자 담당한 가수의 출연 순서를 정해오게 하..

Problem Solving/CodeForces

[Codeforces/코드포스] Codeforces Round #820 (Div. 3) D - Friends and the Restaurant

Problem - D - Codeforces codeforces.com two pointer 제목 Friends and the Restaurant 조건 time limit per test : 2 second memory limit per test : 256 megabytes input : standard input output : standard output 문제 A group of n friends decide to go to a restaurant. Each of the friends plans to order meals for xi burles and has a total of yi burles (1≤i≤n). The friends decide to split their visit to the re..

Problem Solving/CodeForces

[Codeforces/코드포스] Codeforces Round #820 (Div. 3) C - Jumping on Tiles

Problem - C - Codeforces codeforces.com 정렬 + 같은 문자가 존재할 때, 주의 제목 Jumping on Tiles 조건 time limit per test : 1 second memory limit per test : 256 megabytes input : standard input output : standard output 문제 Polycarp was given a row of tiles. Each tile contains one lowercase letter of the Latin alphabet. The entire sequence of tiles forms the string s. In other words, you are given a string s consi..

Problem Solving/CodeForces

[Codeforces/코드포스] Codeforces Round #820 (Div. 3) B - Decode String

Problem - B - Codeforces codeforces.com 뒤에서부터 제목 Decode String 조건 time limit per test : 1 second memory limit per test : 256 megabytes input : standard input output : standard output 문제 Polycarp has a string s consisting of lowercase Latin letters. He encodes it using the following algorithm. He goes through the letters of the string s from left to right and for each letter Polycarp considers it..

Problem Solving/CodeForces

[Codeforces/코드포스] Codeforces Round #820 (Div. 3) A - Two Elevators

Problem - A - Codeforces codeforces.com 제목 Two Elevators 조건 time limit per test : 1 second memory limit per test : 256 megabytes input : standard input output : standard output 문제 Vlad went into his appartment house entrance, now he is on the 1-th floor. He was going to call the elevator to go up to his apartment. There are only two elevators in his house. Vlad knows for sure that: the first ele..

JunHoChoi
'분류 전체보기' 카테고리의 글 목록 (10 Page)