ACM준비/acmicpc 15

어린왕자

https://www.acmicpc.net/problem/1004 1004번: 어린 왕자 입력의 첫 줄에는 테스트 케이스의 개수 T가 주어진다. 그 다음 줄부터 각각의 테스트케이스에 대해 첫째 줄에 출발점 (x1, y1)과 도착점 (x2, y2)이 주어진다. 두 번째 줄에는 행성계의 개수 n이 주 www.acmicpc.net 오래전에 풀은 문제라 기억은 안나지만 두 원간의 거리를 비교하여 해결한 것으로 보인다. #include #include void main() { int testcase; int x1, y1, x2, y2; int n; int cx, cy, r; int i; int num_answer, plag; scanf("%d", &testcase); while (testcase--) { num_..

ACM준비/acmicpc 2015.07.07

터렛

https://www.acmicpc.net/problem/1002 1002번: 터렛 각 테스트 케이스마다 류재명이 있을 수 있는 위치의 수를 출력한다. 만약 류재명이 있을 수 있는 위치의 개수가 무한대일 경우에는 -1을 출력한다. www.acmicpc.net 3가지의 예외 케이스를 잘 구분하고 처리하면 된다. #include #include int main(void) { int test; int x1, y1, x2, y2, r1, r2; double d; int ret; scanf("%d", &test); while (test--) { scanf("%d %d %d %d %d %d", &x1, &y1, &r1, &x2, &y2, &r2); d = sqrt((double)((x2 - x1) * (x2 - x..

ACM준비/acmicpc 2015.07.07

Contest Scoreboard

https://www.acmicpc.net/problem/4428 4428번: Contest Scoreboard Output will consist of a scoreboard sorted as previously described. Each line of output will contain a contestant number, the number of problems solved by the contestant and the time penalty accumulated by the contestant. Since not all of contestants 1-100 www.acmicpc.net 예제 결과 : 성공 채점 결과 : Wrong Answer 이유 : 주석? 출력포맷? 내용상으로는 이유를 찾기 힘..

ACM준비/acmicpc 2015.01.08

Where's Waldorf?

https://www.acmicpc.net/problem/6983 6983번: Where's Waldorf? The input begins with a number on a line by itself, indicating the number of test cases that follow. Each test case consists of a pair of integers, m followed by n, 1 ≤ m ≤ 50 and 1 ≤ n ≤ 50 in decimal notation on a single line. The next m lines co www.acmicpc.net 문제풀이 >문자열을 입력받아 미리 입력된 문자판에서 찾기(낱말찾기와 유사) >문자판에서 해당되는 문자를 검색하고 찾은 후에는 전체..

ACM준비/acmicpc 2015.01.08