분류 전체보기(363)
-
[BOJ 24618] Robot Instructions
https://www.acmicpc.net/problem/24618 24618번: Robot Instructions The first line contains $N$. The next line contains $x_g$ and $y_g$, each in the range $-10^9 \ldots 10^9$. The final $N$ lines describe the instructions. Each line has two integers $x_i$ and $y_i$, also in the range $-10^9 \ldots 10^9$. It is guaranteed t www.acmicpc.net - 문제 요약 Bessie는 최근 선물 받은 로봇을 제어하는 법을 배우고 있습니다. 처음 로봇은 (0,0) ..
2023.02.23 -
[BOJ 24493] Cereal 2
https://www.acmicpc.net/problem/24493 24493번: Cereal 2 Print the minimum number of cows that go hungry, followed by any permutation of $1\ldots N$ that achieves this minimum. If there are multiple permutations, any one will be accepted. www.acmicpc.net - 문제 요약 농부 John의 젖소들은 시리얼을 너무 좋아해서 한 끼에 시리얼 한 상자를 다 먹습니다. 현재 M(2m; for(int i=0;i>a>>b; adj[a].push_back(st(i+1,b,false)); adj[b].push_back(st(i+1..
2023.02.20 -
[BOJ 26974] Range Reconstruction
https://www.acmicpc.net/problem/26974 26974번: Range Reconstruction Bessie has an array $a_1, \ldots, a_N$, where $1 \leq N \leq 300$ and $0 \leq a_i \leq 10^9$ for all $i$. She won't tell you $a$ itself, but she will tell you the range of each subarray of $a$. That is, for each pair of indices $i \leq j$, Bessie tells you www.acmicpc.net - 문제 요약 Bessie에게는 a1, ... , aN의 배열이 있습니다. (1
2023.02.18 -
[BOJ 14499] 주사위 굴리기
https://www.acmicpc.net/problem/14499 14499번: 주사위 굴리기 첫째 줄에 지도의 세로 크기 N, 가로 크기 M (1 ≤ N, M ≤ 20), 주사위를 놓은 곳의 좌표 x, y(0 ≤ x ≤ N-1, 0 ≤ y ≤ M-1), 그리고 명령의 개수 K (1 ≤ K ≤ 1,000)가 주어진다. 둘째 줄부터 N개의 줄에 지 www.acmicpc.net - 문제 요약 크기가 N×M인 지도가 존재한다. 지도의 위에는 주사위가 하나 놓여있으며, 지도의 오른쪽은 동쪽, 위쪽은 북쪽이다. 지도의 좌표는 (r, c)로 나타내며, r는 북쪽으로부터 떨어진 칸의 개수, c는 서쪽으로부터 떨어진 칸의 개수이다. 주사위는 지도 위에 윗 면이 1이고, 동쪽을 바라보는 방향이 3인 상태로 놓여 있으며..
2023.02.18 -
[BOJ 21232] Comfortable Cows
https://www.acmicpc.net/problem/21232 21232번: Comfortable Cows For $i=4$, Farmer Nhoj must add an additional cow at $(2,1)$ to make the cow at $(1,1)$ uncomfortable. For $i=9$, the best Farmer Nhoj can do is place additional cows at $(2,0)$, $(3,0)$, $(2,-1)$, and $(2,3)$. www.acmicpc.net - 문제 요약 Farmer Nhoj의 목초지는 정사각형의 형태입니다. 이 목초지는 현재 비어있으나, Nhoj는 이곳에 N(1>p.second; p.first+=1000,p.second+=1000..
2023.02.18 -
[BOJ 24978] Subset Equality
https://www.acmicpc.net/problem/24978 24978번: Subset Equality The cows are trying out a new method of exchanging coded messages with each-other where they mix irrelevant letters in among relevant letters to make the messages hard to decode. The cows transmit two strings $s$ and $t$ each of length at most $10^5$ consi www.acmicpc.net - 문제 요약 소들은 암호화된 메시지를 교환하는 새로운 방법을 시도해보고 있습니다. 그들은 메시지 해독을 어렵게 ..
2023.02.17