문제) 백준 - 물리학 - Archer Vlad
https://www.acmicpc.net/problem/21000
21000번: Archer Vlad
Vlad was an exemplary student known for his exceptional adventures, many of which have been preserved as tasks for programming contests. But such a restless life had exhausted Vlad a bit too much. "Wherever I go, there are only problems! I'm done!" -- he a
www.acmicpc.net



C++ 소스 코드)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double solvePos(int x, int y){ | |
double VAL = x * pow(C, 2) + sqrt(pow(C, 4) * pow(x, 2) - 20 * pow(x, 2) * (y * pow(C, 2) + 5 * pow(x, 2))); | |
return VAL / (10 * pow(x, 2)); | |
} | |
double solveMin(int x, int y){ | |
double VAL = x * pow(C, 2) - sqrt(pow(C, 4) * pow(x, 2) - 20 * pow(x, 2) * (y * pow(C, 2) + 5 * pow(x, 2))); | |
return VAL / (10 * pow(x, 2)); | |
} |
Full Code)
https://github.com/Chocochip101/BOJ_Solution/blob/main/Solution/21000_ArcherVlad.cpp
GitHub - Chocochip101/BOJ_Solution: BOJ Solutions
BOJ Solutions. Contribute to Chocochip101/BOJ_Solution development by creating an account on GitHub.
github.com
P.S) 오랜만에 물리 문제 푸니 재밌습니다.
반응형
'PS(Problem Solving) > 백준_BOJ' 카테고리의 다른 글
[백준] 1032번 - 명령 프롬프트 (C++) 문제 및 풀이 (0) | 2022.02.12 |
---|---|
[백준] 19238번 - 스타트 택시 (C++) 문제 및 풀이 (0) | 2022.02.10 |
[백준] 18290번 - NM과 K (1) (C++) 문제 및 풀이 (0) | 2022.02.09 |
[백준] 9421번 - 소수상근수 (C++) 문제 및 풀이 (0) | 2022.02.09 |
[백준] 14697번 - 방 배정하기 (C++) 문제 및 풀이 (0) | 2022.02.09 |
댓글