- [Problem Solving] 프로그래머스: 최고의 집합 문제 출처: https://school.programmers.co.kr/learn/courses/30/lessons/12938 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr #include #include #include #include #include using namespace std;vector solution(int n, int s) { vector answer; int k = -1; for(int t = 1; t * n 각 원소의 합이 s가 되면서 원소의 곱이 최대가 되게 하려면,모든 원소는 같거나, 두 값 k와 k + 1만을 가지도록 나누어야 한다. 만약 두 a > b인 두 원소가.. 2026.04.22
- [Problem Solving] 프로그래머스: 연속 펄스 부분 수열의 합 문제 출처:https://school.programmers.co.kr/learn/courses/30/lessons/161988?language=cpp 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr #include #include #include using namespace std;long long max_subarray(vector arr) { long long current = arr[0]; long long maximum = arr[0]; for(int i = 1; i sequence) { long long answer = 0; vector a; vector b; .. 2026.04.17
- [Problem Solving] 프로그래머스: 2018 KAKAO BLIND RECRUITMENT [3차] 방금그곡 문제 출처: https://school.programmers.co.kr/learn/courses/30/lessons/17683 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr #include #include #include using namespace std;string modify(string s){ string ret = ""; vector visited(s.size() + 1, false); for(int i = 0; i musicinfos) { string answer = ""; int max_t = -1; string A = modify(m); .. 2026.04.15
- [Problem Solving] BOJ 12869: 뮤탈리스크 문제 출처: https://www.acmicpc.net/problem/12869 #include #include #include using namespace std;int N;int hp[3];int dist[61][61][61];int dir[6][3] = { {0, 1, 2}, {1, 0, 2}, {2, 0, 1}, {0, 2, 1}, {1, 2, 0}, {2, 1, 0}};void input(){ cin >> N; for(int i = 0; i > hp[i]; }}void bfs(int i, int j, int k){ queue> q; q.push({i, j, k}); dist[i][j][k] = 0; while(!q.e.. 2026.04.14
- [Problem Solving] Codetree : 현대 9차 1번 (보안 담당자) 문제 출처: https://www.codetree.ai/ko/frequent-problems/hsat/problems/security-manager/description 코딩테스트 기출 문제 설명: 보안 담당자 | 코드트리코딩테스트 기출 문제 보안 담당자의 상세 설명입니다. 문제 요구사항을 정확히 파악하고 효율적인 알고리즘을 설계해보세요.www.codetree.ai #include #include using namespace std;int N;string s;int low = 0; // 열린 괄호의 최소 개수int high = 0; // 열린 괄호의 최대 개수void input(){ cin >> N >> s; if (N % 2 != 0) { cout low: 현 시점 열린.. 2026.04.13
- [Problem Solving] Codetree: 삼성 2024 상반기 오전 1번 문제 (고대 문명 유적 탐사) 문제 출처: https://www.codetree.ai/ko/frequent-problems/samsung-sw/problems/ancient-ruin-exploration/description 코딩테스트 기출 문제 설명: 고대 문명 유적 탐사 | 코드트리코딩테스트 기출 문제 고대 문명 유적 탐사의 상세 설명입니다. 문제 요구사항을 정확히 파악하고 효율적인 알고리즘을 설계해보세요.www.codetree.ai #include #include #include #include using namespace std;int K, M;int m = 0;int board[5][5];int temp[5][5];bool visited[5][5];int P[300];int answer = 0;int dy[4] = {-1, .. 2026.04.09
- [Problem Solving] SWEA 5653: [모의 SW 역량테스트] 줄기세포배양 문제 출처: https://swexpertacademy.com/main/code/problem/problemDetail.do?contestProbId=AWXRJ8EKe48DFAUo SW Expert AcademySW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요!swexpertacademy.com #include#include#includeusing namespace std;#define MAX_N 351#define MAX_M 351int N, M, K;int status[MAX_N][MAX_M]; // 세포 없음: 9, 죽은상태: -1, 비활성 상태: 0, 활성상태: 1int board[MAX_N][MAX_M];int nonActiveCountDown[MAX_N][MAX_M];i.. 2026.04.08
- [Problem Solving] Codetree: 삼성 2025 하반기 오후 2번 문제 (가로등 설치) 문제 출처: https://www.codetree.ai/ko/frequent-problems/samsung-sw/problems/street-light-installation/description 코딩테스트 기출 문제 설명: 가로등 설치 | 코드트리코딩테스트 기출 문제 가로등 설치의 상세 설명입니다. 문제 요구사항을 정확히 파악하고 효율적인 알고리즘을 설계해보세요.www.codetree.ai #include #include #include #include #include #include using namespace std;struct comp { bool operator()(tuple a, tuple b) { auto [a_distance, a_pos, a_i, a_j] = a; .. 2026.04.07
- [Problem Solving] Codetree: 삼성 2025 하반기 오후 1번 문제 (AI 로봇청소기) 문제 출처: https://www.codetree.ai/ko/frequent-problems/samsung-sw/problems/ai-robot/description 코딩테스트 기출 문제 설명: AI 로봇청소기 | 코드트리코딩테스트 기출 문제 AI 로봇청소기의 상세 설명입니다. 문제 요구사항을 정확히 파악하고 효율적인 알고리즘을 설계해보세요.www.codetree.ai #include #include #include #include using namespace std;int N, K, L;int board[31][31];bool robot[31][31];int dist[31][31];vector r_v;vector c_v;int answer = 0;int dy[4] = {0, 1, 0, -1};int d.. 2026.04.06
- [Problem Solving] 프로그래머스: 디스크 컨트롤러 문제 출처: https://school.programmers.co.kr/learn/courses/30/lessons/42627 코딩테스트 연습 - 디스크 컨트롤러알고리즘 문제 연습 카카오톡 친구해요! 프로그래머스 교육 카카오 채널을 만들었어요. 여기를 눌러, 친구 추가를 해주세요. 신규 교육 과정 소식은 물론 다양한 이벤트 소식을 가장 먼저 알려school.programmers.co.kr#include #include #include #include #include using namespace std;priority_queue, vector>, greater> pq;vector tasks_start_at[1001];vector end_time;int solution(vector> jobs) { in.. 2026.04.04