Submission #33207922
Source Code Expand
#include <bits/stdc++.h>
#define pb emplace_back
#define mp make_pair
#define fir first
#define sec second
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
const int maxn = 5e5 + 5;
const int maxm = 2e6 + 5;
const ll mod = 1e9 + 7;
int n,m;
double pi;
int main() {
double x,y;
pi = acos(-1.0);
scanf("%lf %lf",&x,&y);
double tri = atan2(y , x),len = sqrt(x * x + y * y);
double d;
scanf("%lf",&d);
tri += d * pi / 180.0;
printf("%.15lf %.15lf\n",len * cos(tri),len * sin(tri));
return 0;
}
Submission Info
| Submission Time | |
|---|---|
| Task | B - Counterclockwise Rotation |
| User | Ktlysuki |
| Language | C++ (GCC 9.2.1) |
| Score | 200 |
| Code Size | 549 Byte |
| Status | AC |
| Exec Time | 7 ms |
| Memory | 4292 KiB |
Compile Error
./Main.cpp: In function ‘int main()’:
./Main.cpp:17:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
17 | scanf("%lf %lf",&x,&y);
| ~~~~~^~~~~~~~~~~~~~~~~
./Main.cpp:20:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
20 | scanf("%lf",&d);
| ~~~~~^~~~~~~~~~
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 200 / 200 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt |
| All | 00_sample_00.txt, 00_sample_01.txt, 00_sample_02.txt, 00_sample_03.txt, 00_sample_04.txt, 01_case_00.txt, 01_case_01.txt, 01_case_02.txt, 01_case_03.txt, 01_case_04.txt, 01_case_05.txt, 01_case_06.txt, 01_case_07.txt, 01_case_08.txt, 01_case_09.txt, 01_case_10.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 00_sample_00.txt | AC | 7 ms | 4156 KiB |
| 00_sample_01.txt | AC | 2 ms | 4024 KiB |
| 00_sample_02.txt | AC | 2 ms | 3968 KiB |
| 00_sample_03.txt | AC | 2 ms | 4156 KiB |
| 00_sample_04.txt | AC | 3 ms | 4088 KiB |
| 01_case_00.txt | AC | 2 ms | 4260 KiB |
| 01_case_01.txt | AC | 2 ms | 4040 KiB |
| 01_case_02.txt | AC | 1 ms | 4292 KiB |
| 01_case_03.txt | AC | 2 ms | 4024 KiB |
| 01_case_04.txt | AC | 3 ms | 4160 KiB |
| 01_case_05.txt | AC | 2 ms | 3868 KiB |
| 01_case_06.txt | AC | 2 ms | 4292 KiB |
| 01_case_07.txt | AC | 2 ms | 4032 KiB |
| 01_case_08.txt | AC | 2 ms | 4148 KiB |
| 01_case_09.txt | AC | 2 ms | 4156 KiB |
| 01_case_10.txt | AC | 2 ms | 4088 KiB |