본문 바로가기

sw8

[SWEA] 1928. Base64 Decoder https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PR4DKAG0DFAUq&categoryId=AV5PR4DKAG0DFAUq&categoryType=CODE SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! www.swexpertacademy.com 이 문제는 문제 조차 이해하지 못해서 구글링해서 찾아봤다. (참고: https://zetawiki.com/wiki/SWEA_1928_Base64_Decoder) Base64 Encoding: 8bit X 3글자 → 6bit X 4글자 변환 Base64 Decoding: 6bit X 4글자 → 8bit X 3글자.. 2019. 4. 26.
[SWEA] 1859. 백만 장자 프로젝트 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5LrsUaDxcDFAXc&categoryId=AV5LrsUaDxcDFAXc&categoryType=CODE SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! www.swexpertacademy.com 나는 답을 구하는 과정을 너무 복잡하게 생각했더니 감이 안잡혀서 코드를 찾아봤더니 단순한 알고리즘이었다. 매매가 벡터의 뒤에서부터 루프를 도는데 초기에는 마지막 값을 max에 넣고 시작하고, 그 다음부터 max 값보다 작으면 산다고 가정하고 이익을 결과 값에 더해주고, max 값과 같거나 크면 max 값을 해당.. 2019. 4. 24.
[SWEA] 1926. 간단한 369게임 https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PTeo6AHUDFAUq&categoryId=AV5PTeo6AHUDFAUq&categoryType=CODE SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! www.swexpertacademy.com 정수를 문자열로 바꿔주는 to_string() 함수를 알고 있어야 풀 수 있는 문제이다. * string to int, int to string 변환 함수 string to int int to string atoi(char*) to_string(int) string str = "123"; int num = at.. 2019. 4. 17.
[SWEA] 1940. 가랏! RC카! https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AV5PjMgaALgDFAUq&categoryId=AV5PjMgaALgDFAUq&categoryType=CODE&&& SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! www.swexpertacademy.com #include #include using namespace std; int T, N, command, speed; int currentSpeed, currentDistance; void getDistance(); int main() { cin.tie(0); ios::sync_with_stdio(0); c.. 2019. 4. 17.