Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
Tags
- 알고리즘
- NaverAItech
- 프로그래머스
- NLP
- 코딩테스트
- GIT
- Matplotlib
- pytorch
- 네이버AItech
- Kubernetes
- 완전탐색
- 백준
- vscode
- docker
- autoencoder
- PytorchLightning
- FDS
- pep8
- python
- github
- DeepLearning
- wandb
- FastAPI
- GCP
- datascience
- Kaggle
- GitHub Action
- leetcode
- torchserve
- rnn
Archives
- Today
- Total
Sangmun
백준 11758번 CCW 본문
https://www.acmicpc.net/problem/11758
기하학의 기본적인 문제라고 한다. 푸는 방법이 이미 널리 알려진 듯 하다.
https://www.acmicpc.net/blog/view/27
아래 링크는 삼각형의 면적을 왜 저렇게 구하나 했더니 신발끈 공식이라는게 있다고 한다.
point = []
for _ in range(3):
point.append(list(map(int, input().split())))
tmp = point[0][0]*point[1][1] + point[1][0]*point[2][1] + point[2][0]*point[0][1]
result = tmp - point[1][0]*point[0][1] - point[2][0]*point[1][1] - point[0][0]*point[2][1]
if result > 0:
print(1)
elif result < 0:
print(-1)
else:
print(0)
'알고리즘 > 백준' 카테고리의 다른 글
백준 1647번 도시분할 계획 (0) | 2022.11.20 |
---|---|
백준 11779번 최소비용 구하기 2 (0) | 2022.11.20 |
백준 14500번 테트로미노 (1) | 2022.10.08 |
백준 11403번 경로찾기 (0) | 2022.10.01 |
백준 14624번 - 전북대학교 (0) | 2022.09.28 |
Comments