본문 바로가기

USACO

(71)
백준 14456 Hoof, Paper, Scissors (USACO January 2017 Bronze 2번) 문제 링크: https://www.acmicpc.net/problem/14456 14456번: Hoof, Paper, Scissors (Bronze) You have probably heard of the game "Rock, Paper, Scissors". The cows like to play a similar game they call "Hoof, Paper, Scissors". The rules of "Hoof, Paper, Scissors" are simple. Two cows play against each-other. They both count to three and then each s www.acmicpc.net 가능한 상황이 두가지밖에 없다. 1. 1이 2를 이기고, 2가 3을 이기고..
백준 14455 Don't Be Last! (USACO January 2017 Bronze 1번) 문제 링크: https://www.acmicpc.net/problem/14455 14455번: Don't Be Last! Farmer John owns 7 dairy cows: Bessie, Elsie, Daisy, Gertie, Annabelle, Maggie, and Henrietta. He milks them every day and keeps detailed records on the amount of milk provided by each cow during each milking session. Not surprisingly, Farmer John highly p www.acmicpc.net 맵을 사용하여 소들의 이름과 우유양을 업데이트 하면서 입력받음. 맵을 돌면서 최소 우유양 M을 찾고, ..
백준 14175 The Cow-Signal (USACO December 2016 Bronze 3번) 문제 링크: https://www.acmicpc.net/problem/14175 14175번: The Cow-Signal Bessie and her cow friends are playing as their favorite cow superheroes. Of course, everyone knows that any self-respecting superhero needs a signal to call them to action. Bessie has drawn a special signal on a sheet of M×N paper (1≤M≤10,1≤N≤10), but thi www.acmicpc.net 하나의 케릭터를 받을때마다 가로 세로 두 방향모두로 K배 해서 ans배열에 입력함. 1 2 3 4 5 ..
백준 14174 Block Game (USACO December 2016 Bronze 2번) 문제 링크: https://www.acmicpc.net/problem/14174 14174번: Block Game Farmer John is trying to teach his cows to read by giving them a set of N spelling boards typically used with preschoolers (1≤N≤100). Each board has a word and an image on each side. For example, one side might have the word 'cat' along with a picture of a www.acmicpc.net 각 카드마다 앞면, 뒷면 모두를 표현하기 위해 필요한 알파벳 갯수를 세서 다 더함. 예시 > 2 aaa aab..
백준 14173 Square Pasture (USACO December 2016 Bronze 1번) 문제 링크: https://www.acmicpc.net/problem/14173 14173번: Square Pasture In the example above, the first original rectangle has corners (6,6) and (8,8). The second has corners at (1,8) and (4,9). By drawing a square fence of side length 7 with corners (1,6) and (8,13), the original areas can still be enclosed; moreover, this is www.acmicpc.net 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 ..
백준 12005 Diamond Collector (USACO US Open 2016 Bronze 1번) 문제 링크: https://www.acmicpc.net/problem/12005 12005번: Diamond Collector (Bronze) Bessie the cow, always a fan of shiny objects, has taken up a hobby of mining diamonds in her spare time! She has collected \(N\) diamonds (\(N \leq 1000\)) of varying sizes, and she wants to arrange some of them in a display case in the barn. Since Bessie www.acmicpc.net 각각의 diamond를 제일 작은 size라고 취급하고, 같은 case 안에 들어..
백준 12001 Load Balancing (USACO February 2016 Bronze 3번) 문제 링크: https://www.acmicpc.net/problem/12001 12001번: Load Balancing (Bronze) Farmer John's \(N\) cows are each standing at distinct locations \((x_1, y_1) \ldots (x_n, y_n)\) on his two-dimensional farm (\(1 \leq N \leq 100\), and the \(x_i\)'s and \(y_i\)'s are positive odd integers of size at most \(B\)). FJ wants to partition hi www.acmicpc.net N개 점들의 x좌표, y좌표들 사이에 가능한 모든곳에 fence를 놓고, 나뉘어진 4개..
백준 12000 Circular Barn (USACO February 2016 Bronze 2번) 문제 링크: https://www.acmicpc.net/problem/12000 12000번: Circular Barn (Bronze) Being a fan of contemporary architecture, Farmer John has built a new barn in the shape of a perfect circle. Inside, the barn consists of a ring of \(n\) rooms, numbered clockwise from \(1 \ldots n\) around the perimeter of the barn (\(3 \leq n \leq 1,000\ www.acmicpc.net 각 방에 exterior door를 열어놨을때의 총거리합들을 구하고, 그중에 최소값을 구..