Skip to content

Conversation

@oncsr
Copy link
Contributor

@oncsr oncsr commented Feb 5, 2025

🧷 문제 링크

https://www.acmicpc.net/problem/28428

🧭 풀이 시간

25분

👀 체감 난이도

✏️ 문제 설명

술래는 매 초 다음과 같이 움직일 수 있다

  • 현재 위치가 $(x,y)$이고 $x,y$ 모두 $2$ 이상일 때 $(x-1,y-1)$로 움직인다.
  • 현재 위치가 $(x,y)$일 때 $(x+1,y+1)$로 움직인다.
  • 현재 위치가 $(x,y)$일 때 $(ax, ay)$로 움직인다. ($a$는 양의 정수)
  • 현재 위치가 $(x,y)$일 때 $(x/d,y/d)$로 움직인다. ($d$$x$, $y$의 양의 공약수)

도망자는 (0,0)에서 시작해서 매 초 $(mx,my)$만큼 움직인다.

술래가 도망자를 잡을 수 있는지 판별하자

🔍 풀이 방법

도망자, 술래의 시작점을 각각 $(a,b), (c,d)$라고 하면,
$b-a$$d-c$의 부호에 따라 답이 정해짐을 알아챘다.

⏳ 회고

무지성 제출하지 말자

@oncsr oncsr added the success 👍 해설을 보지 않고 풀었을 때 label Feb 5, 2025
@ShinHeeEul ShinHeeEul merged commit 71b7815 into main Feb 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants