simp_pro's blog

By simp_pro, history, 22 months ago, In English

Problem link: https://atcoder.jp/contests/abc259/tasks/abc259_b

Submission link(WA): https://atcoder.jp/contests/abc259/submissions/33131531

Submission link(AC): https://atcoder.jp/contests/abc259/submissions/33131108

The only change I have done is how I am calculating the angle. I am getting wrong answer when I use atan, however I am getting AC with atan2.

My atan usage
  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
22 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Use following equations,

$$$x' = x * cos(\theta) - y * sin(\theta)$$$
$$$y' = x * sin(\theta) + y * cos(\theta)$$$