본문 바로가기

분류 전체보기439

순위 검색 C++ https://programmers.co.kr/learn/courses/30/lessons/72412 2021. 7. 1.
메뉴 리뉴얼 C++ https://programmers.co.kr/learn/courses/30/lessons/72411 코딩테스트 연습 - 메뉴 리뉴얼 레스토랑을 운영하던 스카피는 코로나19로 인한 불경기를 극복하고자 메뉴를 새로 구성하려고 고민하고 있습니다. 기존에는 단품으로만 제공하던 메뉴를 조합해서 코스요리 형태로 재구성해서 programmers.co.kr #include #include #include #include using namespace std; map m; int sz; bool cmp(pair a, pair b) { return a.second > b.second; } void find_menu(int count, string str, int index, string tmp) { if (count < .. 2021. 6. 30.
신규 아이디 C++ https://programmers.co.kr/learn/courses/30/lessons/72410 코딩테스트 연습 - 신규 아이디 추천 카카오에 입사한 신입 개발자 네오는 "카카오계정개발팀"에 배치되어, 카카오 서비스에 가입하는 유저들의 아이디를 생성하는 업무를 담당하게 되었습니다. "네오"에게 주어진 첫 업무는 새로 programmers.co.kr #include #include using namespace std; string solution(string new_id) { string answer = ""; string tmp; //1단계 for(int i=0; i 2021. 6. 28.
마법사 상어와 비바라기 https://www.acmicpc.net/problem/21610 21610번: 마법사 상어와 비바라기 마법사 상어는 파이어볼, 토네이도, 파이어스톰, 물복사버그 마법을 할 수 있다. 오늘 새로 배운 마법은 비바라기이다. 비바라기를 시전하면 하늘에 비구름을 만들 수 있다. 오늘은 비바라기 www.acmicpc.net #include #include #include using namespace std; const int MAX = 52; struct MOVE { int x, y; }; MOVE mv[8] = { { 0,-1 },{ -1,-1 },{ -1,0 },{ -1,1 },{ 0,1 },{ 1,1 },{ 1,0 },{ 1,-1 } }; int n, m; int map[MAX][MAX]; vector .. 2021. 6. 28.