Submission #21301890


Source Code Expand

#include<bits/stdc++.h>
using namespace std;
int n, i, j, k;
double a, b, x, y, t, pi=3.14159265358979, m1, m2, xx, yy, x1, y2;
main()
{
    cin>>n>>a>>b>>x>>y;
    t=(2*pi)/n;
    m1=(a+x)/2;
    m2=(b+y)/2;
    xx=a-m1;
    yy=b-m2;
    x1=xx*cos(t)-yy*sin(t);
    y2=xx*sin(t)+yy*cos(t);
    printf("%.30lf %.30lf", m1+x1, m2+y2);
}

Submission Info

Submission Time
Task D - Opposite
User leinad2
Language C++ (GCC 9.2.1)
Score 400
Code Size 352 Byte
Status AC
Exec Time 6 ms
Memory 4200 KiB

Compile Error

./Main.cpp:5:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
    5 | main()
      |      ^

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 400 / 400
Status
AC × 2
AC × 18
Set Name Test Cases
Sample sample_01.txt, sample_02.txt
All handmade_00.txt, handmade_01.txt, handmade_02.txt, handmade_03.txt, random_00.txt, random_01.txt, random_02.txt, random_03.txt, random_04.txt, random_05.txt, random_06.txt, random_07.txt, random_08.txt, random_09.txt, random_10.txt, random_11.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
handmade_00.txt AC 6 ms 3904 KiB
handmade_01.txt AC 2 ms 3820 KiB
handmade_02.txt AC 2 ms 3848 KiB
handmade_03.txt AC 2 ms 3832 KiB
random_00.txt AC 2 ms 3808 KiB
random_01.txt AC 2 ms 3936 KiB
random_02.txt AC 2 ms 3864 KiB
random_03.txt AC 2 ms 3836 KiB
random_04.txt AC 2 ms 3812 KiB
random_05.txt AC 2 ms 3824 KiB
random_06.txt AC 2 ms 4036 KiB
random_07.txt AC 3 ms 3832 KiB
random_08.txt AC 3 ms 3904 KiB
random_09.txt AC 2 ms 3936 KiB
random_10.txt AC 5 ms 4036 KiB
random_11.txt AC 2 ms 3936 KiB
sample_01.txt AC 2 ms 4200 KiB
sample_02.txt AC 3 ms 3964 KiB